# SIOCSIFFLAGS: Cannot assign requested address

## commandline

hi all,

i recently upgrade my gentoo cause my old version was no longer supported.

i noticed that several config files has changed, like network enviroment.

i'm not able to start my eth0 interface, no more.

my network card is a dlink dge-530t and i used to enable sk98lin module in the kernel.

now i read that the new module for my card is sky2 and i added it too...

but when i do:

```
ifconfig eth0 up
```

the response is this post subject:

```
SIOCSIFFLAGS: Cannot assign requested address
```

the strange part is that if i do

```
ifconfig -a
```

i can see that eth0 has the address i choose but the HWaddr is 00:00:00:00:00:00

i'm quite sure that /etc/conf.d/net is ok cause my eth1 interface is up.

i'm searching for a fix but i solve it yet...

thanks for help!

----------

## cach0rr0

can you post your lspci -n output please?

----------

## commandline

sure, thanks:

lspci -n:

```

00:00.0 0600: 8086:1130 (rev 04)

00:01.0 0604: 8086:1131 (rev 04)

00:1e.0 0604: 8086:244e (rev 11)

00:1f.0 0601: 8086:2440 (rev 11)

00:1f.1 0101: 8086:244b (rev 11)

00:1f.2 0c03: 8086:2442 (rev 11)

00:1f.3 0c05: 8086:2443 (rev 11)

00:1f.4 0c03: 8086:2444 (rev 11)

01:00.0 0300: 10de:0110 (rev a1)

02:0a.0 0200: 1148:4320 (rev 10)

02:0c.0 0200: 100b:0020

```

----------

## krinn

This is exactly kind of error funtoo gives, using it ?

----------

## commandline

pardon?

----------

## krinn

well, if you don't know funtoo, then you're not using it  :Very Happy: 

post /etc/conf.d/net

check dmseg for error while loading the module or trying to bring it up ?

----------

## commandline

should i do

```
dmesg | grep error
```

or something else?

----------

## krinn

```
dmesg | grep eth
```

 would be better  :Smile: 

----------

## commandline

meanwhile the /etc/conf.d/net:

```

# /etc/conf.d/net:

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18 19:39:22 azarah Exp $

# Global config file for net.* rc-scripts

# This is basically the ifconfig argument without the ifconfig $iface

#

config_eth0=( "192.168.0.6 netmask 255.255.255.0 brd 192.168.0.255" )

config_eth1=( "192.168.0.7 netmask 255.255.255.0 brd 192.168.0.255" )

# For setting the default gateway

#

routes_eth0=( "default via 192.168.0.1" )

```

eth1 can be loaded without problems...

----------

## cach0rr0

 *commandline wrote:*   

> sure, thanks:
> 
> lspci -n:
> 
> ```
> ...

 

Per the link in my sig, the correct driver is not 'sky2' but rather 'skge'

might be worth investigating at the very least - i dont know to what degree these drivers vary

go back into menuconfig, and look for

```

Symbol: SKGE [=n]                                                                                                   │  

  │ Prompt: New SysKonnect GigaEthernet support                                                                         │  

  │   Defined at drivers/net/Kconfig:2176                                                                               │  

  │   Depends on: NETDEVICES && NETDEV_1000 && PCI                                                                      │  

  │   Location:                                                                                                         │  

  │     -> Device Drivers                                                                                               │  

  │       -> Network device support (NETDEVICES [=y])                                                                   │  

  │         -> Ethernet (1000 Mbit) (NETDEV_1000 [=y])                                                                  │  

  │   Selects: CRC32       

```

----------

## commandline

to be sure, in /etc/modules.autoload/kernel-2.6, i have already put both, sky2 and skge...

----------

## cach0rr0

i wonder if it might have to do with the fact that you don't have a routes_eth1 defined? 

The error doesn't support this claim - but who knows, try adding a route for eth1

EDIT: also, I'm always paranoid about driver conflicts. I would only use the skge driver, and take the sky2 driver out. 

lspci -k should show you which driver the card is using. If it isn't using skge then I'd definitely say let's nuke the sky2 driver and try with only skge available

----------

## commandline

do you think it could be the matter? i'm going to try...

----------

## cach0rr0

Possible. To be perfectly honest I'm not basing any of this on factual knowledge, and am simply going based upon my own experience and "hmm, that doesn't look right!"

----------

## commandline

sorry but... the problem is with eth0, that has route_eth0 configurated

----------

## commandline

...and this is

```
dmesg | grep eth
```

```

Driver 'sd' needs updating - please use bus_type methods

Driver 'sr' needs updating - please use bus_type methods

Driver 'ch' needs updating - please use bus_type methods

natsemi eth0: NatSemi DP8381[56] at 0xed000000 (0000:02:0c.0), 00:09:5b:20:20:87, IRQ 11, port TP.

udev: renamed network interface eth0 to eth1

skge 0000:02:0a.0: bad (zero?) ethernet address in rom

skge eth0: addr 00:00:00:00:00:00

eth1: DSPCFG accepted after 0 usec.

eth1: link up.

eth1: Setting full-duplex based on negotiated link capability.

```

----------

## cach0rr0

```

natsemi eth0: NatSemi DP8381[56] at 0xed000000 (0000:02:0c.0), 00:09:5b:20:20:87, IRQ 11, port TP.

udev: renamed network interface eth0 to eth1

```

reckon we have a udev rule burning us?

what is:

```

cat /etc/udev/rules.d/70-persistent-net.rules 

```

----------

## commandline

```
cat /etc/udev/rules.d/70-persistent-net.rules
```

```
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:09:5b:20:20:87", NAME="eth1"
```

----------

## cach0rr0

weird. the rule is doing exactly as prescribed, taking that MAC, and giving it eth1.  see if commenting that out and rebooting gives you any joy, I don't like that it's starting off as eth0 and being realiased as eth1.

----------

## krinn

looks like your card don't have a valid (or already used) mac address

you may try that (with skge drive, i don't know if skin98 would agree with that, oh and also, try rmmod sklin98 && modrpobe skge to be sure just one is loaded)

```
ifconfig eth0 192.168.0.6 hw ether 00:90:f5:30:41:71 
```

----------

## cach0rr0

 *krinn wrote:*   

> looks like your card don't have a valid (or already used) mac address
> 
> you may try that (with skge drive, i don't know if skin98 would agree with that, oh and also, try rmmod sklin98 && modrpobe skge to be sure just one is loaded)
> 
> ```
> ...

 

basically I'm looking at this

```

natsemi eth0: NatSemi DP8381[56] at 0xed000000 (0000:02:0c.0), 00:09:5b:20:20:87, IRQ 11, port TP.

udev: renamed network interface eth0 to eth1 

```

which is *exactly* what we would expect with such a udev rule

```

SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:09:5b:20:20:87", NAME="eth1"
```

(note the matching MAC)

now, not being an expert on udev, my guess is the kernel wants the natsemi interface to be eth0, but udev wants it to be eth1

so if we remove (by commenting out) that udev rule, natsemi can stay on eth0, and skge can have eth1

----------

## krinn

cach0rr0, basically it just do what we expect it to do, so i'm more worried by

 *commandline wrote:*   

> 
> 
> ```
> 
> skge 0000:02:0a.0: bad (zero?) ethernet address in rom
> ...

 

maybe that is related to your guess that kernel don't like udev swapping cards, 2 ways to dig for him  :Razz: 

----------

## Mike Hunt

Have a look here

----------

## commandline

goodmorning.

i tried all your advices but then i realized...

could the source of the problem be that i'm trying to assign two ip addresses that belong to the same ip class?

i tried to use two different classes, 192.168.0.100 and 10.0.0.100 and it works (enough).

well, i still have an issue:

1) at boot it continues to claim: 

```
SIOCSIFFLAGS: Cannot assign requested address
```

2) at prompt ifconfig displays that eth1 hardware address is still zero;

3) command: 

```
ifconfig eth1 10.0.0.100 hw ether 00:90:f5:30:41:71
```

 again says: 

```
SIOCSIFFLAGS: Cannot assign requested address
```

4) and if i immediately repeat: 

```
ifconfig eth1 10.0.0.100 hw ether 00:90:f5:30:41:71
```

 it finally works...

i'm a little bit astonished...  :Confused: 

----------

## commandline

a little up...  :Idea: 

----------

## commandline

another little up...

a summery:

to make my eth1 work i have to assign the hardware address, i need to put in /etc/conf.d/local.start

```

ifconfig eth1 10.0.0.1 hw ether 00:90:f5:30:41:71

ifconfig eth1 10.0.0.1 hw ether 00:90:f5:30:41:71

```

twice!

no way to avoid this?

a skge module bug?

thanks...

----------

