Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

/etc/network/interfaces looks like this:

auto lo eth0

iface lo inet loopback
iface eth0 inet static
address 192.168.15.148
netmask 225.225.225.0
network 192.168.15.0

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

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

Your netmask should be 255.255.255.0 not 225.225.225.0

share|improve this answer
    
which netmasks are allowed? –  Ali Amiri May 6 '13 at 5:34
1  
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
add comment

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 192.168.15.148/24
 192.168.1.0/255.255.255.0  
$ netmask -c 192.168.15.148/225.225.225.0
 netmask: invalid mask 0xe1e1e100 from "225.225.225.0"

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

$ netmask -r 192.168.15.148/30
 192.168.15.148-192.168.15.151  (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
add comment

Your Answer

 
discard

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.