No advertisements from CARP master

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

No advertisements from CARP master

Dev Op
Hello, collegues!

In vlan2 I have 4 routers: rt1 (master) and rt2 (slave) grouped into VHID
50 in terms of CARP; rt3 (master) and rt4 (slave) grouped into VHID 2. Why
don't I see carp advertisements from rt1? Instead, I see carp announcements
only from rt3 (vhid2). Where am I wrong?

rt1:

-> % ifconfig carp2 | grep -v inet
carp2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:00:5e:00:01:32
        description: Interlink
        index 5 priority 15 llprio 3
        carp: MASTER carpdev vlan2 vhid 50 advbase 1 advskew 0
        groups: carp
        status: master
ks1@rt1 [05:44:47] [~]
-> % sudo tcpdump -c 10 -ni carp2 proto carp
tcpdump: listening on carp2, link-type EN10MB
05:44:54.003157 CARPv2-advertise 36: vhid=2 advbase=1 advskew=0 demote=0
(DF) [tos 0x10]
05:44:55.003217 CARPv2-advertise 36: vhid=2 advbase=1 advskew=0 demote=0
(DF) [tos 0x10]
05:44:56.003236 CARPv2-advertise 36: vhid=2 advbase=1 advskew=0 demote=0
(DF) [tos 0x10]
05:44:57.003276 CARPv2-advertise 36: vhid=2 advbase=1 advskew=0 demote=0
(DF) [tos 0x10]
05:44:58.003313 CARPv2-advertise 36: vhid=2 advbase=1 advskew=0 demote=0
(DF) [tos 0x10]
05:44:59.003354 CARPv2-advertise 36: vhid=2 advbase=1 advskew=0 demote=0
(DF) [tos 0x10]
05:45:00.003398 CARPv2-advertise 36: vhid=2 advbase=1 advskew=0 demote=0
(DF) [tos 0x10]
05:45:01.003431 CARPv2-advertise 36: vhid=2 advbase=1 advskew=0 demote=0
(DF) [tos 0x10]
05:45:02.003475 CARPv2-advertise 36: vhid=2 advbase=1 advskew=0 demote=0
(DF) [tos 0x10]
05:45:03.003512 CARPv2-advertise 36: vhid=2 advbase=1 advskew=0 demote=0
(DF) [tos 0x10]
ks1@rt1 [05:45:03] [~]
-> % sysctl net.inet.carp
net.inet.carp.allow=1
net.inet.carp.preempt=1
net.inet.carp.log=2
ks1@rt1 [05:46:40] [~]
-> % uname -r
6.8
ks1@rt1 [05:57:11] [~]
-> % sudo sysctl net.inet.carp.log=7
net.inet.carp.log: 2 -> 7
ks1@rt1 [05:57:25] [~]
-> % tail -f /var/log/messages
Feb 20 05:57:57 border1 /bsd: carp2: ip_output failed: 13
Feb 20 05:57:58 border1 /bsd: carp2: ip_output failed: 13
Feb 20 05:57:59 border1 /bsd: carp2: ip_output failed: 13
Feb 20 05:58:00 border1 /bsd: carp2: ip_output failed: 13
Feb 20 05:58:01 border1 /bsd: carp2: ip_output failed: 13
...

I don't know what it means. Do I understand correctly that there can be
only one master in the multicast domain that can send carp advertisements?
Thanks.

Regards,
Den
Reply | Threaded
Open this post in threaded view
|

Re: No advertisements from CARP master

Stuart Henderson
On 2021-02-20, Dev Op <[hidden email]> wrote:

> Hello, collegues!
>
> In vlan2 I have 4 routers: rt1 (master) and rt2 (slave) grouped into VHID
> 50 in terms of CARP; rt3 (master) and rt4 (slave) grouped into VHID 2. Why
> don't I see carp advertisements from rt1? Instead, I see carp announcements
> only from rt3 (vhid2). Where am I wrong?
>
> rt1:
>
> -> % ifconfig carp2 | grep -v inet
> carp2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>         lladdr 00:00:5e:00:01:32
>         description: Interlink
>         index 5 priority 15 llprio 3
>         carp: MASTER carpdev vlan2 vhid 50 advbase 1 advskew 0
>         groups: carp
>         status: master
> ks1@rt1 [05:44:47] [~]
> -> % sudo tcpdump -c 10 -ni carp2 proto carp
> tcpdump: listening on carp2, link-type EN10MB
> 05:44:54.003157 CARPv2-advertise 36: vhid=2 advbase=1 advskew=0 demote=0
> (DF) [tos 0x10]
> 05:44:55.003217 CARPv2-advertise 36: vhid=2 advbase=1 advskew=0 demote=0
> (DF) [tos 0x10]
> 05:44:56.003236 CARPv2-advertise 36: vhid=2 advbase=1 advskew=0 demote=0
> (DF) [tos 0x10]
> 05:44:57.003276 CARPv2-advertise 36: vhid=2 advbase=1 advskew=0 demote=0
> (DF) [tos 0x10]
> 05:44:58.003313 CARPv2-advertise 36: vhid=2 advbase=1 advskew=0 demote=0
> (DF) [tos 0x10]
> 05:44:59.003354 CARPv2-advertise 36: vhid=2 advbase=1 advskew=0 demote=0
> (DF) [tos 0x10]
> 05:45:00.003398 CARPv2-advertise 36: vhid=2 advbase=1 advskew=0 demote=0
> (DF) [tos 0x10]
> 05:45:01.003431 CARPv2-advertise 36: vhid=2 advbase=1 advskew=0 demote=0
> (DF) [tos 0x10]
> 05:45:02.003475 CARPv2-advertise 36: vhid=2 advbase=1 advskew=0 demote=0
> (DF) [tos 0x10]
> 05:45:03.003512 CARPv2-advertise 36: vhid=2 advbase=1 advskew=0 demote=0
> (DF) [tos 0x10]
> ks1@rt1 [05:45:03] [~]
> -> % sysctl net.inet.carp
> net.inet.carp.allow=1
> net.inet.carp.preempt=1
> net.inet.carp.log=2
> ks1@rt1 [05:46:40] [~]
> -> % uname -r
> 6.8
> ks1@rt1 [05:57:11] [~]
> -> % sudo sysctl net.inet.carp.log=7
> net.inet.carp.log: 2 -> 7
> ks1@rt1 [05:57:25] [~]
> -> % tail -f /var/log/messages
> Feb 20 05:57:57 border1 /bsd: carp2: ip_output failed: 13
> Feb 20 05:57:58 border1 /bsd: carp2: ip_output failed: 13
> Feb 20 05:57:59 border1 /bsd: carp2: ip_output failed: 13
> Feb 20 05:58:00 border1 /bsd: carp2: ip_output failed: 13
> Feb 20 05:58:01 border1 /bsd: carp2: ip_output failed: 13
> ...

$ grep 13 /usr/include/sys/errno.h
#define EACCES 13 /* Permission denied */

Check that your PF rules allow sending carp's multicast packets.

> I don't know what it means. Do I understand correctly that there can be
> only one master in the multicast domain that can send carp advertisements?
> Thanks.

All carp hosts send advetisements, whether they're primary or backup.