Recent Changes - Search:

Softwares

.

Centos-Network-Setup


RedHat and CentOS network setup example.


The following is a sample ifcfg-eth0 file for a system using a fixed IP address:

DEVICE=eth0 
BOOTPROTO=none 
ONBOOT=yes 
NETWORK=10.0.1.0 
NETMASK=255.255.255.0 
IPADDR=10.0.1.27 
USERCTL=no

The values required in an interface configuration file can change based on other values. 
For example, the ifcfg-eth0 file for an interface using DHCP looks different because IP information is provided by the DHCP server:

DEVICE=eth0 
BOOTPROTO=dhcp 
ONBOOT=yes

Another Example of CentOS Network Config

[root@agent network-scripts]# cat ifcfg-eth1
DEVICE=eth1
HWADDR=08:00:27:1B:D8:4B
BOOTPROTO=none
IPADDR=192.168.56.122
NETMASK=255.255.255.0
USERCTL=no
ONBOOT=yes


[root@agent network-scripts]# cat ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
[root@agent network-scripts]#

Edit - History - Print - Recent Changes - Search
Page last modified on October 12, 2014, at 12:59 AM