Gentoo Archives: gentoo-user

From: "J. Roeleveld" <joost@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Set the alias of an interface with netifrc
Date: Sat, 19 Jan 2019 15:45:55
Message-Id: 4164736.ehQPRTFu4i@eve
In Reply to: Re: [gentoo-user] Set the alias of an interface with netifrc by Alarig Le Lay
1 On Saturday, January 19, 2019 3:36:15 PM CET Alarig Le Lay wrote:
2 > Hi,
3 >
4 > On sam. 19 janv. 12:02:20 2019, J. Roeleveld wrote:
5 > > Not sure if you can use spaces in the name, but I have the following:
6 > >
7 > > $ cat /etc/conf.d/net
8 > > #config_eno1="dhcp"
9 > >
10 > > config_eno1="null"
11 > > vlans_eno1="10 15"
12 > > vlan10_name="adm"
13 > > vlan15_name="str"
14 > > rc_net_adm_need="net.eno1"
15 > > rc_net_str_need="net.eno1"
16 > > config_adm="10.55.16.44 netmask 255.255.255.0 broadcast 10.55.16.255"
17 > > routes_adm="default gw 10.55.16.68"
18 > > config_str="10.30.15.44 netmask 255.255.255.0 broadcast 10.30.15.255"
19 > >
20 > > For this to work, configured the init-scripts as:
21 > >
22 > > $ ls -l /etc/init.d/net.*
23 > > lrwxrwxrwx 1 root root 6 Jun 16 2016 /etc/init.d/net.adm -> net.lo
24 > > lrwxrwxrwx 1 root root 6 Jun 15 2016 /etc/init.d/net.eno1 -> net.lo
25 > > -rwxr-xr-x 1 root root 18514 Mar 2 2018 /etc/init.d/net.lo
26 > > lrwxrwxrwx 1 root root 6 Jun 16 2016 /etc/init.d/net.str -> net.lo
27 > >
28 > > And only have to add "net.adm" and "net.str" to the runlevel.
29 >
30 > I don’t want to change the name of my interfaces, but the equivalent of
31 > `ip link set ${if} alias "${whatever}"`.
32
33 Not sure if that is actually "supported" by netifrc.
34 You could add these commands in a postup() block.
35
36 Is there a specific benefit for just setting an "alias" like this?
37
38 --
39 Joost

Replies

Subject Author
Re: [gentoo-user] Set the alias of an interface with netifrc Alarig Le Lay <alarig@××××××××××.fr>