Friday, 30 January 2015

network configure in centos

vim /etc/sysconfig/network-scripts/ifcfg-eth0

BOOTPROTO=none
DEVICE=eth0
IPADDR=192.168.1.10 # your IP address
NETMASK=255.255.255.0 # your netmask
NETWORK=192.168.1.0 
ONBOOT=yes


Add GATEWAY to your /etc/sysconfig/network file:

NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=hostname.domainname
GATEWAY=192.168.1.1 # your gateway

Issue the following command to start network on boot:
chkconfig network on


Restart your network service:
service network restart


Take a look at your network interfaces

ifconfig

No comments:

Post a Comment