0

/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?

2 Answers 2

6

Your netmask should be 255.255.255.0 not 225.225.225.0

2
  • which netmasks are allowed?
    – Lrrr
    May 6, 2013 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, 2013 at 15:05
0

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)
1
  • 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, 2010 at 20:39

You must log in to answer this question.

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