Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jul 2014 11:22:32 +0200
From:      Jean Paul Galea <jp@galea.se>
To:        freebsd-net@freebsd.org
Subject:   problems with ifconfig alias via rc.conf
Message-ID:  <954bff7d9b34af15cff55470670ac70c@smtp.hushmail.com>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?954bff7d9b34af15cff55470670ac70c>