I'm trying to configure my Debian machine (Lenny) to use a static ip address. Here's what my interfaces file currently looks like:

# This file describes the network interfaces available on your system.
# and how to activate them. For more information, see interfaces

#The loopback network interface
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static

Here's what I've done. I went in to my router settings and changed it's dynamic ip range to to So I could use anything above 100 as my static address. Then I came in to the interfaces file and edited to what you see above. I set the address to be because that's out of the range that's reserved for dynamic addresses by my router and I also set the network to because that's the ip address of my router.

I'm not sure what i'm getting wrong but I have no connection to the internet. I'm not sure i've got the right IP addresses.

Any ideas?

2 Answers 2


You should add "gateway" and change the network entry to "network".

  • Actually, he can go ahead and get rid of the network statement. It is only required for ancient kernels.
    – Jason Berg
    Jul 24, 2010 at 18:38
  • Hi, Thanks for the reply. I've done what you suggested. restarted the machine and noticed that on startup there was a message saying: configuring network interfaces..../etc/network/interfaces:11: duplicate interfaces Ifup: Couldn't read interfaces file "/etc/network/interfaces" So i went in to the network dirctory did a ls -a and there was a file called interfaces~ with exactly the same content. I removed it and re-booted but still have this message on startup. Double checked and there's only one interfaces file with the correct text in it. Any ideas?
    – elduderino
    Jul 24, 2010 at 18:57
  • whoops my bad. Somehow an extra line of text was in the file iface eth0 inet static It works now :) Thanks
    – elduderino
    Jul 24, 2010 at 19:15

Add the below configuration also.

Open /etc/resolv.conf. In it use the nameserver directive to specify your name server(s). The nameserver directive(s) will be searched in the order entered here. Here is an example: nameserver nameserver

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .