carp and vlan interfaces recovery issue

Christopher Cowart ccowart at rescomp.berkeley.edu
Fri May 9 18:18:53 UTC 2008


Hello,

I have the following configuration:

box1:/etc/rc.conf:
| ifconfig_bge1="up"
| ifconfig_vlan95="inet 10.9.128.2/20 vlan 95 vlandev bge1"
| ifconfig_carp15="inet 10.9.128.1/32 vhid 15 pass secret advskew 100"
| ifconfig_carp25="inet 10.9.128.1/32 vhid 25 pass secret"

box2:/etc/rc.conf:
| ifconfig_fxp0="up"
| ifconfig_vlan95="inet 10.9.128.3/20 vlan 95 vlandev fxp1"
| ifconfig_carp15="inet 10.9.128.1/32 vhid 15 pass secret"
| ifconfig_carp25="inet 10.9.128.1/32 vhid 25 pass secret advskew 100"

/etc/sysct.conf:
| net.inet.carp.arpbalance=1

Output from ifconfig:

box1:
| carp15: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
|         inet 10.9.128.1 netmask 0xffffffff 
|         carp: BACKUP vhid 15 advbase 1 advskew 100
| carp25: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
|         inet 10.9.128.1 netmask 0xffffffff 
|         carp: MASTER vhid 25 advbase 1 advskew 0

box2:
| carp15: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
|         inet 10.9.128.1 netmask 0xffffffff 
|         carp: MASTER vhid 15 advbase 1 advskew 0
| carp25: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
|         inet 10.9.128.1 netmask 0xffffffff 
|         carp: BACKUP vhid 25 advbase 1 advskew 100

Then, on box 1, I `ifconfig vlan95 down'. Updated output from ifconfig:

box1:
| carp15: flags=8<LOOPBACK> metric 0 mtu 1500
|         inet 10.9.128.1 netmask 0xffffffff 
|         carp: INIT vhid 15 advbase 1 advskew 100
| carp25: flags=8<LOOPBACK> metric 0 mtu 1500
|         inet 10.9.128.1 netmask 0xffffffff 
|         carp: INIT vhid 25 advbase 1 advskew 0

box2:
| carp15: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
|         inet 10.9.128.1 netmask 0xffffffff 
|         carp: MASTER vhid 15 advbase 1 advskew 0
| carp25: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
|         inet 10.9.128.1 netmask 0xffffffff 
|         carp: MASTER vhid 25 advbase 1 advskew 100

Then, on box 1, I `ifconfig vlan95 up'. Again:

box1:
| carp15: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
|         inet 10.9.128.1 netmask 0xffffffff 
|         carp: BACKUP vhid 15 advbase 1 advskew 100
| carp25: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
|         inet 10.9.128.1 netmask 0xffffffff 
|         carp: BACKUP vhid 25 advbase 1 advskew 0

box2:
| carp15: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
|         inet 10.9.128.1 netmask 0xffffffff
|         carp: MASTER vhid 15 advbase 1 advskew 0
| carp25: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
|         inet 10.9.128.1 netmask 0xffffffff
|         carp: MASTER vhid 25 advbase 1 advskew 100

Notice that both carp interfaces are running in "BACKUP" mode on box1,
even after some period of waiting. I would expect things to return to
the initial state. 

If I `tcpdump -i vlan95 vrrp' on both boxes at this point, I see:
| 10:57:20.502188 IP 10.9.128.3 > VRRP.MCAST.NET: VRRPv2, Advertisement, 
|     vrid 15, prio 0, authtype none, intvl 1s, length 36
| 10:57:21.503211 IP 10.9.128.3 > VRRP.MCAST.NET: VRRPv2, Advertisement, 
|     vrid 15, prio 0, authtype none, intvl 1s, length 36
| 10:57:21.537201 IP 10.9.128.3 > VRRP.MCAST.NET: VRRPv2, Advertisement, 
|     vrid 25, prio 100, authtype none, intvl 1s, length 36
| 10:57:22.504234 IP 10.9.128.3 > VRRP.MCAST.NET: VRRPv2, Advertisement, 
|     vrid 15, prio 0, authtype none, intvl 1s, length 36

Note that box1 (10.9.128.2) isn't sending any advertisements. 

If I use the physical interface, not the vlan interface `ifconfig bge1
down' on box1:

box1:
| carp15: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
|         inet 10.9.128.1 netmask 0xffffffff 
|         carp: MASTER vhid 15 advbase 1 advskew 100
| carp25: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
|         inet 10.9.128.1 netmask 0xffffffff 
|         carp: MASTER vhid 25 advbase 1 advskew 0

box2:
| carp16: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
|         inet 10.9.144.1 netmask 0xffffffff 
|         carp: MASTER vhid 16 advbase 1 advskew 0
| carp26: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
|         inet 10.9.144.1 netmask 0xffffffff 
|         carp: MASTER vhid 26 advbase 1 advskew 100

And finally, `ifconfig bge1 up' on box1:

| carp15: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
|         inet 10.9.128.1 netmask 0xffffffff 
|         carp: BACKUP vhid 15 advbase 1 advskew 100
| carp25: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
|         inet 10.9.128.1 netmask 0xffffffff 
|         carp: MASTER vhid 25 advbase 1 advskew 0

Things return to where they should be.

Is this a bug?

-- 
Chris Cowart
Network Technical Lead
Network & Infrastructure Services, RSSP-IT
UC Berkeley
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 825 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20080509/a24553ac/attachment.pgp


More information about the freebsd-net mailing list