FRRouting / frr

The FRRouting Protocol Suite
https://frrouting.org/
Other
3.36k stars 1.25k forks source link

FRR does not accept routes when peer AS same as Sub-AS within a confederation #17125

Open rsingha108 opened 4 weeks ago

rsingha108 commented 4 weeks ago

Description

I have an Exabgp and two FRR routers (frr1 & frr2) connected in series. If frr1 is in Sub-AS 3001 within confederation AS 30, and frr2 is in AS 3001 not within any confederation, then route is not advertised to frr2. i.e. if the peer AS and confederation sub AS becomes same, then route is not advertised.

Version

FRR version 10.1

How to reproduce

Topology:

exabgp (3.0.0.3) ----- (3.0.0.2) frr1 (4.0.0.2) ----- (4.0.0.3) frr2
[AS 40]                [confedAS 30, subAS 3001]              [AS 3001]  

Exabgp Configuration:

process announce-routes {
    run python exabgp/example.py;
    encoder json;
}

neighbor 3.0.0.2 {                 # Remote neighbor to peer with
    router-id 3.0.0.3;              # Our local router-id
    local-address 3.0.0.3;          # Our local update-source
    local-as 40;                    # Our local AS
    peer-as 30;                     # Peer's AS

    api {
        processes [announce-routes];
    }
}

And I am sending the following route using ExaBGP:

announce route 100.10.0.0/24 next-hop self as-path [1 2]

Configuration of router frr1:


log file /var/log/frr/bgpd.log
debug bgp updates

router bgp 3001 

  bgp confederation identifier 30  

  no bgp ebgp-requires-policy

  neighbor 3.0.0.3 remote-as 40

  neighbor 4.0.0.3 remote-as 3001

  neighbor 3.0.0.3 soft-reconfiguration inbound

  neighbor 4.0.0.3 soft-reconfiguration inbound

  network 3.0.0.0

  network 4.0.0.0

Configuration of router frr2:

log file /var/log/frr/bgpd.log
debug bgp updates

router bgp 3001

  no bgp ebgp-requires-policy

  neighbor 4.0.0.2 remote-as 30

  neighbor 4.0.0.2 soft-reconfiguration inbound

  network 4.0.0.0

Expected behavior

As only frr1 is within a confederation, and frr2 is external, frr2 should not see the subAS of frr1, but it should see AS of frr1 same as the confederation AS i.e. 30

So it is expected that frr2 will receive the route from frr1 and the as-path will be appended by 30

Actual behavior

frr2 doesn't receive the route.

Additional context

No response

Checklist

ton31337 commented 3 weeks ago

I tested (master branch) with your configuration (similar):

exabgp:

router bgp 40
 no bgp ebgp-requires-policy
 no bgp network import-check
 neighbor 192.168.1.1 remote-as external
 !
 address-family ipv4 unicast
  network 172.16.255.254/32
 exit-address-family
exit
!

frr1:

router bgp 3001
 no bgp ebgp-requires-policy
 bgp confederation identifier 30
 neighbor 192.168.1.2 remote-as external
 neighbor 192.168.2.2 remote-as internal
exit
!

frr2:

router bgp 3001
 no bgp ebgp-requires-policy
 no bgp network import-check
 neighbor 192.168.2.1 remote-as internal
exit
!

The output from r2 (AS40 is added):

r3# show bgp ipv4 unicast 172.16.255.254/32
BGP routing table entry for 172.16.255.254/32, version 1
Paths: (1 available, best #1, table default)
  Not advertised to any peer
  40
    192.168.2.1 from 192.168.2.1 (192.168.2.1)
      Origin IGP, metric 0, localpref 100, valid, internal, best (First path received)
      Last update: Fri Oct 18 10:34:59 2024
r3# 

This seems correct, could you test at least with the newer versions?

rsingha108 commented 2 weeks ago

I tried your configuration, and I got same results. If Frr1 is in a confederation 30 and subAS 3001 and Frr2 is in As 3001 (no confederation) then Frr2 is not receiving routes from Frr1. But I think Frr2 should receive routes from Frr1 as Frr2 should be unaware of the subASes within the confederation 30. Frr2 should receive routes from Frr1 with AS-path marked with AS 30 (the confederation AS number of Frr1). But I am not seeing that in the RIB of Frr2 even with the latest version of FRR.

Can you tell me what you see in the RIB of Frr2 after running your configuration?

ton31337 commented 2 weeks ago

Sorry, I'm a bit confused now. Is my configuration good enough to verify the issue you see?

rsingha108 commented 1 week ago
  1. I tried your configuration and I am getting the same error. Are you sure your topology is the same as mine? I don't think my "frr1" and "frr2" is same as your "r1" and "r2"
  2. In your reply you wrote "The output from r2 (AS40 is added):" but in the RIB, I see it is "r3".
  3. Do you mean r3 received the route? If so then it should have an AS path of [30 40], why is it receiving only AS 40 in the AS-path?
  4. Given my initial configuration, can you tell me if the output is expected? i.e. when frr1 is part of a confederation and frr2 is not in any confederation, but subAS of frr1 is same as AS of frr2, what is the expected output? Should frr2 receive the route from frr1?
ton31337 commented 9 hours ago

I tried your configuration and I am getting the same error.

What error?

Please show show ip bgp from frr2.