[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"
'OS > Linux' 카테고리의 다른 글
Centos 언어 설정 (0) | 2014.11.27 |
---|---|
네트워크상 공유된 PC IP로 직접 접근방법 (0) | 2014.10.10 |
[Centos] DNS 네임서버 설정 (0) | 2014.02.20 |
[Centos] Subversion 설치 및 Apache 연동 (0) | 2014.02.12 |
[Centos] 명령어 요약 yum,rpm,ls,ll (0) | 2014.02.10 |