Defining physical interfaces such as eth0

Lines beginning with the word "auto" are used to identify the physical interfaces to be brought up when ifup is run with the -a option. (This option is used by the system boot scripts.) Physical interface names should follow the word "auto" on the same line. There can be multiple "auto" stanzas. ifup brings the named inter faces up in the order listed. For example following example setup eth0 (first network interface card) with 192.168.1.5 IP address and gateway (router) to 192.168.1.254:
iface eth0 inet static
address 192.168.1.5
netmask 255.255.255.0
gateway 192.168.1.254

Setup interface to dhcp

To setup eth0 to dhcp, enter:
auto eth0
iface eth0 inet dhcp


# /etc/init.d/networking restart
# route     또는 # netstat -rn

'OS > 우분투' 카테고리의 다른 글

우분투 포트열기  (0) 2011.08.01
grep 사용하기  (0) 2011.07.11
SU 와 SU - 의 차이  (0) 2011.06.29
FreeNX(서버) 우분투에설치  (0) 2011.06.29
우분투 uuid 확인하는 방법  (0) 2011.06.15
AND