Wednesday, August 1, 2007

Configuring Debian to Use Static IP

Default setup of Debain is getting IP via DHCP. In order to use static IP 192.168.0.66, do the following.

Edit the file "/etc/network/interfaces" and replace "iface eth0 inet dhcp" with the following (section 10.6.1.1):
iface eth0 inet static
address 192.168.0.66
netmask 255.255.255.0
gateway 192.168.0.1

Commands details (section 10.6.1):
# ifdown eth0
# jstar /etc/network/interfaces
# ifup eth0

References:

Debain Reference Chapter 10 - Network Configuration
http://www.debian.org/doc/manuals/reference/ch-gateway.en.html