wiki:configure_ip_address
Configure IP Address
In CentOS 6x the IP settings are held in file(s) located in the /etc/sysconfig/network-interfaces directory, there is one file for each physical interface, they are generally called:
ifcfg-eth0
ifcfg-eth1
ifcfg-eth2
ifcfg-eth3
ifcfg-eth4
ifcfg-eth5
ifcfg-lo
To see exactly what files you have, and what they are called simply do a list
ls /etc/sysconfig/network-scripts
To edit a file enter:
vi /etc/sysconfig/network-scripts/ifcfg-eht(0) --- (use the correct eth number for your system)
Below is an example of a static ip configuration for the first NIC (ifcfg-eth0)
DEVICE="eth0" BOOTPROTO=none IPV6INIT=no NM_CONTROLLED=no ONBOOT="yes" TYPE="Ethernet" IPADDR=192.168.27.110 NETMASK=255.255.255.0 GATEWAY=192.168.27.254 PERSISTENT_DHCLIENT=yes DHCP_HOSTNAME=h64.envivio.com
wiki/configure_ip_address.txt · Last modified: 2023/03/09 22:35 by 127.0.0.1