Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

/etc/network/interfaces looks like this:

auto lo eth0

iface lo inet loopback
iface eth0 inet static

I'm using ubuntu and trying to set a static IP. Any ideas on what the problem could be?

share|improve this question
up vote 5 down vote accepted

Your netmask should be not

share|improve this answer
which netmasks are allowed? – Lrrr May 6 '13 at 5:34
netmasks must be on bit-boundaries, with all 1's to the left and all 0's to the right (in binary, of course). – pjz May 6 '13 at 15:05

Look like you are on Debian based distribution.

There is a tool called netmask:

sudo apt-get install netmask

Useful to figure the netmask when you are using CIDR or even Cisco netmask. It detect wrong netmask as well:

$ netmask -s  
$ netmask -c
 netmask: invalid mask 0xe1e1e100 from ""

Quicker than reading a netmask table, it show the range of available IP in a network:

$ netmask -r  (4)
share|improve this answer
That's only a sort of related answer, isn't it? I mean, it leads to the right answer, but it's circuitous. – Bill Weiss Jul 15 '10 at 20:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.