Debian static ip address

Ronald Wechter rwechter at liberatortime.com
Tue Jul 12 12:34:52 EDT 2005


Michael,

Not sure of the "Debian Centric" way to do it but this is what I've done in
the past.  Here is the reference link I used -
http://www.debian.org/doc/manuals/reference/ch-gateway.en.html

To configure a static IP (an IP that will never change) in debian you must
edit the file,

/etc/networking/interfaces and put the following:

# /etc/network/interfaces (configuration file for ifup(8), ifdown(8))
# The loopback interface

auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian
installation
# (network, broadcast and gateway are optional)
auto eth0

iface eth0 inet static
       address 192.168.1.10
       netmask 255.255.255.0
       network 192.168.1.0
       broadcast 192.168.1.255
       gateway 192.168.1.1

The last section is the most important, the top may or may not be the same
so don't play with it unless you get an error. In this case the IP of the
server is 192.168.1.10 so if you run it as a DNS server for example, you can
set that in your router's config and not worry about it changing.

To apply this configuration type /etc/init.d/networking restart

You'll get a message that it's restarting the network interface, then you'll
get booted off ssh (because the IP changed) so reconnect using the new IP
and it should work.

Hope this Helps

Ron


-----Original Message-----
From: Michael Phillips [mailto:linux478 at yahoo.com]
Sent: Tuesday, July 12, 2005 12:03 PM
To: nflug at nflug.org
Subject: Debian static ip address


On a Debian system, how do you setup a static ip address?  I am using
ddclient
to keep track of my external ip address.  I have my route setup for port
forwarding.  The problem is my debian system is not keeping an ip address.
Any
help would be appreciated.

Michael

Michael D. Phillips - A computer science enthusiast
I do not hate Windows, I just like the alternatives better.
Linux is my primary choice.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the nflug mailing list