当前位置: 首页 > news >正文

锐捷BGP等价路由组网

我们知道BGP路由默认会自动学习最优路由,无法等价的,那么我们通过BGP等价路由条目可以实现BGP等价路由的效果。

一 网络拓扑

如上图:

Leaf1和Spine1和Spine2建立IBGP,Border1和Spine1和Spine2建立EBGP;

二 设备配置

2.1 BGP等价路由配置命令

配置命令:

Leaf1(config)#rou bgp 100

Leaf1(config-router)#address-family ipv4

Leaf1(config-router-af)#maximum-paths ?

ebgp EBGP-multipath

ibgp IBGP-multipath

Leaf1(config-router-af)#

Leaf1(config-router-af)#maximum-paths ibgp ?

<1-32> Number of paths

Leaf1(config-router-af)#maximum-paths ibgp 32

Leaf1(config-router-af)#maximum-paths ebgp 32

Leaf1(config-router-af)#

2.2 Leaf1配置bgp等价路由

!

router bgp 100

bgp router-id 6.6.6.1

bgp log-neighbor-changes

bgp graceful-restart restart-time 120

bgp graceful-restart stalepath-time 360

bgp graceful-restart

neighbor 6.6.6.2 remote-as 100

neighbor 6.6.6.2 update-source Loopback 0

neighbor 6.6.6.3 remote-as 100

neighbor 6.6.6.3 update-source Loopback 0

address-family ipv4

maximum-paths ebgp 32

maximum-paths ibgp 32

network 6.6.6.6 mask 255.255.255.255

neighbor 6.6.6.2 activate

neighbor 6.6.6.3 activate

exit-address-family

!

2.3 Spine1、Spine2、Border同样配置

!

router bgp 100

address-family ipv4

maximum-paths ebgp 32

maximum-paths ibgp 32

!

三 状态查看

3.1 配置等价路由前BGP路由查看-非等价路由

Leaf1#sh bgp ipv4 unicast

BGP table version is 3, local router ID is 6.6.6.1

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

S Stale, b - backup entry, m - multipath, f Filter, a additional-path

Origin codes: i - IGP, e - EGP, ? - incomplete

Network 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 i

Total number of prefixes 2

Leaf1#

Leaf1#sh ip route

Codes: C - Connected, L - Local, S - Static

R - RIP, O - OSPF, B - BGP, I - IS-IS, V - Overflow route

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2

SU - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

IA - Inter area, EV - BGP EVPN, A - Arp to host

LA - Local aggregate route

* - candidate default

Gateway of last resort is no set

C 1.1.1.0/31 is directly connected, GigabitEthernet 0/0

C 1.1.1.0/32 is local host.

C 1.1.1.2/31 is directly connected, GigabitEthernet 0/1

C 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/0

O 6.6.6.3/32 [110/1] via 1.1.1.3, 00:17:36, GigabitEthernet 0/1

B 6.6.6.4/32 [200/0] via 6.6.6.2, 00:01:52

C 6.6.6.6/32 is local host.

Leaf1#

Leaf1#sh bgp ipv4 unicast 6.6.6.4

BGP routing table entry for 6.6.6.4/32(#0x7f9714becdd0)

Paths: (2 available, best #2, table Default-IP-Routing-Table)

Not advertised to any peer

200

6.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 2026

RX ID: 0,TX ID: 0

200

6.6.6.2 (metric 1) from 6.6.6.2 (6.6.6.2)

Origin IGP, metric 0, localpref 100, valid, internal, best

Last update: Mon Jun 22 23:22:36 2026

RX ID: 0,TX ID: 0

Leaf1#

3.2 配置等价路由前BGP路由查看-等价路由

Leaf1#sh bgp ipv4 unicast

BGP table version is 3, local router ID is 6.6.6.1

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

S Stale, b - backup entry, m - multipath, f Filter, a additional-path

Origin codes: i - IGP, e - EGP, ? - incomplete

Network 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 i

Total number of prefixes 2

Leaf1#sh ip route

Codes: C - Connected, L - Local, S - Static

R - RIP, O - OSPF, B - BGP, I - IS-IS, V - Overflow route

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2

SU - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

IA - Inter area, EV - BGP EVPN, A - Arp to host

LA - Local aggregate route

* - candidate default

Gateway of last resort is no set

C 1.1.1.0/31 is directly connected, GigabitEthernet 0/0

C 1.1.1.0/32 is local host.

C 1.1.1.2/31 is directly connected, GigabitEthernet 0/1

C 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/0

O 6.6.6.3/32 [110/1] via 1.1.1.3, 00:27:40, GigabitEthernet 0/1

B 6.6.6.4/32 [200/0] via 6.6.6.2, 00:02:59

[200/0] via 6.6.6.3, 00:02:59

C 6.6.6.6/32 is local host.

Leaf1#

Leaf1#

Leaf1#sh bgp ipv4 unicast 6.6.6.4

BGP routing table entry for 6.6.6.4/32(#0x7f9714becdd0)

Paths: (2 available, best #2, table Default-IP-Routing-Table)

Not advertised to any peer

200

6.6.6.3 (metric 1) from 6.6.6.3 (6.6.6.3)

Origin IGP, metric 0, localpref 100, valid, internal,multipath

Last update: Mon Jun 22 23:23:08 2026

RX ID: 0,TX ID: 0

200

6.6.6.2 (metric 1) from 6.6.6.2 (6.6.6.2)

Origin IGP, metric 0, localpref 100, valid, internal, multipath,best

Last update: Mon Jun 22 23:22:36 2026

RX ID: 0,TX ID: 0

Leaf1#

http://www.jsqmd.com/news/1065795/

相关文章:

  • 性价比高的数控弯管机推荐,伟博机械优势尽显 - mypinpai
  • 分布式一致性困局:从 Raft 协议到工程落地的深度剖析
  • 别再让你的代码吃灰了!AI时代,小白也能一键部署并躺着赚钱(附保姆级教程)
  • 自动驾驶系统滤波(4):目标跟踪与预测滤波——从状态估计到意图理解
  • OpenClaw:轻量级AI工作流编排引擎与跨平台生产部署实践
  • 性价比高的数控弯管机选哪家?伟博机械揭秘 - mypinpai
  • MedFlow:面向临床落地的多模态医疗AI工程化基座
  • 基于 Harmony 6.0 应用的农产品直销平台首页实现
  • RPGMakerDecrypter:跨版本RPG Maker加密资源解密工具完全指南
  • OpenClaw不是多Agent框架,而是Skill共享总线
  • 大模型微调防遗忘:STR安全令牌正则化原理与实践
  • 个人项目上线全记录——从代码到公网可访问
  • 2026年好用的数控弯管机推荐,伟博机械服务有保障 - mypinpai
  • Edge AI与TinyML:电子行业AI落地实践
  • Hy-MT2混合指令调优:大模型翻译的工业级定制化实践
  • Python开发实战:高效编写高质量代码的技巧
  • 2026年数控弯管机品牌推荐,伟博机械好不好? - mypinpai
  • 文件上传漏洞深度解析:从原理到实战攻防
  • 第二章 数字类型及其操作2
  • 高压胶管选购指南:品牌与价格的平衡 - mypinpai
  • 干货指南:如何选择有专业实验室的高压胶管生产企业? - mypinpai
  • 4090+vLLM+MTP单卡部署Qwen3-14B实现高吞吐低延迟推理
  • OpenClaw本地AI工具链:离线可信执行环境封装实践
  • 嵌入式硬件加密加速实战:LTC eDMA非阻塞API原理与应用
  • 盘点2026年数控弯管机制造商,伟博机械怎么样 - mypinpai
  • 图像去模糊中的饱和度失真问题与感知优化框架
  • Windows终极工具箱:WinUtil完全指南 - 一键解决所有Windows管理难题
  • 从标注分歧到模式诊断:构建稳定数据标注体系的技术实践
  • 高效3D模型管理实战指南:Windows STL缩略图专业方案深度解析
  • 终极Windows系统管理工具:Chris Titus Tech WinUtil完全指南