How-to-Configure Network in RHEL6 Centos6

In RHEL6 and CentOS6 there is not System-Config-Network Script available which was very handy and useful.. Its good thing that now your require Basic Knowledge of Linux config File.. which is a best practice for Real  Unix / Linux Admins.

Basically /etc contains Config files for system.
for network there is a directory called /etc/sysconfig/network-script/  

There are ifcfg-eth(number)  file for every Ethernet interface  e.g ifcfg-eth0 for Ethernet 0, ifcfg-eth1 for Ethernet 1

Now create a file or Edit a file called /etc/sysconfig/network-script/ifcfg-eth0





These are the values which you can configure in config file :

 DEVICE=devicename, where devicename is the name of the physical network device.

 IPADDR=ipaddr, where ipaddr is the IP address.

 NETMASK=netmask, where netmask is the netmask IP value.

 NETWORK=network, where network is the network IP address.

 BROADCAST=broadcast, where broadcast is the broadcast IP address.

 ONBOOT=answer, where answer is yes or no. Do the interface need to be active or inactive at boot time.

 BOOTPROTO=proto, where proto is one of the following :

 none - No boot-time protocol should be used.

 bootp - The bootp now pump protocol should be used.

 dhcp - The dhcp protocol should be used.

 USERCTL=answer, where answer is one of the following:

 yes - Non-root users are allowed to control this device.

 no - Only the super-user root is allowed to control this device.

No comments:

Post a Comment