Gentoo Archives: gentoo-user

From: 3ric Johanson <ericj@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] conf.d/net aliases using iproute2
Date: Mon, 06 Nov 2006 06:42:03
Message-Id: Pine.LNX.4.64.0611052215510.19110@localhost
1 Hi there,
2
3 As part of my firewall/shorewall config, I'd like to use aliased
4 interfaces.. this is working fine:
5
6 config_eth2=(
7 "x.254.18.119/24"
8 "x.254.18.120/24"
9 "x.254.18.121/24"
10 )
11
12 # ip addr show dev eth2
13 4: eth2: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc cbq qlen 1000
14 link/ether 00:x:27:85:11:x brd ff:ff:ff:ff:ff:ff
15 inet x.254.18.119/24 brd 216.254.18.255 scope global eth2
16 inet x.254.18.120/24 brd 216.254.18.255 scope global secondary eth2
17 inet x.254.18.121/24 brd 216.254.18.255 scope global secondary eth2
18
19 .. this is great. However, in order for me to setup different rules for
20 these incoming sub-interfaces (aliased).. I need to label them using ip
21 route2 commands, such as:
22
23 # ip addr add x.254.18.120/24 brd x.254.18.255 dev eth2 label eth2:1
24
25 How can I have the ifup script create these labeled aliases via ip route2?
26
27 I guess I could pull down the interfaces and add them back by hand or
28 script.. but that seems really ghetto.
29
30 Help?
31
32 Cheers,
33 3ric Johanson
34
35 --
36 gentoo-user@g.o mailing list