30 January 2013

Static IP on Linux

Setting static IP and resolv.conf to prevent resolv.conf being reset on reboot.

/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:24:1F:23:65:C1
NM_CONTROLLED=yes
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.3.183
NETMASK=255.255.255.0
GATEWAY=192.168.3.1

/etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4

No comments:

Post a Comment