华三BGP等价路由组网

华三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