# Aliases on VLAN interfaces

## nullguid

Hello, maybe I'm doing something wrong, but:

I need three aliases on eth0.505 vlan interfaces, I did this entry into /etc/conf.d/net:

```

config_eth0_505=(

        "217.116.53.13/24"

        "217.116.53.14/32"

        "217.116.53.1/32"

)

```

But upon startup I just get "217.116.53.13/24" and one alias: "217.116.53.1/32"

What's wrong? I cannot mess with net.eth0 code right now - feeling depressed when just looking at it.

----------

## UberLord

See, thanks to the mindset of ifconfig everyone is so obsessed with "aliases". Don't think alias, think more addresses on one interface.

Once you start think that you start thinking "Why is ifconfig only showing me one address?". The answer is to use iproute2 like so

```
ip addr show label eth0.505

ip addr show dev eth0

ip addr show
```

See?

----------

## nullguid

Hey, I'm not so stupid  :Wink: 

That's that I need (and get with 

```
ifconfig eth0.505 add 217.116.53.14
```

):

```

eth0.505  Link encap:Ethernet  HWaddr 00:0E:0C:07:D9:7C

          inet addr:217.116.53.13  Bcast:217.116.53.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:0

          RX bytes:13186629 (12.5 Mb)  TX bytes:18747675 (17.8 Mb)

eth0.505: Link encap:Ethernet  HWaddr 00:0E:0C:07:D9:7C

          inet addr:217.116.53.14  Bcast:217.116.53.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:0

          RX bytes:13186629 (12.5 Mb)  TX bytes:18747675 (17.8 Mb)

eth0.505: Link encap:Ethernet  HWaddr 00:0E:0C:07:D9:7C

          inet addr:217.116.53.1  Bcast:217.116.53.255  Mask:255.255.255.255

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:0

          RX bytes:13186629 (12.5 Mb)  TX bytes:18747675 (17.8 Mb)

```

Upon startup, the second entry is missing.

----------

## nullguid

I need three addresses on interface, what am I doing wrong with /etc/conf.d/net ? (or what is gentoo doing wrong)

----------

## UberLord

emerge iproute2

and be done with it!

----------

## nullguid

Ah, thanks, now I set that I either don't understand ifconfig or it doesn't work properly.

----------

## nullguid

Just found that ifconfig is meant to obsolete. OMG

----------

## UberLord

Oh it's simple - ifconfig requires aliases for >1 address per interface. And you can only alias physical interfaces, not virtual ones like vlan.

iproute2 gets around this limitation, so if everyone just stopped thinking alias then we'ed all get long just nicely.

baselayout does the best it can with ifconfig, but it can do so much more with iproute2 we now prefer it in baselayout-1.12

----------

