当前位置: 首页 > 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.gsyq.cn/news/1577734.html

相关文章:

  • OpenClaw:轻量级AI工作流编排引擎与跨平台生产部署实践
  • 大模型微调防遗忘:STR安全令牌正则化原理与实践
  • RPGMakerDecrypter:跨版本RPG Maker加密资源解密工具完全指南
  • Python开发实战:高效编写高质量代码的技巧
  • 2026年数控弯管机品牌推荐,伟博机械好不好? - mypinpai
  • 第二章 数字类型及其操作2
  • OpenClaw本地AI工具链:离线可信执行环境封装实践
  • 嵌入式硬件加密加速实战:LTC eDMA非阻塞API原理与应用
  • 4090+vLLM+MTP单卡部署Qwen3-14B实现高吞吐低延迟推理
  • Windows终极工具箱:WinUtil完全指南 - 一键解决所有Windows管理难题
  • 图像去模糊中的饱和度失真问题与感知优化框架
  • 从标注分歧到模式诊断:构建稳定数据标注体系的技术实践
  • 高效3D模型管理实战指南:Windows STL缩略图专业方案深度解析
  • 终极Windows系统管理工具:Chris Titus Tech WinUtil完全指南
  • 2026年6月民事案件计算咨询推荐,房产/离婚/工伤赔偿/股权/劳动/债权债务/人身损害/仲裁,民事案件赔偿咨询律所推荐 - 品牌推荐师
  • 无线广播通信下分布式梯度推送的混合矩阵优化设计
  • Mac M系列芯片装Kali虚拟机:ARM64适配全指南
  • 基于Kinetis V系列MCU的高压电机控制开发平台实战解析
  • 智能校对中的错误检测与纠正建议
  • DALM:基于扩散模型与领域约束的可控文本生成架构解析
  • 2026年电焊培训长期班哪家好?费用与口碑分析 - mypinpai
  • TradingAgents-CN:构建AI驱动的智能股票分析系统的创新一体化解决方案
  • FPGA加速MIMO检测:PIMI架构设计与硬件实现实战
  • 构建企业级AI Agent:架构设计、安全性与可扩展性
  • Django毕业设计-基于 Django 与人脸识别的自习室座位预约系统的设计与实现 融合人脸识别技术的自习室预约管理系统(源码+LW+部署文档+全bao+远程调试+代码讲解等)
  • 21个必用ComfyUI中文工作流:AI绘图新手的终极指南
  • Godot逆向工程实战:如何用GDSDecomp工具集恢复和修改游戏项目
  • 第3节:Kafka只是消息引擎吗?
  • 文件上传漏洞实战:从原理到upload-labs靶场通关全解析
  • SIVR:基于序列内部方差的大语言模型幻觉检测方法详解与实践