You are not logged in.

#1 2009-04-22 17:05:09

daf666
Member
Registered: 2007-04-08
Posts: 470
Website

Bug in Arch/ifconfig?

It seems that it takes two times to set an IP address with a specific netmask using ifconfig (this works the first time in Ubuntu/RedHat).
First attempt sets an IP with an invalid mask (the "Cannot assign requested address" does not always show).
Second attempt gets the mask right:

root@pazuzu /home/daf666 # ifconfig eth1 10.0.0.1/24
SIOCSIFNETMASK: Cannot assign requested address
root@pazuzu /home/daf666 # ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:22:15:15:0A:A4  
          inet addr:10.0.0.1  Bcast:10.255.255.255  Mask:255.0.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:17 

root@pazuzu /home/daf666 # ifconfig eth1 10.0.0.1/24
root@pazuzu /home/daf666 # ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:22:15:15:0A:A4  
          inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:17

This is obviously a bug.. the question is where?

Offline

#2 2009-04-22 22:42:49

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

Re: Bug in Arch/ifconfig?

I'm not sure using a CIDR mask is actually supported is it?  I always do my netmasks as, well, a netmask:

ifconfig eth0 192.168.50.1 netmask 255.255.255.0

Offline

Board footer

Powered by FluxBB