Friday, January 10, 2014

network configuration sample on Cent OS

External network interface using dhcp: /etc/sysconfig/network-script/ifcfg-eth4

[root@sr2s18 ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth4 

DEVICE=eth4
HWADDR=00:26:B9:38:4C:23
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp

Internal network interface using static IP: /etc/sysconfig/network-script/ifcfg-eth0

[root@sr2s18 ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
HWADDR=00:1B:21:44:96:10
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=192.168.0.38
BROADCAST=192.158.0.25
NETMASK=255.255.255.0
NAME=eth0

No comments: