I have had this problem before where two systems each claim to be master on only one of the shared subnets. My problem was one system had an alias on the carp iface that the other did not. Do an ifconfig of the physical ifaces and the carp iface on each box, so it shows all the configured aliases. Your dump is showing some source addrs that do not appear in the config you submitted for inspection.

mismatched addresses and netmasks can create the situation I believe you are describing.

Dummy Dummy wrote:
Hi OpenBSDers!

We have two 4.0 box that we are planning to use as a HA firewall.
While setting it up, we encounter a problem where the interface
doesn't know how to go into a backup state and stayed as master.

Both boxes have the same hardware, connected to the same subnet.
When doing a tcpdump on the physical interface, both boxes can
see the carp advertisements but they don't seem to be responding to it.

There are four other interfaces on the same box, and they're all
behaving as expected (ie. when one's master, one'll be backup and
vice versa).  We've ran out of ideas on why this is and need some
expert opinion. Have anyone seen this before?

Thanks in advance...

Here is the configuration of the box A:
# ifconfig em0
em0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:04:23:c1:fe:4a
        description: World core switch uplink
        media: Ethernet 100baseTX full-duplex
        status: active
        inet 192.168.108.5 netmask 0xffffff00 broadcast 192.168.108.255
        inet6 fe80::204:23ff:fec1:fe4a%em0 prefixlen 64 scopeid 0x1
# ifconfig carp0
carp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:00:5e:00:01:04
        carp: MASTER carpdev em0 vhid 4 advbase 1 advskew 100
        groups: carp
        inet6 fe80::200:5eff:fe00:104%carp0 prefixlen 64 scopeid 0xa
        inet 192.168.108.2 netmask 0xffffff00 broadcast 192.168.108.255
# tcpdump -nvvv -r /tmp/em0.5.tr proto carp
15:16:46.006407 carp 192.168.108.4 > 224.0.0.18: CARPv2-advertise 36: vhid=4
advbase=1 advskew=50 demote=0 (DF) (ttl 255, id 9319, len 56)
15:16:47.088866 carp 192.168.108.6 > 224.0.0.18: CARPv2-advertise 20:
vhid=80 advbase=3 advskew=150 demote=0 [tos 0xc0] (ttl 255, id 60466, len
40)
15:16:47.216383 carp 192.168.108.4 > 224.0.0.18: CARPv2-advertise 36: vhid=4
advbase=1 advskew=50 demote=0 (DF) (ttl 255, id 17369, len 56)
15:16:48.426361 carp 192.168.108.4 > 224.0.0.18: CARPv2-advertise 36: vhid=4
advbase=1 advskew=50 demote=0 (DF) (ttl 255, id 20131, len 56)
15:16:48.784260 carp 192.168.108.5 > 224.0.0.18: CARPv2-advertise 36: vhid=4
advbase=1 advskew=100 demote=0 (DF) [tos 0x10] (ttl 255, id 56385, len 56)
15:16:49.636337 carp 192.168.108.4 > 224.0.0.18: CARPv2-advertise 36: vhid=4
advbase=1 advskew=50 demote=0 (DF) (ttl 255, id 6185, len 56)
15:16:50.091449 carp 192.168.108.6 > 224.0.0.18: CARPv2-advertise 20:
vhid=80 advbase=3 advskew=150 demote=0 [tos 0xc0] (ttl 255, id 38698, len
40)
15:16:50.194262 carp 192.168.108.5 > 224.0.0.18: CARPv2-advertise 36: vhid=4
advbase=1 advskew=100 demote=0 (DF) [tos 0x10] (ttl 255, id 34793, len 56)
15:16:50.846313 carp 192.168.108.4 > 224.0.0.18: CARPv2-advertise 36: vhid=4
advbase=1 advskew=50 demote=0 (DF) (ttl 255, id 31704, len 56)
15:16:51.604272 carp 192.168.108.5 > 224.0.0.18: CARPv2-advertise 36: vhid=4
advbase=1 advskew=100 demote=0 (DF) [tos 0x10] (ttl 255, id 62842, len 56)
15:16:52.056289 carp 192.168.108.4 > 224.0.0.18: CARPv2-advertise 36: vhid=4
advbase=1 advskew=50 demote=0 (DF) (ttl 255, id 2899, len 56)
15:16:53.014276 carp 192.168.108.5 > 224.0.0.18: CARPv2-advertise 36: vhid=4
advbase=1 advskew=100 demote=0 (DF) [tos 0x10] (ttl 255, id 50211, len 56)
15:16:53.092038 carp 192.168.108.6 > 224.0.0.18: CARPv2-advertise 20:
vhid=80 advbase=3 advskew=150 demote=0 [tos 0xc0] (ttl 255, id 59937, len
40)
15:16:53.274872 carp 192.168.108.4 > 224.0.0.18: CARPv2-advertise 36: vhid=4
advbase=1 advskew=50 demote=0 (DF) [tos 0x10] (ttl 255, id 848, len 56)
# netstat -sp carp
carp:
        232749 packets received (IPv4)
        0 packets received (IPv6)
                0 packets discarded for bad interface
                0 packets discarded for wrong TTL
                0 packets shorter than header
                0 discarded for bad checksums
                0 discarded packets with a bad version
                0 discarded because packet too short
                0 discarded for bad authentication
                0 discarded for bad vhid
                0 discarded because of a bad address list
        54530 packets sent (IPv4)
        0 packets sent (IPv6)
                0 send failed due to mbuf memory error
# netstat -rn | head
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use    Mtu
Interface
default            192.168.108.33     UGS         2    15250      -   em0

Here is the configuration of the box B:
# ifconfig em0
em0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:04:23:c0:da:dc
        description: World core switch uplink 1
        media: Ethernet 100baseTX full-duplex
        status: active
        inet 192.168.108.4 netmask 0xffffff00 broadcast 192.168.108.255
        inet6 fe80::204:23ff:fec0:dadc%em0 prefixlen 64 scopeid 0x1
# ifconfig carp0
carp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:00:5e:00:01:04
        carp: MASTER carpdev em0 vhid 4 advbase 1 advskew 0
        groups: carp
        inet6 fe80::200:5eff:fe00:104%carp0 prefixlen 64 scopeid 0xa
        inet 192.168.108.2 netmask 0xffffff00 broadcast 192.168.108.255
# tcpdump -nvvv -r /tmp/em0.4.tr proto carp
15:16:46.005230 carp 192.168.108.4 > 224.0.0.18: CARPv2-advertise 36: vhid=4
advbase=1 advskew=50 demote=0 (DF) [tos 0x10] (ttl 255, id 9319, len 56)
15:16:47.087852 carp 192.168.108.6 > 224.0.0.18: CARPv2-advertise 20:
vhid=80 advbase=3 advskew=150 demote=0 [tos 0xc0] (ttl 255, id 60466, len
40)
15:16:47.215213 carp 192.168.108.4 > 224.0.0.18: CARPv2-advertise 36: vhid=4
advbase=1 advskew=50 demote=0 (DF) [tos 0x10] (ttl 255, id 17369, len 56)
15:16:48.425204 carp 192.168.108.4 > 224.0.0.18: CARPv2-advertise 36: vhid=4
advbase=1 advskew=50 demote=0 (DF) [tos 0x10] (ttl 255, id 20131, len 56)
15:16:48.808075 carp 192.168.108.5 > 224.0.0.18: CARPv2-advertise 36: vhid=4
advbase=1 advskew=100 demote=0 (DF) [tos 0x10] (ttl 255, id 56385, len 56)
15:16:49.635203 carp 192.168.108.4 > 224.0.0.18: CARPv2-advertise 36: vhid=4
advbase=1 advskew=50 demote=0 (DF) [tos 0x10] (ttl 255, id 6185, len 56)
15:16:50.090435 carp 192.168.108.6 > 224.0.0.18: CARPv2-advertise 20:
vhid=80 advbase=3 advskew=150 demote=0 [tos 0xc0] (ttl 255, id 38698, len
40)
15:16:50.193372 carp 192.168.108.5 > 224.0.0.18: CARPv2-advertise 36: vhid=4
advbase=1 advskew=100 demote=0 (DF) (ttl 255, id 34793, len 56)
15:16:50.845209 carp 192.168.108.4 > 224.0.0.18: CARPv2-advertise 36: vhid=4
advbase=1 advskew=50 demote=0 (DF) [tos 0x10] (ttl 255, id 31704, len 56)
15:16:51.603406 carp 192.168.108.5 > 224.0.0.18: CARPv2-advertise 36: vhid=4
advbase=1 advskew=100 demote=0 (DF) (ttl 255, id 62842, len 56)
15:16:52.055195 carp 192.168.108.4 > 224.0.0.18: CARPv2-advertise 36: vhid=4
advbase=1 advskew=50 demote=0 (DF) [tos 0x10] (ttl 255, id 2899, len 56)
15:16:53.013314 carp 192.168.108.5 > 224.0.0.18: CARPv2-advertise 36: vhid=4
advbase=1 advskew=100 demote=0 (DF) (ttl 255, id 50211, len 56)
15:16:53.091019 carp 192.168.108.6 > 224.0.0.18: CARPv2-advertise 20:
vhid=80 advbase=3 advskew=150 demote=0 [tos 0xc0] (ttl 255, id 59937, len
40)
15:16:53.265194 carp 192.168.108.4 > 224.0.0.18: CARPv2-advertise 36: vhid=4
advbase=1 advskew=50 demote=0 (DF) [tos 0x10] (ttl 255, id 848, len 56)
# netstat -sp carp
carp:
        11008 packets received (IPv4)
        0 packets received (IPv6)
                0 packets discarded for bad interface
                0 packets discarded for wrong TTL
                0 packets shorter than header
                0 discarded for bad checksums
                0 discarded packets with a bad version
                0 discarded because packet too short
                0 discarded for bad authentication
                0 discarded for bad vhid
                0 discarded because of a bad address list
        5437068 packets sent (IPv4)
        0 packets sent (IPv6)
                0 send failed due to mbuf memory error
# netstat -rn | head
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use    Mtu
Interface
default            192.168.108.33     UGS         3 38520537      -   em0

Reply via email to