NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/48945: CARP preempt is not working



On Tue, Jun 24, 2014 at 09:05:00AM +0000, netbsd%seirios.org@localhost wrote:
> >Number:         48945
> >Category:       kern
> >Synopsis:       CARP preempt is not working
> >Confidential:   no
> >Severity:       serious
> >Priority:       high
> >Responsible:    kern-bug-people
> >State:          open
> >Class:          sw-bug
> >Submitter-Id:   net
> >Arrival-Date:   Tue Jun 24 09:05:00 +0000 2014
> >Originator:     HEO SeonMeyong
> >Release:        NetBSD 6.1 stable
> >Organization:
> >Environment:
> NetBSD slb001 6.1_STABLE NetBSD 6.1_STABLE (XEN3_DOMU) #0: Tue Jun 24 
> 15:16:34 JST 2014  
> seirios@dev001:/export/NetBSD/src-rel/sys/arch/amd64/compile/XEN3_DOMU amd64
> >Description:
> - CARP preempt is not working.
> 
> 1. Environment
> There are two NetBSD router (on XenServer)
> - Kernel is XEN3_DOMU + with followings.
>       pseudo-device   carp                    # Common Address Redundancy 
> Protocol
>       options         BRIDGE_IPF              # bridge uses IP/IPv6 pfil 
> hooks too
>       pseudo-device   pf                      # PF packet filter
>       pseudo-device   pflog                   # PF log if
> The Router has two Interfaces connect to Net-A and Net-B
> Router-A(rt-A)'s xennet0 and Router-B(rt-B)'s xennet0 is connect to Net-A
> Router-A(rt-A)'s xennet1 and Router-B(rt-B)'s xennet1 is connect to Net-B
> 
> 2. Configuration
> Both Router is configured followings.
>       sysctl net.inet.ip.forwarding=1
>       sysctl net.inet.carp.allow=1
>       sysctl net.inet.carp.preempt=1
>       sysctl net.inet.carp.log=1
> 
> rt-A
>       ifconfig xennet0 inet 192.0.2.2/24
>       ifconfig carp0 vhid 200 advbase 1 advskew 100 pass testTEST 192.0.2.1/24
>       ifconfig xennet1 inet 198.51.100.2/24
>       ifconfig carp1 vhid 201 advbase 1 advskew 100 pass TESTtest 
> 198.51.100.1/24
> 
> rt-B
>       ifconfig xennet0 inet 192.0.2.3/24
>       ifconfig carp0 vhid 200 advbase 1 advskew 100 pass testTEST 192.0.2.1/24
>       ifconfig xennet1 inet 198.51.100.3/24
>       ifconfig carp1 vhid 201 advbase 1 advskew 100 pass TESTtest 
> 198.51.100.1/24
> 
> 3. How NOT works
>   - Initial rt-A's carp0 and carp1 is MASTER / rt-B's carp0 and carp1 is 
> BACKUP
>   - run "ifconfig carp0 down" on rt-A
>   - rt-A's carp0's state change to INIT but carp1's state is still MASTER
>   - rt-B's carp0's state change to MASTER but carp1's state is still MASTER
> 
> I think this behavior is bug. rt-A's carp1's state is change to BACKUP when 
> CARP preempt=1

No, I think it's correct. Preemption does indeed work (I have a similiar setup,
but with ~30 interfaces) and the backup router does take the traffic
if one of the master's interface goes down.
rt-A's carp1 is still master because the CARP protocol says it should
still be master (carp0 would remain master too if you disconnected the
interface from the brdige in dom0 instead of taking it down). preemp
only force backup->master transition but not the other way round
(that would be dangerous, you could end up with all interfaces in backup state
on both routers).

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index