EBGP 负载分担

 

 R1  R2 直接使用2条链路建立邻居, 使 R3 可以访问5.5.5.5 / 32  ,两条路径

配置R5/R1/R2 邻居, R5 重分发 5.5.5.5/32 

R3 bgp 表如下:

r3(config-router)#do sh bgp ipv4 un
BGP table version is 5, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
t secondary path,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

Network Next Hop Metric LocPrf Weight Path
* 5.5.5.5/32 10.0.31.1 0 10 ?     不优
*> 10.0.13.1 0 10 ?   

 

r3(config-router)#do sh bgp ipv4 un 5.5.5.5
BGP routing table entry for 5.5.5.5/32, version 2
Paths: (2 available, best #2, table default)
Advertised to update-groups:
4 5
Refresh Epoch 2
10
10.0.31.1 from 10.0.31.1 (1.1.1.1)
Origin incomplete, localpref 100, valid, external    // cisco  不如华为友好,不提示为什么不优
rx pathid: 0, tx pathid: 0
Refresh Epoch 1
10
10.0.13.1 from 10.0.13.1 (1.1.1.1)
Origin incomplete, localpref 100, valid, external, best
rx pathid: 0, tx pathid: 0x0

配置负载:

r3(config-router-af)#maximum-paths eibgp 2
%BGP: This may cause traffic loop if not used properly (command accepted)
r3(config-router-af)#
*Feb 12 14:02:10.776: %BGP-4-MULTIPATH_LOOP: This may cause traffic loop if not used properly (command accepted).   //提示可能环路

 

R3 BGP表:

r3(config-router-af)#do sh bgp ipv4 uni
BGP table version is 9, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
t secondary path,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

Network Next Hop Metric LocPrf Weight Path
*m 5.5.5.5/32 10.0.31.1 0 10 ?
*> 10.0.13.1 0 10 ?

R3 路由表:

r3(config-router-af)#do sh ip rou bgp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

5.0.0.0/32 is subnetted, 1 subnets
B 5.5.5.5 [20/0] via 10.0.31.1, 00:00:18
[20/0] via 10.0.13.1, 00:00:18

 

方案2 :  使用lo 建立邻居

方案3: 使用三层口聚合 

  cisco 的所谓 BVI  好像在这种场合用不合适,但没发现路由器怎么配置3层聚合口

R1 如下:       R3类似 

bridge irb

bridge 1 protocol ieee

bridge 1 route ip

!

interface GigabitEthernet0/0/1

bridge-group 1

!

interface GigabitEthernet0/0/2

bridge-group 1

!

interface BVI 1

ip address 10.0.13.1  255.255.255.0

posted @ 2021-02-12 22:11  abel2020  阅读(222)  评论(0编辑  收藏  举报