1. Configure static IP address on eth0 :
[root@centos64 ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0Original :
DEVICE=eth0 HWADDR=00:0C:29:F1:24:F0 TYPE=Ethernet UUID=324bfeb3-2a7c-409c-98d0-5cf1607596c4 ONBOOT=no NM_CONTROLLED=yes BOOTPROTO=dhcpSet to the following :
DEVICE=eth0 HWADDR=00:0C:29:F1:24:F0 TYPE=Ethernet UUID=324bfeb3-2a7c-409c-98d0-5cf1607596c4 ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=none IPADDR=192.168.2.62 NETMASK=255.255.0.02. Configure gateway :
[root@centos64 ~]# vi /etc/sysconfig/networkAdd gateway line :
NETWORKING=yes HOSTNAME=centos64.ehowstuff.local GATEWAY=192.168.2.13. Configure DNS :
; generated by /sbin/dhclient-script search Belkin ehowstuff.local nameserver 192.168.2.1Update to the following :
search ehowstuff.local nameserver 8.8.8.84. Restart network service to apply the changes :
[root@centos64 ~]# service network restart Shutting down interface eth0: [ OK ] Shutting down loopback interface: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface eth0: [ OK ]
Tidak ada komentar:
Posting Komentar