OldStory/리눅스
Change IP
Alnilam
2009. 2. 6. 10:16
반응형
서버를 설치한 후 보니 네트워크 설정이 DHCP로 되어 시스템을 리부팅하면 IP가 변경되는 문제가 있었다. 이런 경우 네트워크 설정을 수동으로 해주어야 한다.
설정방법은 /etc/network/interfaces 파일을 수정한다.
$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.123.100
netmask 255.255.255.0
network 192.168.123.0
broadcast 192.168.123.255
gateway 192.168.123.254
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 168.126.63.1
dns-search homelinux.com
반응형