Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected behavior with "remove-private-AS all" in config #17543

Open
2 tasks done
rsingha108 opened this issue Dec 2, 2024 · 3 comments
Open
2 tasks done

Unexpected behavior with "remove-private-AS all" in config #17543

rsingha108 opened this issue Dec 2, 2024 · 3 comments
Assignees
Labels
bgp triage Needs further investigation

Comments

@rsingha108
Copy link

Description

Route is not getting advertised properly if "remove-private-AS all" is mentioned in config.

Version

FRR version 10.1

How to reproduce

Topology:

exabgp (3.0.0.3) ----- (3.0.0.2) frr2 (4.0.0.2) ------------ (4.0.0.3) frr3
[AS 65535]          [confedAS 64512, subAS 257]     [confedAS 422, subAS 256] 

Exabgp config:

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 65535;                    # Our local AS
    peer-as 64512;                     # Peer's AS

    api {
        processes [announce-routes];
    }
}
    

And I am sending the following route using ExaBGP:

announce route 100.10.1.0/24 next-hop self 

frr2 config:

router bgp 257  
  no bgp ebgp-requires-policy
  bgp confederation identifier 64512
  neighbor 3.0.0.3 remote-as 65535
  neighbor 4.0.0.3 remote-as 422 remove-private-AS all
exit
!

frr3 config:

router bgp 256
  no bgp ebgp-requires-policy
  bgp confederation identifier 422
  neighbor 4.0.0.2 remote-as 64512
exit
!

Expected behavior

frr3 should receive the route with prefix 100.10.1.0/24

Actual behavior

frr3 is not receiving the route with prefix 100.10.1.0/24

Additional context

If we do not mention "remove-private-AS all" in the config of frr2 then frr3 receives the route with prefix 100.10.1.0/24

Checklist

  • I have searched the open issues for this bug.
  • I have not included sensitive information in this report.
@rsingha108 rsingha108 added the triage Needs further investigation label Dec 2, 2024
@ton31337 ton31337 added the bgp label Dec 2, 2024
@ton31337 ton31337 self-assigned this Dec 2, 2024
@ton31337
Copy link
Member

ton31337 commented Dec 2, 2024

How do you imagine the route should look? With your configuration frr2 has ebgp sessions (both)... If removing private ASNs... aspath is empty, that is not allowed for ebgp sessions.

@rsingha108
Copy link
Author

rsingha108 commented Dec 8, 2024

For this scenario, we get the following results:

  • if both R2 & R3 are FRR routers: R3 doesn't receive the route
  • if both R2 & R3 are GoBGP routers: R3 receives the route with as-path [64512 65535]
  • Testing the same configuration with batfish simulation tool also gives same result as GoBGP.

Why using FRR I am getting different result?

@ton31337
Copy link
Member

ton31337 commented Dec 8, 2024

Maybe it's because GoBGP/Batfish do not follow RFCs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bgp triage Needs further investigation
Projects
None yet
Development

No branches or pull requests

2 participants