锐捷BGP等价路由组网
我们知道BGP路由默认会自动学习最优路由无法等价的那么我们通过BGP等价路由条目可以实现BGP等价路由的效果。一 网络拓扑如上图Leaf1和Spine1和Spine2建立IBGPBorder1和Spine1和Spine2建立EBGP二 设备配置2.1 BGP等价路由配置命令配置命令Leaf1(config)#rou bgp 100Leaf1(config-router)#address-family ipv4Leaf1(config-router-af)#maximum-paths ?ebgp EBGP-multipathibgp IBGP-multipathLeaf1(config-router-af)#Leaf1(config-router-af)#maximum-paths ibgp ?1-32 Number of pathsLeaf1(config-router-af)#maximum-paths ibgp 32Leaf1(config-router-af)#maximum-paths ebgp 32Leaf1(config-router-af)#2.2 Leaf1配置bgp等价路由!router bgp 100bgp router-id 6.6.6.1bgp log-neighbor-changesbgp graceful-restart restart-time 120bgp graceful-restart stalepath-time 360bgp graceful-restartneighbor 6.6.6.2 remote-as 100neighbor 6.6.6.2 update-source Loopback 0neighbor 6.6.6.3 remote-as 100neighbor 6.6.6.3 update-source Loopback 0address-family ipv4maximum-paths ebgp 32maximum-paths ibgp 32network 6.6.6.6 mask 255.255.255.255neighbor 6.6.6.2 activateneighbor 6.6.6.3 activateexit-address-family!2.3 Spine1、Spine2、Border同样配置!router bgp 100address-family ipv4maximum-paths ebgp 32maximum-paths ibgp 32!三 状态查看3.1 配置等价路由前BGP路由查看-非等价路由Leaf1#sh bgp ipv4 unicastBGP table version is 3, local router ID is 6.6.6.1Status codes: s suppressed, d damped, h history, * valid, best, i - internal,S Stale, b - backup entry, m - multipath, f Filter, a additional-pathOrigin codes: i - IGP, e - EGP, ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*bi 6.6.6.4/32 6.6.6.3 0 100 0 200 i备份*i 6.6.6.2 0 100 0 200 i* 6.6.6.6/32 0.0.0.0 0 32768 iTotal number of prefixes 2Leaf1#Leaf1#sh ip routeCodes: C - Connected, L - Local, S - StaticR - RIP, O - OSPF, B - BGP, I - IS-IS, V - Overflow routeN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2SU - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2IA - Inter area, EV - BGP EVPN, A - Arp to hostLA - Local aggregate route* - candidate defaultGateway of last resort is no setC 1.1.1.0/31 is directly connected, GigabitEthernet 0/0C 1.1.1.0/32 is local host.C 1.1.1.2/31 is directly connected, GigabitEthernet 0/1C 1.1.1.2/32 is local host.C 6.6.6.1/32 is local host.O 6.6.6.2/32 [110/1] via 1.1.1.1, 00:20:52, GigabitEthernet 0/0O 6.6.6.3/32 [110/1] via 1.1.1.3, 00:17:36, GigabitEthernet 0/1B 6.6.6.4/32 [200/0] via 6.6.6.2, 00:01:52C 6.6.6.6/32 is local host.Leaf1#Leaf1#sh bgp ipv4 unicast 6.6.6.4BGP routing table entry for 6.6.6.4/32(#0x7f9714becdd0)Paths: (2 available, best #2, table Default-IP-Routing-Table)Not advertised to any peer2006.6.6.3 (metric 1) from 6.6.6.3 (6.6.6.3)Origin IGP, metric 0, localpref 100, valid, internal,backup备份路由Last update: Mon Jun 22 23:23:08 2026RX ID: 0,TX ID: 02006.6.6.2 (metric 1) from 6.6.6.2 (6.6.6.2)Origin IGP, metric 0, localpref 100, valid, internal, bestLast update: Mon Jun 22 23:22:36 2026RX ID: 0,TX ID: 0Leaf1#3.2 配置等价路由前BGP路由查看-等价路由Leaf1#sh bgp ipv4 unicastBGP table version is 3, local router ID is 6.6.6.1Status codes: s suppressed, d damped, h history, * valid, best, i - internal,S Stale, b - backup entry, m - multipath, f Filter, a additional-pathOrigin codes: i - IGP, e - EGP, ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*mi 6.6.6.4/32 6.6.6.3 0 100 0 200 i*i 6.6.6.2 0 100 0 200 i* 6.6.6.6/32 0.0.0.0 0 32768 iTotal number of prefixes 2Leaf1#sh ip routeCodes: C - Connected, L - Local, S - StaticR - RIP, O - OSPF, B - BGP, I - IS-IS, V - Overflow routeN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2SU - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2IA - Inter area, EV - BGP EVPN, A - Arp to hostLA - Local aggregate route* - candidate defaultGateway of last resort is no setC 1.1.1.0/31 is directly connected, GigabitEthernet 0/0C 1.1.1.0/32 is local host.C 1.1.1.2/31 is directly connected, GigabitEthernet 0/1C 1.1.1.2/32 is local host.C 6.6.6.1/32 is local host.O 6.6.6.2/32 [110/1] via 1.1.1.1, 00:30:56, GigabitEthernet 0/0O 6.6.6.3/32 [110/1] via 1.1.1.3, 00:27:40, GigabitEthernet 0/1B 6.6.6.4/32 [200/0] via 6.6.6.2, 00:02:59[200/0] via 6.6.6.3, 00:02:59C 6.6.6.6/32 is local host.Leaf1#Leaf1#Leaf1#sh bgp ipv4 unicast 6.6.6.4BGP routing table entry for 6.6.6.4/32(#0x7f9714becdd0)Paths: (2 available, best #2, table Default-IP-Routing-Table)Not advertised to any peer2006.6.6.3 (metric 1) from 6.6.6.3 (6.6.6.3)Origin IGP, metric 0, localpref 100, valid, internal,multipathLast update: Mon Jun 22 23:23:08 2026RX ID: 0,TX ID: 02006.6.6.2 (metric 1) from 6.6.6.2 (6.6.6.2)Origin IGP, metric 0, localpref 100, valid, internal, multipath,bestLast update: Mon Jun 22 23:22:36 2026RX ID: 0,TX ID: 0Leaf1#