-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
When there are a large number of routes, it takes a long time to establish all bgp neighbors. #17494
Comments
A: B: |
please recreate on latest master. |
Description
60kv4 + 60kv6 route------>A------>B
There are two physical ports Ethernet58 and Ethernet122 between A and B. Ethernet58 is added to Vlan101 to Vlan132, and Ethernet122 is added to Vlan133 to Vlan164.
Each vlan is configured with a v4 address and a v6 address。
Create 64 v4 peers and 64 v6 peers.
64k v4 routes and 64k v6 routes are poured into device A and published to device B through 64 peers.
Ethernet58 remains up. Then Ethernet122 is shut down first and then starts up again after a while.
Version
How to reproduce
60kv4 + 60kv6 route------>A------>B
There are two physical ports Ethernet58 and Ethernet122 between A and B. Ethernet58 is added to Vlan101 to Vlan132, and Ethernet122 is added to Vlan133 to Vlan164.
A:
router bgp 171
bgp router-id 1.1.1.171
no bgp ebgp-requires-policy
no bgp default ipv4-unicast
neighbor rap peer-group
neighbor rap remote-as 195
neighbor rap description connect_to_leaf
neighbor rap advertisement-interval 5
neighbor rap timers 10 30
neighbor rap timers connect 3
neighbor rap4 peer-group
neighbor rap4 remote-as 195
neighbor rap4 description connect_to_leaf
neighbor rap4 advertisement-interval 5
neighbor rap4 timers 10 30
neighbor rap4 timers connect 3
neighbor rapv4 peer-group
neighbor rapv4 remote-as 195
neighbor rapv4 description connect_to_leaf
neighbor rapv4 timers 10 30
neighbor rapv4 timers connect 3
neighbor 101::2 peer-group rap
neighbor 102::2 peer-group rap
neighbor 103::2 peer-group rap
neighbor 104::2 peer-group rap
neighbor 105::2 peer-group rap
neighbor 106::2 peer-group rap
neighbor 107::2 peer-group rap
neighbor 108::2 peer-group rap
neighbor 109::2 peer-group rap
neighbor 110::2 peer-group rap
neighbor 111::2 peer-group rap
neighbor 112::2 peer-group rap
neighbor 113::2 peer-group rap
neighbor 114::2 peer-group rap
neighbor 115::2 peer-group rap
neighbor 116::2 peer-group rap
neighbor 117::2 peer-group rap
neighbor 118::2 peer-group rap
neighbor 119::2 peer-group rap
neighbor 120::2 peer-group rap
neighbor 121::2 peer-group rap
neighbor 122::2 peer-group rap
neighbor 123::2 peer-group rap
neighbor 124::2 peer-group rap
neighbor 125::2 peer-group rap
neighbor 126::2 peer-group rap
neighbor 127::2 peer-group rap
neighbor 128::2 peer-group rap
neighbor 129::2 peer-group rap
neighbor 130::2 peer-group rap
neighbor 131::2 peer-group rap
neighbor 132::2 peer-group rap
neighbor 133::2 peer-group rap
neighbor 134::2 peer-group rap
neighbor 135::2 peer-group rap
neighbor 136::2 peer-group rap
neighbor 137::2 peer-group rap
neighbor 138::2 peer-group rap
neighbor 139::2 peer-group rap
neighbor 140::2 peer-group rap
neighbor 141::2 peer-group rap
neighbor 142::2 peer-group rap
neighbor 143::2 peer-group rap
neighbor 144::2 peer-group rap
neighbor 145::2 peer-group rap
neighbor 146::2 peer-group rap
neighbor 147::2 peer-group rap
neighbor 148::2 peer-group rap
neighbor 149::2 peer-group rap
neighbor 150::2 peer-group rap
neighbor 151::2 peer-group rap
neighbor 152::2 peer-group rap
neighbor 153::2 peer-group rap
neighbor 154::2 peer-group rap
neighbor 155::2 peer-group rap
neighbor 156::2 peer-group rap
neighbor 157::2 peer-group rap
neighbor 158::2 peer-group rap
neighbor 159::2 peer-group rap
neighbor 160::2 peer-group rap
neighbor 161::2 peer-group rap
neighbor 162::2 peer-group rap
neighbor 163::2 peer-group rap
neighbor 164::2 peer-group rap
neighbor 100.101.1.2 peer-group rap4
neighbor 100.102.1.2 peer-group rap4
neighbor 100.103.1.2 peer-group rap4
neighbor 100.104.1.2 peer-group rap4
neighbor 100.105.1.2 peer-group rap4
neighbor 100.106.1.2 peer-group rap4
neighbor 100.107.1.2 peer-group rap4
neighbor 100.108.1.2 peer-group rap4
neighbor 100.109.1.2 peer-group rap4
neighbor 100.110.1.2 peer-group rap4
neighbor 100.111.1.2 peer-group rap4
neighbor 100.112.1.2 peer-group rap4
neighbor 100.113.1.2 peer-group rap4
neighbor 100.114.1.2 peer-group rap4
neighbor 100.115.1.2 peer-group rap4
neighbor 100.116.1.2 peer-group rap4
neighbor 100.117.1.2 peer-group rap4
neighbor 100.118.1.2 peer-group rap4
neighbor 100.119.1.2 peer-group rap4
neighbor 100.120.1.2 peer-group rap4
neighbor 100.121.1.2 peer-group rap4
neighbor 100.122.1.2 peer-group rap4
neighbor 100.123.1.2 peer-group rap4
neighbor 100.124.1.2 peer-group rap4
neighbor 100.125.1.2 peer-group rap4
neighbor 100.126.1.2 peer-group rap4
neighbor 100.127.1.2 peer-group rap4
neighbor 100.128.1.2 peer-group rap4
neighbor 100.129.1.2 peer-group rap4
neighbor 100.130.1.2 peer-group rap4
neighbor 100.131.1.2 peer-group rap4
neighbor 100.132.1.2 peer-group rap4
neighbor 100.133.1.2 peer-group rap4
neighbor 100.134.1.2 peer-group rap4
neighbor 100.135.1.2 peer-group rap4
neighbor 100.136.1.2 peer-group rap4
neighbor 100.137.1.2 peer-group rap4
neighbor 100.138.1.2 peer-group rap4
neighbor 100.139.1.2 peer-group rap4
neighbor 100.140.1.2 peer-group rap4
neighbor 100.141.1.2 peer-group rap4
neighbor 100.142.1.2 peer-group rap4
neighbor 100.143.1.2 peer-group rap4
neighbor 100.144.1.2 peer-group rap4
neighbor 100.145.1.2 peer-group rap4
neighbor 100.146.1.2 peer-group rap4
neighbor 100.147.1.2 peer-group rap4
neighbor 100.148.1.2 peer-group rap4
neighbor 100.149.1.2 peer-group rap4
neighbor 100.150.1.2 peer-group rap4
neighbor 100.151.1.2 peer-group rap4
neighbor 100.152.1.2 peer-group rap4
neighbor 100.153.1.2 peer-group rap4
neighbor 100.154.1.2 peer-group rap4
neighbor 100.155.1.2 peer-group rap4
neighbor 100.156.1.2 peer-group rap4
neighbor 100.157.1.2 peer-group rap4
neighbor 100.158.1.2 peer-group rap4
neighbor 100.159.1.2 peer-group rap4
neighbor 100.160.1.2 peer-group rap4
neighbor 100.161.1.2 peer-group rap4
neighbor 100.162.1.2 peer-group rap4
neighbor 100.163.1.2 peer-group rap4
neighbor 100.164.1.2 peer-group rap4
neighbor 100.1.1.2 remote-as 100
neighbor 100.1.1.2 description connect_to_ceshiyi
neighbor 100.1.1.2 advertisement-interval 0
neighbor 100.1.1.2 timers 10 30
neighbor 100.1.1.2 timers connect 3
neighbor 100::2 remote-as 100
neighbor 100::2 description connect_to_ceshiyi
neighbor 100::2 advertisement-interval 0
neighbor 100::2 timers 10 30
neighbor 100::2 timers connect 3
!
address-family ipv4 unicast
neighbor rap4 activate
neighbor rapv4 activate
neighbor 100.1.1.2 activate
exit-address-family
!
address-family ipv6 unicast
neighbor rap activate
neighbor 100::2 activate
exit-address-family
!
line vty
!
end
B:
router bgp 195
bgp router-id 1.1.1.195
no bgp ebgp-requires-policy
no bgp default ipv4-unicast
neighbor rap peer-group
neighbor rap remote-as 171
neighbor rap description connect_to_leaf
neighbor rap advertisement-interval 0
neighbor rap timers 10 30
neighbor rap timers connect 3
neighbor rap4 peer-group
neighbor rap4 remote-as 171
neighbor rap4 description connect_to_leaf
neighbor rap4 advertisement-interval 0
neighbor rap4 timers 10 30
neighbor rap4 timers connect 3
neighbor rapv4 peer-group
neighbor rapv4 remote-as 171
neighbor rapv4 description connect_to_leaf
neighbor rapv4 timers 30 90
neighbor rapv4 timers connect 30
neighbor 101::1 peer-group rap
neighbor 102::1 peer-group rap
neighbor 103::1 peer-group rap
neighbor 104::1 peer-group rap
neighbor 105::1 peer-group rap
neighbor 106::1 peer-group rap
neighbor 107::1 peer-group rap
neighbor 108::1 peer-group rap
neighbor 109::1 peer-group rap
neighbor 110::1 peer-group rap
neighbor 111::1 peer-group rap
neighbor 112::1 peer-group rap
neighbor 113::1 peer-group rap
neighbor 114::1 peer-group rap
neighbor 115::1 peer-group rap
neighbor 116::1 peer-group rap
neighbor 117::1 peer-group rap
neighbor 118::1 peer-group rap
neighbor 119::1 peer-group rap
neighbor 120::1 peer-group rap
neighbor 121::1 peer-group rap
neighbor 122::1 peer-group rap
neighbor 123::1 peer-group rap
neighbor 124::1 peer-group rap
neighbor 125::1 peer-group rap
neighbor 126::1 peer-group rap
neighbor 127::1 peer-group rap
neighbor 128::1 peer-group rap
neighbor 129::1 peer-group rap
neighbor 130::1 peer-group rap
neighbor 131::1 peer-group rap
neighbor 132::1 peer-group rap
neighbor 133::1 peer-group rap
neighbor 134::1 peer-group rap
neighbor 135::1 peer-group rap
neighbor 136::1 peer-group rap
neighbor 137::1 peer-group rap
neighbor 138::1 peer-group rap
neighbor 139::1 peer-group rap
neighbor 140::1 peer-group rap
neighbor 141::1 peer-group rap
neighbor 142::1 peer-group rap
neighbor 143::1 peer-group rap
neighbor 144::1 peer-group rap
neighbor 145::1 peer-group rap
neighbor 146::1 peer-group rap
neighbor 147::1 peer-group rap
neighbor 148::1 peer-group rap
neighbor 149::1 peer-group rap
neighbor 150::1 peer-group rap
neighbor 151::1 peer-group rap
neighbor 152::1 peer-group rap
neighbor 153::1 peer-group rap
neighbor 154::1 peer-group rap
neighbor 155::1 peer-group rap
neighbor 156::1 peer-group rap
neighbor 157::1 peer-group rap
neighbor 158::1 peer-group rap
neighbor 159::1 peer-group rap
neighbor 160::1 peer-group rap
neighbor 161::1 peer-group rap
neighbor 162::1 peer-group rap
neighbor 163::1 peer-group rap
neighbor 164::1 peer-group rap
neighbor 100.101.1.1 peer-group rap4
neighbor 100.102.1.1 peer-group rap4
neighbor 100.103.1.1 peer-group rap4
neighbor 100.104.1.1 peer-group rap4
neighbor 100.105.1.1 peer-group rap4
neighbor 100.106.1.1 peer-group rap4
neighbor 100.107.1.1 peer-group rap4
neighbor 100.108.1.1 peer-group rap4
neighbor 100.109.1.1 peer-group rap4
neighbor 100.110.1.1 peer-group rap4
neighbor 100.111.1.1 peer-group rap4
neighbor 100.112.1.1 peer-group rap4
neighbor 100.113.1.1 peer-group rap4
neighbor 100.114.1.1 peer-group rap4
neighbor 100.115.1.1 peer-group rap4
neighbor 100.116.1.1 peer-group rap4
neighbor 100.117.1.1 peer-group rap4
neighbor 100.118.1.1 peer-group rap4
neighbor 100.119.1.1 peer-group rap4
neighbor 100.120.1.1 peer-group rap4
neighbor 100.121.1.1 peer-group rap4
neighbor 100.122.1.1 peer-group rap4
neighbor 100.123.1.1 peer-group rap4
neighbor 100.124.1.1 peer-group rap4
neighbor 100.125.1.1 peer-group rap4
neighbor 100.126.1.1 peer-group rap4
neighbor 100.127.1.1 peer-group rap4
neighbor 100.128.1.1 peer-group rap4
neighbor 100.129.1.1 peer-group rap4
neighbor 100.130.1.1 peer-group rap4
neighbor 100.131.1.1 peer-group rap4
neighbor 100.132.1.1 peer-group rap4
neighbor 100.133.1.1 peer-group rap4
neighbor 100.134.1.1 peer-group rap4
neighbor 100.135.1.1 peer-group rap4
neighbor 100.136.1.1 peer-group rap4
neighbor 100.137.1.1 peer-group rap4
neighbor 100.138.1.1 peer-group rap4
neighbor 100.139.1.1 peer-group rap4
neighbor 100.140.1.1 peer-group rap4
neighbor 100.141.1.1 peer-group rap4
neighbor 100.142.1.1 peer-group rap4
neighbor 100.143.1.1 peer-group rap4
neighbor 100.144.1.1 peer-group rap4
neighbor 100.145.1.1 peer-group rap4
neighbor 100.146.1.1 peer-group rap4
neighbor 100.147.1.1 peer-group rap4
neighbor 100.148.1.1 peer-group rap4
neighbor 100.149.1.1 peer-group rap4
neighbor 100.150.1.1 peer-group rap4
neighbor 100.151.1.1 peer-group rap4
neighbor 100.152.1.1 peer-group rap4
neighbor 100.153.1.1 peer-group rap4
neighbor 100.154.1.1 peer-group rap4
neighbor 100.155.1.1 peer-group rap4
neighbor 100.156.1.1 peer-group rap4
neighbor 100.157.1.1 peer-group rap4
neighbor 100.158.1.1 peer-group rap4
neighbor 100.159.1.1 peer-group rap4
neighbor 100.160.1.1 peer-group rap4
neighbor 100.161.1.1 peer-group rap4
neighbor 100.162.1.1 peer-group rap4
neighbor 100.163.1.1 peer-group rap4
neighbor 100.164.1.1 peer-group rap4
!
address-family ipv4 unicast
neighbor rap4 activate
neighbor rapv4 activate
exit-address-family
!
address-family ipv6 unicast
neighbor rap activate
exit-address-family
!
line vty
!
Shut down port 122 on device A, and then startup
Expected behavior
32 peers related to Ethernet122 can be established quickly
Actual behavior
The 32 peers related to Ethernet 122 are established while learning routing. As a result, it takes 3 minutes for some peers to be established.
100.114.1.1 4 171 289 1605 0 0 0 00:34:51 60000
100.115.1.1 4 171 289 1605 0 0 0 00:34:51 60000
100.116.1.1 4 171 289 1605 0 0 0 00:34:51 60000
100.117.1.1 4 171 289 1605 0 0 0 00:34:51 60000
100.118.1.1 4 171 289 1605 0 0 0 00:34:51 60000
100.119.1.1 4 171 289 1605 0 0 0 00:34:51 60000
100.120.1.1 4 171 289 1605 0 0 0 00:34:51 60000
100.121.1.1 4 171 289 1605 0 0 0 00:34:51 60000
100.122.1.1 4 171 289 1605 0 0 0 00:34:51 60000
100.123.1.1 4 171 289 1605 0 0 0 00:34:51 60000
100.124.1.1 4 171 289 1605 0 0 0 00:34:51 60000
100.125.1.1 4 171 289 1605 0 0 0 00:34:51 60000
100.126.1.1 4 171 289 1605 0 0 0 00:34:51 60000
100.127.1.1 4 171 289 1605 0 0 0 00:34:51 60000
100.128.1.1 4 171 289 1605 0 0 0 00:34:51 60000
100.129.1.1 4 171 289 1605 0 0 0 00:34:51 60000
100.130.1.1 4 171 289 1605 0 0 0 00:34:51 60000
100.131.1.1 4 171 289 1605 0 0 0 00:34:51 60000
100.132.1.1 4 171 289 1605 0 0 0 00:34:51 60000
100.133.1.1 4 171 358 1341 0 1 0 00:02:20 60000
100.134.1.1 4 171 358 1365 0 0 0 00:02:20 60000
100.135.1.1 4 171 358 1365 0 0 0 00:02:16 60000
100.136.1.1 4 171 358 1365 0 0 0 00:02:16 60000
100.137.1.1 4 171 358 1417 0 0 0 00:02:16 60000
100.138.1.1 4 171 358 1367 0 0 0 00:02:16 60000
100.139.1.1 4 171 360 1409 0 0 0 00:02:15 60000
100.140.1.1 4 171 360 1409 0 0 0 00:02:14 60000
100.141.1.1 4 171 360 1409 0 0 0 00:02:13 60000
100.142.1.1 4 171 359 1328 0 0 0 00:02:09 60000
100.143.1.1 4 171 359 1328 0 0 0 00:02:04 60000
100.144.1.1 4 171 359 1258 0 0 0 00:02:01 60000
100.145.1.1 4 171 357 1160 0 1 0 00:01:50 60000
100.146.1.1 4 171 357 1161 0 0 0 00:01:46 60000
100.147.1.1 4 171 357 1161 0 0 0 00:01:44 60000
100.148.1.1 4 171 356 1078 0 0 0 00:01:34 60000
100.149.1.1 4 171 356 1078 0 0 0 00:01:33 60000
100.150.1.1 4 171 355 997 0 0 0 00:01:24 60000
100.151.1.1 4 171 355 997 0 0 0 00:01:23 60000
100.152.1.1 4 171 354 913 0 0 0 00:01:12 60000
100.153.1.1 4 171 353 837 0 0 0 00:01:03 60000
100.154.1.1 4 171 353 837 0 0 0 00:01:01 60000
100.155.1.1 4 171 351 762 0 0 0 00:00:52 60000
100.156.1.1 4 171 350 693 0 0 0 00:00:43 60000
100.157.1.1 4 171 349 692 0 0 0 00:00:35 60000
100.158.1.1 4 171 348 578 0 0 0 00:00:26 60000
100.159.1.1 4 171 347 590 0 0 0 00:00:18 60000
100.160.1.1 4 171 270 419 0 0 0 00:00:05 0
100.161.1.1 4 171 268 419 0 0 0 00:03:00 Active
100.162.1.1 4 171 268 419 0 0 0 00:03:00 Active
100.163.1.1 4 171 268 419 0 0 0 00:02:59 Active
100.164.1.1 4 171 268 417 0 0 0 00:02:59 Active
We can see err in log:
[EC 33554460] 100.156.1.1: nexthop_set failed, resetting connection - intf 0x0
[EC 100663299] bgp_connect_success: bgp_getsockname(): failed for peer 100.156.1.1, fd 57
[EC 33554460] 140::1: nexthop_set failed, resetting connection - intf 0x0
[EC 100663299] bgp_connect_success: bgp_getsockname(): failed for peer 140::1, fd 58
[EC 33554460] 100.157.1.1: nexthop_set failed, resetting connection - intf 0x0
[EC 100663299] bgp_connect_success: bgp_getsockname(): failed for peer 100.157.1.1, fd 56
......
Additional context
1 If bgp is restarted, 64 peers will be established quickly.
Checklist
The text was updated successfully, but these errors were encountered: