[Ubuntu]인터넷 설정 관련.

2014. 12. 2. 13:57제2외국어/Linux

인터넷 설정하기 위해서 수정해야할 곳
/etc/network/interface


auto eth0
iface eht0 inet static

ADDRESS ~
NETMASK ~
GATEWAY ~
DNS-NAMESERVERS ~

인터넷 확인하기
ifconfig [옵션 -a]

장비 올리기
ifup eth0 
or
ifconfig eth0 up

장비 내리기
ifdown eth0 
or
ifconfig eth0 down


위 명령어로는 장비를 올리고 내리기만 하지 interface에 있는 내용을 업데이트 하지 않기 때문에
서비스를 재시작 해야 한다.
/etc/init.d/networking restart

그리고 ping 명령어로 인터넷 확인하기 끝.


ping URL 명령어시 Unknown host 시에는 
vi /etc/resolve.conf 에서

nameserver 8.8.8.8
nameserver 8.8.4.4

추가 후에
/etc/init.d/networking restart 
다시 ping 명령어 확인.


+ 인터넷 Rule 파일 위치
/etc/udev/rules.d/~-net.rules 파일이 인터넷 설정 정보를 가지고 있다.