OS/Linux2014. 5. 13. 12:19


[root@localhost]# /etc/sysconfig/network-scripts

[root@localhost]# vi ifcfg-eth0


DEVICE="eth0"

BOOTPROTO="static"

IPADDR="192.168.1.10"

NETMASK="255.255.255.0"

NETWORK="192.168.1.0"

BROADCAST="192.168.1.255"

GATEWAY="192.168.1.1"

DNS1="168.126.63.1" or "8.8.8.8"

DNS2="168.126.63.2" or "8.8.4.4"


[root@localhost]# service network restart

[root@localhost]# ifconfig -a


DHCP 설정


DEVICE="eth0"

BOOTPROTO="dhcp"

HWADDR = "xx:xx:xx:xx:xx:xx:xx:xx"

NM_CONTROLLED="yes"

ONBOOT="yes"

TYPE="ethernet"

UUID="xxxxx-xxx-xxx-xxx-xxxxxx"



STATIC 설정


DEVICE="eth0"

BOOTPROTO="static"

IPADDR="192.168.0.2"

NETMASK="255.255.255.0"

NETWORK="192.168.0.0"

BROADCAST="192.168.0.255"

HWADDR = "E8:00.32:00:53:74"

GATEWAY="192.168.0.1"

DNS1="168.126.63.1"

DNS2="168.266.63.2"

IPV6INIT="yes"

IPV6_AUTOCONF="yes"

NM_CONTROLLED="yes"

ONBOOT="yes"

TYPE="ethernet"

UUID="xxxxx-xxx-xxx-xxx-xxxxxx"



Posted by idwook