华三BGP等价路由组网

发布时间:2026/9/30 1:34:08
华三BGP等价路由组网 我们知道BGP路由默认会自动学习最优路由无法等价的那么我们通过BGP等价路由条目可以实现BGP等价路由的效果。一 网络拓扑如上图Leaf1和Spine1和Spine2建立IBGPBorder1和Spine1和Spine2建立EBGP二 设备配置2.1 BGP等价路由配置命令配置命令[Leaf01]bgp 100[Leaf01-bgp-default][Leaf01-bgp-default]address-family ipv4 unicast[Leaf01-bgp-default-ipv4]balance ?INTEGER1-32 Number of BGP routes for load balancingas-path-neglect Neglect the AS-PATH attribute when selecting load balancingroutesas-path-relax Relax AS-PATH check when selecting load balancing routesebgp Configure load balancing for EBGP routeseibgp Configure load balancing for both IBGP and EBGP routes, andallow simultaneous use of IBGP and EBGP routesibgp Configure load balancing for IBGP routes[Leaf01-bgp-default-ipv4]balance[Leaf01-bgp-default-ipv4]balance eibgp ?INTEGER1-32 Number of BGP routes for load balancing[Leaf01-bgp-default-ipv4]balance eibgp注意ibgp和ebgp最新的配置会覆盖前面的配置eibgp配置的时候ibgp、ebgp如果配置了需要删除ibgp、ebgp的配置2.2 Leaf1配置bgp等价路由#bgp 100router-id 6.6.6.1peer 6.6.6.2 as-number 100peer 6.6.6.2 connect-interface LoopBack0peer 6.6.6.3 as-number 100peer 6.6.6.3 connect-interface LoopBack0#address-family ipv4 unicastbalance eibgp 32network 6.6.6.6 255.255.255.255peer 6.6.6.2 enablepeer 6.6.6.3 enable#2.3 Spine1、Spine2、Border同样配置!bgp 100#address-family ipv4 unicastbalance eibgp 32!三 状态查看3.1 配置等价路由前BGP路由查看-非等价路由Leaf1dis ip routing-table 6.6.6.4Summary count : 1Destination/Mask Proto Pre Cost NextHop Interface6.6.6.4/32 BGP 255 0 6.6.6.2 GE0/0 //等价路由Leaf1dis bgp routing-table ipv4Total number of routes: 2BGP local router ID is 6.6.6.1Status codes: * - valid, - best, d - dampened, h - history,s - suppressed, S - stale, i - internal, e - externalOrigin: i - IGP, e - EGP, ? - incompleteNetwork NextHop MED LocPrf PrefVal Path/Ogn* i 6.6.6.4/32 6.6.6.2 0 100 0 200i//等价路由* 6.6.6.6/32 127.0.0.1 0 32768 iLeaf01dis ip routing-tableDestinations : 15 Routes : 15Destination/Mask Proto Pre Cost NextHop Interface6.6.6.2/32 O_INTRA 10 1 1.1.1.1 GE0/06.6.6.3/32 O_INTRA 10 1 1.1.1.3 GE0/16.6.6.4/32 BGP 255 0 6.6.6.2 GE0/0127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0Leaf01Leaf01dis bgp routing-table ipv4 6.6.6.4BGP local router ID: 6.6.6.1Local AS number: 100Paths: 2 available, 1 bestBGP routing table information of 6.6.6.4/32:From : 6.6.6.2 (6.6.6.2)Rely nexthop : 1.1.1.1Original nexthop: 6.6.6.2OutLabel : NULLAS-path : 200Origin : igpAttribute value : MED 0, localpref 100, pref-val 0State : valid, internal, bestIP precedence : N/AQoS local ID : N/ATraffic index : N/AVPN-Peer UserID : N/ADSCP : N/AEXP : N/ATunnel policy : NULLRely tunnel IDs : N/AFrom : 6.6.6.3 (6.6.6.3)Rely nexthop : 1.1.1.3Original nexthop: 6.6.6.3OutLabel : NULLAS-path : 200Origin : igpAttribute value : MED 0, localpref 100, pref-val 0State : valid, internalIP precedence : N/AQoS local ID : N/ATraffic index : N/AVPN-Peer UserID : N/ADSCP : N/AEXP : N/ATunnel policy : NULLRely tunnel IDs : N/ALeaf013.2 配置等价路由前BGP路由查看-等价路由Leaf1dis ip routing-table 6.6.6.4Summary count : 2Destination/Mask Proto Pre Cost NextHop Interface6.6.6.4/32 BGP 255 0 6.6.6.2 GE0/0 //等价路由BGP 255 0 6.6.6.3 GE0/1Leaf1dis bgp routing-table ipv4Total number of routes: 3BGP local router ID is 6.6.6.1Status codes: * - valid, - best, d - dampened, h - history,s - suppressed, S - stale, i - internal, e - externalOrigin: i - IGP, e - EGP, ? - incompleteNetwork NextHop MED LocPrf PrefVal Path/Ogn* i 6.6.6.4/32 6.6.6.2 0 100 0 200i//等价路由* i 6.6.6.3 0 100 0 200i* 6.6.6.6/32 127.0.0.1 0 32768 iLeaf1dis ip routing-tableDestinations : 16 Routes : 17Destination/Mask Proto Pre Cost NextHop Interface0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop01.1.1.0/31 Direct 0 0 1.1.1.0 GE0/01.1.1.0/32 Direct 0 0 127.0.0.1 InLoop01.1.1.2/31 Direct 0 0 1.1.1.2 GE0/11.1.1.2/32 Direct 0 0 127.0.0.1 InLoop06.6.6.1/32 Direct 0 0 127.0.0.1 InLoop06.6.6.2/32 O_INTRA 10 1 1.1.1.1 GE0/06.6.6.3/32 O_INTRA 10 1 1.1.1.3 GE0/16.6.6.4/32 BGP 255 0 6.6.6.2 GE0/0 //等价路由BGP 255 0 6.6.6.3 GE0/16.6.6.6/32 Direct 0 0 127.0.0.1 InLoop0127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0Leaf1dis bgp routing-table ipv4 6.6.6.4BGP local router ID: 6.6.6.1Local AS number: 100Paths: 2 available, 2 bestBGP routing table information of 6.6.6.4/32:From : 6.6.6.2 (6.6.6.2)Rely nexthop : 1.1.1.1Original nexthop: 6.6.6.2OutLabel : NULLAS-path : 200Origin : igpAttribute value : MED 0, localpref 100, pref-val 0State : valid, internal, bestIP precedence : N/AQoS local ID : N/ATraffic index : N/AVPN-Peer UserID : N/ADSCP : N/AEXP : N/ATunnel policy : NULLRely tunnel IDs : N/AFrom : 6.6.6.3 (6.6.6.3)Rely nexthop : 1.1.1.3Original nexthop: 6.6.6.3OutLabel : NULLAS-path : 200Origin : igpAttribute value : MED 0, localpref 100, pref-val 0State : valid, internal, bestIP precedence : N/AQoS local ID : N/ATraffic index : N/AVPN-Peer UserID : N/ADSCP : N/AEXP : N/ATunnel policy : NULLRely tunnel IDs : N/ALeaf1dis bgp routing-table ipv4 6.6.6.4 advertise-infoBGP local router ID: 6.6.6.1Local AS number: 100Paths: 1 bestBGP routing table information of 6.6.6.4/32:Not advertised to any peers yetLeaf1

关于本文作者

来自尧图内容编辑团队

尧图内容编辑团队 内容团队

尧图内容编辑团队

本文由尧图网络内容编辑团队执笔。团队由资深项目经理、前端工程师与设计师组成,所有内容均来自亲手交付的真实项目,先讲清问题、再给出可落地的解法。尧图深耕北京网站建设十年,服务过京华建材集团、智造科技等各行业客户,把一线经验沉淀为可复用的行业观察。

  • 十年建站经验,覆盖建材、制造、服务、文创等
  • 项目经理把关选题与事实准确性
  • 工程师与设计师联合撰写专业细节
  • 统一编辑规范,保证文风与排版一致
  • 每月复盘转化数据,迭代选题方向

延伸阅读

相关资讯与近期热门内容

深度阅读推荐

建站决策前值得细读的三篇

网站改版的5个关键决策
2024-08-12

网站改版的5个关键决策

什么时候该改版、改到什么程度、如何避免流量掉光,京华建材集团改版复盘给出答案。

获取专属建站方案

看完文章,把您的行业与预算告诉我们,免费获取一份量身定制的官网建设方案与报价。

立即免费咨询