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

bgpd: addpath seems not work #17421

Closed
2 tasks done
reonard opened this issue Nov 12, 2024 · 13 comments · Fixed by #17423
Closed
2 tasks done

bgpd: addpath seems not work #17421

reonard opened this issue Nov 12, 2024 · 13 comments · Fixed by #17423
Assignees
Labels

Comments

@reonard
Copy link

reonard commented Nov 12, 2024

Description

I've configured the bgpd to support addPath by adding "maximum-paths", "addpath-tx-all-paths " and "bgp bestpath as-path multipath-relax", but bgpd still advertised only one best selected path (10.xxx.xxx.245) to iBGP neighbor. May i know is there any other configurations should be added so that both 10.xxx.xxx.245 and 10.xxx.xxx.246 could be advertised for the same network 10.xxx.xxx.10/32?

show ip bgp neighbors 10.xxx.xxx.2 advertised-routes detail

> BGP table version is 26, local router ID is 10.xxx.xxx.75, vrf id 0
Default local pref 100, local AS 1102
BGP routing table entry for 10.xxx.xxx.10/32, version 24
Paths: (2 available, best #1, table default)
  1111
    10.xxx.xxx.245 from 10.xxx.xxx.245 (10.xxx.xxx.245)
      Origin IGP, metric 0, valid, external, multipath, best (Older Path)
      AddPath ID: RX 0, TX-All 0 TX-Best-Per-AS 0 TX-Best-Selected 3
      Advertised to: 10.xxx.xxx.2
      Last update: Wed Nov 13 03:13:35 2024
  1111
    10.xxx.xxx.246 from 10.xxx.xxx.246 (10.xxx.xxx.246)
      Origin IGP, metric 0, valid, external, multipath
      AddPath ID: RX 0, TX-All 0 TX-Best-Per-AS 0 TX-Best-Selected 4
      Last update: Wed Nov 13 03:13:35 2024
Total number of prefixes 1

show ip bgp neighbors 10.xxx.xxx.2 advertised-routes

> BGP table version is 28, local router ID is 10.xxx.xxx.75, vrf id 0
Default local pref 100, local AS 1102
Status codes:  s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
     Network          Next Hop            Metric LocPrf Weight Path
 *> 10.xxx.xxx.10/32  10.xxx.xxx.245            0    100      0 1111 i
Total number of prefixes 1

Here is my BGPD configuration:

router bgp 1102
bgp router-id xx.xx.xx.xx
bgp bestpath as-path multipath-relax
neighbor ng-pods peer-group
neighbor ng-pods remote-as 1111
neighbor ng-pods ebgp-multihop 5
neighbor 10.xxx.xxx.2 remote-as 1102
neighbor 10.xxx.xxx.2 password xxxx
bgp listen range 10.xxx.xxx.0/22 peer-group ng-pods
!
address-family ipv4 unicast
neighbor ng-pods soft-reconfiguration inbound
neighbor ng-pods route-map accept-pod-vip in
neighbor 10.xxx.xxx.2 addpath-tx-all-paths
maximum-paths 8
maximum-paths ibgp 8
exit-address-family
exit
!
route-map accept-pod-vip permit 10
match ip address prefix-list vip-net
exit
!
end

Version

FRRouting 10.1.1

How to reproduce

using addPath configures to advertise multi-path for same network

Expected behavior

both 10.xxx.xxx.245 and 10.xxx.xxx.246 could be advertised

Actual behavior

only 10.xxx.xxx.245 is advertised

Additional context

No response

Checklist

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

Are you complaining about the visibility issue that without detail you can't see both paths or you don't see both paths on the receiver side?

@reonard
Copy link
Author

reonard commented Nov 14, 2024

Are you complaining about the visibility issue that without detail you can't see both paths or you don't see both paths on the receiver side?

i can only see one path (the best one) in the receiver side. I would expect both paths cloud be advertised, and received in the receiver side. is this a supported functionality?

@ton31337
Copy link
Member

ton31337 commented Nov 14, 2024

Please show the configs (both sides). Also show ip bgp, show ip route (both sides), and show the debug logs (debug bgp update).

@ton31337 ton31337 reopened this Nov 14, 2024
@reonard
Copy link
Author

reonard commented Nov 14, 2024

Please show the configs (both sides). Also show ip bgp, show ip route (both sides), and show the debug logs (debug bgp update).

thanks for reply. attached the mentioned config and logs. the sender side is a Linux server, while the receiver is a real router device from Juniper.
sender-side.zip
receiver-side.zip

@ton31337
Copy link
Member

2024/11/14 15:01:26 BGP: [M8SSC-Q34TS] EBGP inbound/outbound policy not properly setup, please configure in order for your peering to work correctly

Could you disable (no bgp ebgp-requires-policy) and try again?

@reonard
Copy link
Author

reonard commented Nov 14, 2024

2024/11/14 15:01:26 BGP: [M8SSC-Q34TS] EBGP inbound/outbound policy not properly setup, please configure in order for your peering to work correctly

Could you disable (no bgp ebgp-requires-policy) and try again?

did it but still the same. i think the eBGP is working properly since both 10.209.73.245 and 10.209.73.246 from eBGP neighbors are in local route table. but only the best one could be advertised to the iBGP router (Juniper).

@ton31337
Copy link
Member

Please show show bgp neighbor 10.207.8.2.

@reonard
Copy link
Author

reonard commented Nov 14, 2024

BGP neighbor is 10.207.8.2, remote AS 1102, local AS 1102, internal link
Local Role: undefined
Remote Role: undefined
BGP version 4, remote router ID 100.81.255.172, local router ID 10.207.9.75
BGP state = Established, up for 01:19:44
Last read 00:00:06, Last write 00:00:04
Hold time is 30 seconds, keepalive interval is 10 seconds
Configured hold time is 180 seconds, keepalive interval is 60 seconds
Configured tcp-mss is 0, synced tcp-mss is 1440
Configured conditional advertisements interval is 60 seconds
Neighbor capabilities:
4 Byte AS: advertised and received
Extended Message: advertised
AddPath:
IPv4 Unicast: TX advertised
IPv4 Unicast: RX advertised
Paths-Limit:
IPv4 Unicast: advertised (8)
Long-lived Graceful Restart: advertised and received
Address families by peer:
Route refresh: advertised and received
Enhanced Route Refresh: advertised
Address Family IPv4 Unicast: advertised and received
Hostname Capability: advertised (name: k8s-sit-dcn-share06-node0002,domain name: n/a) not received
Version Capability: advertised software version (FRRouting/10.1.1) not received
Graceful Restart Capability: advertised and received
Remote Restart timer is 120 seconds
Address families by peer:
none
Graceful restart information:
End-of-RIB send: IPv4 Unicast
End-of-RIB received: IPv4 Unicast
Local GR Mode: Helper*
Remote GR Mode: Helper
R bit: False
N bit: True
Timers:
Configured Restart Time(sec): 120
Received Restart Time(sec): 120
Configured LLGR Stale Path Time(sec): 0
IPv4 Unicast:
F bit: False
End-of-RIB sent: Yes
End-of-RIB sent after update: No
End-of-RIB received: Yes
Timers:
Configured Stale Path Time(sec): 360
LLGR Stale Path Time(sec): 0
Message statistics:
Inq depth is 0
Outq depth is 0
Sent Rcvd
Opens: 1 1
Notifications: 0 0
Updates: 2 2
Keepalives: 479 524
Route Refresh: 0 0
Capability: 0 0
Total: 482 527
Minimum time between advertisement runs is 0 seconds

For address family: IPv4 Unicast
Update group 3, subgroup 1
Packet Queue length 0
Advertise all paths via addpath
Community attribute sent to this neighbor(all)
Outbound path policy configured
Route map for outgoing advertisements is *adv-pod-vip
1 accepted prefixes

Connections established 1; dropped 0
Last reset 01:19:44, No AFI/SAFI activated for peer (n/a)
Internal BGP neighbor may be up to 255 hops away.
Local host: 10.207.9.75, Local port: 179
Foreign host: 10.207.8.2, Foreign port: 62965
Nexthop: 10.207.9.75
Nexthop global: ::
Nexthop local: ::
BGP connection: shared network
BGP Connect Retry Timer in Seconds: 120
Estimated round trip time: 106 ms
Peer Authentication Enabled
Read thread: on Write thread: on FD used: 24

@ton31337
Copy link
Member

AddPath:
IPv4 Unicast: TX advertised
IPv4 Unicast: RX advertised

Juniper does not advertise AddPath capability that's why you don't see those routes to be advertised. Check Juniper's side.

@ton31337 ton31337 removed the triage Needs further investigation label Nov 14, 2024
@reonard
Copy link
Author

reonard commented Nov 14, 2024

AddPath:
IPv4 Unicast: TX advertised
IPv4 Unicast: RX advertised

Juniper does not advertise AddPath capability that's why you don't see those routes to be advertised. Check Juniper's side.

OK thanks. btw, i used to think "IPv4 Unicast: RX advertised" means it has the capability, what should be show here if Juniper has this capability ?

@ton31337
Copy link
Member

Should be advertised and received.

@reonard
Copy link
Author

reonard commented Nov 14, 2024

oh .. got it, really thanks !

@reonard
Copy link
Author

reonard commented Nov 14, 2024

Should be advertised and received.

tried configure the capability in Juniper side and it works now. :)

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

Successfully merging a pull request may close this issue.

2 participants