Show the name network interface:# ifconfig -a
Modify eth0's configuration file:
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.1.212
NETMASK=255.255.255.0
Note: if you want to use DHCP, change BOOTPROTO=dhcp
Define default gateway (router IP) and hostname:
# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=centos64.local
GATEWAY=192.168.1.1
Make sure you have correct DNS server defined:
# vi /etc/resolv.conf
nameserver 8.8.8.8
Restart networking:
# /etc/init.d/network restart
Friday, May 3, 2013
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment