setting static IP linux | |
---|---|
Subject: | |
Edit /etc/sysconfig/network-scripts/ifcfg-eth0, enter:# cat /etc/sysconfig/network-scripts/ifcfg-eth0Sample static ip configuration: # Intel Corporation 82573E Gigabit Ethernet Controller (Copper) DEVICE=eth0 BOOTPROTO=static DHCPCLASS= HWADDR=00:30:48:56:A6:2E IPADDR=192.168.1.10 NETMASK=255.255.255.0 ONBOOT=yes Edit /etc/resolv.conf and setup DNS servers, enter:# cat /etc/resolv.confSample static IP configurations: search cyberciti.biz nameserver 192.168.1.254 nameserver 8.8.8.8 nameserver 202.54.2.5 Finally, you need to restart the networking service, enter:# /etc/init.d/network restart | |
2015-11-25 09:17:31 | gstlouis |