problems with ifconfig alias via rc.conf
Jean Paul Galea
jp at galea.se
Wed Jul 16 09:22:43 UTC 2014
Hello,
Today I ran into a little problem with ifconfig and rc scripts.
I have tried googling this issue, although all I could find, are people
pointing at syntax errors.
Perhaps someone here has ran into this before and could provide some
pointers.
Here is the relevant /etc/rc.conf settings;
defaultrouter="94.247.171.193"
ifconfig_igb0="up"
ifconfig_igb1="up"
ifconfig_igb2="up"
ifconfig_igb3="up"
cloned_interfaces="lagg0 lagg1"
ifconfig_lagg0="laggproto failover laggport igb0 laggport igb1
94.247.171.197/32 netmask 255.255.255.240 broadcast 94.247.171.207"
#ifconfig_lagg0_alias0="inet 94.247.171.195 netmask 255.255.255.255"
ifconfig_lagg1="laggproto failover laggport igb2 laggport igb3
10.0.0.53/32 netmask 255.255.255.0"
#ifconfig_lagg1_alias0="inet 10.0.0.150 netmask 255.255.255.255"
static_routes="vpn"
route_vpn="-net 10.0.8.0/22 10.0.0.1"
In short,
- we have four "real" igb network cards.
- they are paired into lagg0, lagg1 fail-over mode.
- each lagg interface has an alias which by default is disabled.
- static route for vpn traffic.
Today we were doing some maintenance and wanted to enable the aliases.
So after removing the commented out lines from rc.conf, we ran;
~# service netif restart
~# service routing restart
~# service pf restart
Output from `ifconfig` showed the aliases where listening on their
respective interfaces.
However, ping/telnet on 94.247.171.195 failed. At some point we decided
to manually cycle the alias;
~# ifconfig lagg0 -alias 94.247.171.195 netmask 255.255.255.255
~# ifconfig lagg0 alias 94.247.171.195 netmask 255.255.255.255
Which then worked. Output from `ifconfig` was just like before.
Some info;
- we are running FreeBSD 9.2-RELEASE-p10.
- in dmesg we had "ifa_del_loopback_route: deletion failed".
- interestingly enough, the other 10.0.0.150 alias worked just fine.
Perhaps something is mis-configured in /etc/rc.conf? Some argument is
missing in ifconfig_* variables ?
Thanks in advance,
Jean Paul
More information about the freebsd-net
mailing list