/etc/network/interfaces의 내용을 수정
1. ip할당
- 동적 ip 할당
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
- 정적 ip 할당(고정)
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address xxx.xxx.xxx.xxx
netmask xxx.xxx.xxx.xxx
gateway xxx.xxx.xxx.xxx
network xxx.xxx.xxx.xxx
dns-nameserver xxx.xxx.xxx.xxx
2. 네트워크 재시작후 ip 확인
/etc/init.d/networking restart (네트워크 재시작)
ifconfig (ip 확인 명령어)
'공부 > linux' 카테고리의 다른 글
리눅스 방화벽 명령어 (0) | 2012.11.23 |
---|---|
ubuntu 계정 생성/삭제/기본파일 생성 (0) | 2012.11.23 |