侧边栏壁纸
博主头像
风华科技 博主等级

行动起来,活在当下

  • 累计撰写 270 篇文章
  • 累计创建 28 个标签
  • 累计收到 4 条评论

目 录CONTENT

文章目录

38、BGP配置之等价负载分担

风华
2024-10-14 / 0 评论 / 0 点赞 / 54 阅读 / 0 字
广告 广告

一、实验拓扑

image-1657160601951
image-1657160609578

  • 在大型网络汇总,到达同一目的的通常存在多条有效BGP路由,设备只会优选一条最优的BGP路由,将该路由加载到路由表中使用,这一点往往会造成很多流量负载不均衡的情况。
  • 通过配置BGP负载分担,可以使得同时将多条等价的BGP路由加载到路由表,实现流量负载均衡,减少网络拥塞。
  • 注意的是,尽管配置了BGP负载分担,但是设备依然只会在多条到达同一目的的BGP路由中优选一条路由,并只将这条路由通告给其他对等体。
  • 在设备上使能BGP负载分担功能后,只有满足跳的多条BGP路由才会成为等价路由,进行负载分担。
  • 形成BGP路由等价负载分担的条件
    • Preferred-Value属性值相同
      • Local_Preference属性值相同。
    • 都是聚合路由或者非聚合路由。
    • AS_Path属性长度相同。
    • Origin类型((IGP、EGP、Incomplete)相同。
    • MED属性值相同。
    • 都是EBGP路由或都是IBGP路由。
    • AS内部IGP的Metric相同。
    • AS_Path属性完全相同。

二、实验需求

1、配置基本BGP,R4和R5在BGP中注入互联的网段。
2、在R1上配置BGP等价负载分担

三、实验过程

1、R1的配置
sys
un in en
sys R1
int g0/0/0
ip add 10.0.12.1 24
int g0/0/1
ip add 10.0.13.1 24
int loo0
ip add 1.1.1.1 32
ospf 1 router-id 1.1.1.1
area 0
net 10.0.12.0 0.0.0.255
net 10.0.13.0 0.0.0.255
net 1.1.1.1 0.0.0.0
bgp 200
router-id 1.1.1.1
pe 2.2.2.2 as 200
pe 2.2.2.2 con loo0
pe 3.3.3.3 as 200
pe 3.3.3.3 con loo0
maximum load-balancing ibgp 2
2、R2的配置
sys
un in en
sys R2
int g0/0/0
ip add 10.0.12.2 24
int g0/0/1
ip add 10.0.24.2 24
int loo0
ip add 2.2.2.2 32
ospf 1 router-id 2.2.2.2
area 0
net 2.2.2.2 0.0.0.0
net 10.0.12.0 0.0.0.255
bgp 200
router-id 2.2.2.2
pe 1.1.1.1 as 200
pe 1.1.1.1 con loo0
pe 1.1.1.1 next-hop-local
pe 3.3.3.3 as 200
pe 3.3.3.3 con loo0
pe 3.3.3.3 next-hop-local
pe 10.0.24.4 as 100
3、R3的配置
sys
un in en
sys R3
int g0/0/1
ip add 10.0.13.3 24
int g0/0/0
ip add 10.0.35.3 24
int loo0
ip add 3.3.3.3  32
ospf 1 router-id 3.3.3.3
area 0
net 10.0.13.0 0.0.0.255
net 3.3.3.3 0.0.0.0
bgp 200
router-id 3.3.3.3
pe 1.1.1.1 as 200
pe 1.1.1.1 con loo0
pe 1.1.1.1 next-hop-local
pe 2.2.2.2 as 200
pe 2.2.2.2 con loo0
pe 2.2.2.2 next-hop-local
pe 10.0.35.5 as 100
4、R4的配置
sys
un in en
sys R4
int g0/0/1
ip add 10.0.24.4 24
int g0/0/2
ip add 10.0.45.4 24
int g0/0/3
ip add 10.0.54.4 24
int loo0
ip add 4.4.4.4 32
ip route-static 5.5.5.5 255.255.255.255 10.0.45.5
ip route-static 5.5.5.5 255.255.255.255 10.0.54.5
bgp 100
router-id 4.4.4.4
pe 10.0.24.2 as 200
pe 5.5.5.5 as 100
pe 5.5.5.5 con loo0
net 10.0.45.0 24
net 10.0.54.0 24
5、R5的配置
sys
un in en
sys R5
int g0/0/0
ip add 10.0.35.5 24
int g0/0/2
ip add 10.0.45.5 24
int g0/0/3
ip add 10.0.54.5 24
int loo0
ip add 5.5.5.5 32
ip route-static 4.4.4.4 255.255.255.255 10.0.45.4
ip route-static 4.4.4.4 255.255.255.255 10.0.54.4
bgp 100
router-id 5.5.5.5
pe 10.0.35.3 as 200
pe 4.4.4.4 as 100
pe 4.4.4.4 con loo0
net 10.0.45.0 24
net 10.0.54.0 24

四、实验结果

1、在R1上查看全局路由表

image-1657161900481

0
BGP
广告 广告

评论区