problems with ifconfig alias via rc.conf

2014-07-16 Thread Jean Paul Galea
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

___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org


Re: problems with ifconfig alias via rc.conf

2014-07-16 Thread Maciej Milewski
On 16.07.2014 11:22, Jean Paul Galea wrote:
 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
Double mask definition?
You are trying to define 94.247.171.197 with mask 32 and then with mask 28.
Remove the /32 from this line and use simple 94.247.171.197 netmask
255.255.255.240 broadcast 94.247.171.207
Alias is defined correctly.

 ifconfig_lagg1=laggproto failover laggport igb2 laggport igb3
 10.0.0.53/32 netmask 255.255.255.0
The same as above.
Better use 10.0.0.53/24 or 10.0.0.53 netmask 255.255.255.0


-- 
Pozdrawiam,
Maciej Milewski

___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org


Re: problems with ifconfig alias via rc.conf

2014-07-16 Thread Jean Paul Galea
On 07/16/2014 12:52 PM, Maciej Milewski wrote:
 Double mask definition?
 You are trying to define 94.247.171.197 with mask 32 and then with mask 28.
 Remove the /32 from this line and use simple 94.247.171.197 netmask
 255.255.255.240 broadcast 94.247.171.207
 Alias is defined correctly.

 The same as above.
 Better use 10.0.0.53/24 or 10.0.0.53 netmask 255.255.255.0

I can't believe it was such a stupid mistake from my end :-)

I guess you could say I had a syntax error ;-)

Sorry for the trouble, and thank you for your time!

Jean Paul

___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org