You are not logged in.
Hi,
Sometimes, when I try to force a static address to my ethernet card, I've got a strange error (SIOCSIFNETMASK: Cannot assign requested address) but, even with this error, my address is working well... For example:
$sudo ifconfig eth0 10.0.0.1/24
SIOCSIFNETMASK: Cannot assign requested address
$ ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
64 bytes from 10.0.0.1: icmp_req=1 ttl=64 time=0.024 ms
64 bytes from 10.0.0.1: icmp_req=2 ttl=64 time=0.040 ms
64 bytes from 10.0.0.1: icmp_req=3 ttl=64 time=0.045 ms
...
Someone has an idea about this strange error ?
Thanks !
EDIT: there was the same bug in ubuntu (https://bugs.launchpad.net/ubuntu/+bug/159460)
Last edited by oliparcol (2011-03-12 19:53:54)
Offline
You are providing an incorrect subnet mask.
/24 really means 255.255.255.0, which is the mask for a class C address (eg. 192.168.0.x)
Since you are using a class A address (10.0.0.x) you really want a subnet mask of 255.0.0.0 (which is /8).
Offline
You are providing an incorrect subnet mask.
/24 really means 255.255.255.0, which is the mask for a class C address (eg. 192.168.0.x)
Since you are using a class A address (10.0.0.x) you really want a subnet mask of 255.0.0.0 (which is /8).
That isn't true. VLSM and CIDR?
We have 10.25.0.0/16 assigned to us at work, from our isp (isp does nat for us). I use a 10.20.1.0/24 at home.
@OP I'm not sure of your problems, That should work, Does dmesg show anything?
Offline
My bad, to explain further:
/8 is the default mask for the 10.0.0.x private network which provides the full range of addresses.
Using /24 will only provide 10.0.0.1 to 10.0.0.254. Your static IPs must all be within this range for the mask to be valid.
Offline
it's not true, the /24 will constraint the lan to this type of addresses: 10.0.0.x but and address of this type: 10.1.2.x will work too...
Anyway, it's not the problem because the classfull ip system is not longer used (http://en.wikipedia.org/wiki/Classful_n … of_classes) and I'm getting this error with these type of IP too:
$ sudo ifconfig eth0 192.168.0.1/24
SIOCSIFNETMASK: Cannot assign requested address
Last edited by oliparcol (2011-03-13 16:01:52)
Offline
nobody has the same problem ? I've got this on my two computers which are running arch...
Offline
I have the same problem, and i don't know what it happened.
But when i change my cmd to ifconfig eth0:0 192.168.0.101 netmask 255.255.255.0 up,
It works!
Last edited by felix125 (2011-08-02 17:58:20)
Offline
I think the best solution is to use iproute2
# ip addr add 192.168.1.1 dev eth0
No more warning...
Offline