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

BGP add path support #247

Closed
natesales opened this issue Jun 26, 2023 · 7 comments
Closed

BGP add path support #247

natesales opened this issue Jun 26, 2023 · 7 comments

Comments

@natesales
Copy link

With add-path receive enabled, rustybgp correctly detects that a peer is advertising the ADD-PATH capability, but doesn't import multiple routes:

Neighbor capabilities:
  multiprotocol:
    ipv4-unicast:   advertised and received
  route-refresh:      received
  graceful-restart:   received
  4-octet-as: advertised and received
  add-path:   received
    Remote:
      ipv4-unicast:  send

Steps to reproduce

  1. Create config file bgp.yml:
global:
  config:
    as: 65530
    router-id: 192.168.90.4
    port: 179

  apply-policy:
    config:
      default-import-policy: accept-route
      default-export-policy: reject-route

neighbors:
  - config:
      peer-as: 65530
      neighbor-address: 192.168.90.1
    add-paths:
      config:
        receive: true
  1. Build and run rustybgp
git clone https://github.com/osrg/rustybgp
cd rustybgp
git reset --hard 9a94087b81679af2304d1523c1bbde822be7010b
cargo build --release
./target/release/rustybgpd -f bgp.yml
  1. gobgp neigh and confirm only ~900k routes received

Using gobgp with the same config works correctly.

@fujita
Copy link
Member

fujita commented Jun 29, 2023

Please use per-family config style like

[[neighbors]]
  [neighbors.config]
    peer-as = 65002
    neighbor-address = "10.0.0.2"
    [[neighbors.afi-safis]]
      [neighbors.afi-safis.config]
        afi-safi-name = "ipv4-unicast"
      [neighbors.afi-safis.add-paths.config]
        receive = true
        send-max = 8

@fujita fujita closed this as completed Jun 30, 2023
@fujita
Copy link
Member

fujita commented Jun 30, 2023

The latest code explicitly returns an error for global add path config.

@natesales
Copy link
Author

Thanks - that config works great on gobgp but not rustybgp. Here's my new full config, which works great and receives additional paths under gobgp, but the same config under rustybgp is stuck in Idle with the peer reporting "required capability missing".

global:
  config:
    as: 34553
    router-id: 192.168.90.4
    port: 179

  apply-policy:
    config:
      default-import-policy: accept-route
      default-export-policy: reject-route

neighbors:
  - config:
      peer-as: 34553
      neighbor-address: 192.168.90.1
    afi-safis:
      - config:
          afi-safi-name: ipv4-unicast
        add-paths:
          config:
            receive: true

@fujita
Copy link
Member

fujita commented Jul 1, 2023

Can you share the pcap file? I need open messages from both (one is rustybgp, and another is what?)

@fujita fujita reopened this Jul 1, 2023
@natesales
Copy link
Author

The remote side is BIRD 2.0.7; admittedly an older version of BIRD, but given GoBGP works correctly I suspect an issue on the rustybgp side. See attached pcap

rustybgp-bird.tar.gz

@fujita
Copy link
Member

fujita commented Jul 1, 2023

Thanks!
I fixed the bug. Can you try the latest master?

@natesales
Copy link
Author

Fantastic, works great now. Thanks for the quick fix!

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

No branches or pull requests

2 participants