# [solved] strange eth0 alias problem [warning: drunk posting]

## qubix

Hi!

I can't get my alias eth0:0 interface to work. I use it successfully on a number of gentoo boxes, but I've got a problem only with one of them. What am I doing wrong, what should I check?

/etc/conf.d/net:

```
config_eth0=( "192.168.67.2/24" "192.168.67.3/24" )

routes_eth0=( "default via 192.168.67.1" )

dns_servers_eth0=( "192.168.67.2" )
```

some bash stuff:

```
batou ~ # uname -a

Linux batou 2.6.28-hardened-r9-q #1 SMP Sat Dec 19 12:56:24 CET 2009 i686 Intel(R) Pentium(R) D CPU 3.40GHz GenuineIntel GNU/Linux

batou ~ # ifconfig eth0:0 192.168.67.3  up

SIOCSIFADDR: File exists

SIOCSIFFLAGS: Cannot assign requested address

SIOCSIFFLAGS: Cannot assign requested address

batou ~ # ifcfg eth0 add 192.168.67.3

Forwarding is ON or its state is unknown (5). OK, No RDISC.

RTNETLINK answers: File exists

Error: failed to add 192.168.67.3/24 on eth0.

batou ~ # ifconfig 

eth0      Link encap:Ethernet  HWaddr 00:18:f3:51:ad:80  

          inet addr:192.168.67.2  Bcast:192.168.67.255  Mask:255.255.255.0

          inet6 addr: fe80::218:f3ff:fe51:ad80/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:249336191 errors:0 dropped:0 overruns:0 frame:0

          TX packets:144097392 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:3966216907 (3.6 GiB)  TX bytes:1467365198 (1.3 GiB)

          Interrupt:16 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:1399803 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1399803 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:952258569 (908.1 MiB)  TX bytes:952258569 (908.1 MiB)

batou ~ # lsmod | grep tg3

tg3                   114799  0 

libphy                 27426  1 tg3

```

----------

## aidanjt

Do you have iproute2 installed?

----------

## qubix

yes, I do.

And it's strange - ifcfg is part of iproute2 and gentoo bootscripts (/etc/init.d/net.lo and .eth0) should use iproute to bring up the devices properly...

----------

## aidanjt

I would have thought so too.  Might be a driver issue, can you test with another NIC to double check?

----------

## qubix

sorry, one beer to many today:

```
batou ~ # ip addr show

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo

    inet6 ::1/128 scope host 

       valid_lft forever preferred_lft forever

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000

    link/ether 00:18:f3:51:ad:80 brd ff:ff:ff:ff:ff:ff

    inet 192.168.67.2/24 brd 192.168.67.255 scope global eth0

    inet 192.168.67.3/24 brd 192.168.67.255 scope global secondary eth0

    inet6 fe80::218:f3ff:fe51:ad80/64 scope link 

       valid_lft forever preferred_lft forever

3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000

    link/ether 00:18:f3:51:ad:81 brd ff:ff:ff:ff:ff:ff

```

so it's working... nvm...

----------

## aidanjt

 *qubix wrote:*   

> sorry, one beer to many today:

 

No bother.  We've all had a few of those moments.  :Laughing: 

----------

