The IP of my computer configuration is
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 (write eth0)
BOOTPROTO=static
HWADDR=XX:XX:XX:XX:XX:XX
IPADDR=172.21.101.47 (assign ip address)
NETMASK=255.255.255.0 (assign netmask)
NETWORK=172.21.101.0
BROADCAST=172.21.101.255
GATEWAY=172.21.101.1 (assign gateway)
ONBOOT=yes (write ONBOOT=yes)
NETWORKING_IPV6=no
DNS1=10.164.5.176 (assign DNS1)
DNS2=10.164.5.177 (assign DNS2)
:wq ! (save and quit)
Then restart network
[root@localhost ~]# service network restart
Now Verify your system ip
[root@localhost ~]# ifconfig
show your ip below...
##################### END #######################
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 (write eth0)
BOOTPROTO=static
HWADDR=XX:XX:XX:XX:XX:XX
IPADDR=172.21.101.47 (assign ip address)
NETMASK=255.255.255.0 (assign netmask)
NETWORK=172.21.101.0
BROADCAST=172.21.101.255
GATEWAY=172.21.101.1 (assign gateway)
ONBOOT=yes (write ONBOOT=yes)
NETWORKING_IPV6=no
DNS1=10.164.5.176 (assign DNS1)
DNS2=10.164.5.177 (assign DNS2)
:wq ! (save and quit)
Then restart network
[root@localhost ~]# service network restart
Now Verify your system ip
[root@localhost ~]# ifconfig
show your ip below...
##################### END #######################
u can also change it by writing the command "setup" from terminal. but setup command takes information from this file so care should be taken when handling this.
ReplyDelete