Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Aliases on VLAN interfaces
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
nullguid
n00b
n00b


Joined: 15 Jan 2006
Posts: 8
Location: Tyumen, Russia

PostPosted: Thu Jun 01, 2006 8:03 am    Post subject: Aliases on VLAN interfaces Reply with quote

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:

Code:

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.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Jun 01, 2006 8:55 am    Post subject: Reply with quote

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

Code:
ip addr show label eth0.505
ip addr show dev eth0
ip addr show


See?
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
nullguid
n00b
n00b


Joined: 15 Jan 2006
Posts: 8
Location: Tyumen, Russia

PostPosted: Thu Jun 01, 2006 9:06 am    Post subject: Reply with quote

Hey, I'm not so stupid ;)

That's that I need (and get with
Code:
ifconfig eth0.505 add 217.116.53.14
):
Code:

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.
Back to top
View user's profile Send private message
nullguid
n00b
n00b


Joined: 15 Jan 2006
Posts: 8
Location: Tyumen, Russia

PostPosted: Thu Jun 01, 2006 9:09 am    Post subject: Reply with quote

I need three addresses on interface, what am I doing wrong with /etc/conf.d/net ? (or what is gentoo doing wrong)
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Jun 01, 2006 9:37 am    Post subject: Reply with quote

emerge iproute2

and be done with it!
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
nullguid
n00b
n00b


Joined: 15 Jan 2006
Posts: 8
Location: Tyumen, Russia

PostPosted: Thu Jun 01, 2006 10:01 am    Post subject: Reply with quote

Ah, thanks, now I set that I either don't understand ifconfig or it doesn't work properly.
Back to top
View user's profile Send private message
nullguid
n00b
n00b


Joined: 15 Jan 2006
Posts: 8
Location: Tyumen, Russia

PostPosted: Thu Jun 01, 2006 10:03 am    Post subject: Reply with quote

Just found that ifconfig is meant to obsolete. OMG
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Jun 01, 2006 10:03 am    Post subject: Reply with quote

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
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum