Assigning an IP address manually

Geoff Shang Geoff at quitelikely.com
Sat Sep 22 22:53:45 UTC 2007


Hi,

Here's how I have it in my /etc/network/interfaces file:

auto lo  eth1

iface lo inet loopback

iface eth1 inet static
         address 192.168.2.100
         netmask 255.255.255.0
         gateway 192.168.2.1

Note that I intentionally am not configuring eth0.  Most people probably 
would want to.

Then you can use "ifup eth1" (or whatever your interface is) to make the 
changes if you need to.  The "auto" line will make sure that it comes up at 
startup.

For more info, do "man 5 interfaces"

Hope this helps,
Geoff.




More information about the Blinux-list mailing list