一、拓朴图:

实验要求:R5 通过改变对端传入的 AS-Path 路由策略,使原来较长的 AS-Path 成为最优
二、步骤:
1、配置IP
2、R1、R2、R3 配置 IGP
3、R1、R2、R3 配置 BGP,将 R1 创建的 Loop 100.1.1.1 的环回口在 IBGP 内声明(这里注意边界的 IBGP 路由器向边界内要声明 next-hop-local)
4、配置 EBGP:R2 和 R4、R4 和 R5、R3 和 R5
5、查看 R5 的 BGP 路由表,发现正常情况下:100.1.1.1 的路由从 R3 过来的为最优
6、在 R5 上做路由策略,配置从 R3 过来的 100.1.1.1 增加两个 path 节点名称:
ip ip-prefix a index 10 permit 100.1.1.1 32
#
route-policy rp1 permit node 10 
 if-match ip-prefix a 
 apply as-path 101 102 additive7、再次查看 R5 的 BGP 路由表,发现从R4过来的 100.1.1.1 已经变为最佳,原因是 AS-Path











![[计算机提升] Bitlocker驱动器加密与关闭](https://img-blog.csdnimg.cn/direct/5588ee7c65ab410eaf3eab609dc1e681.png)





![[C++]:12:模拟实现list](https://img-blog.csdnimg.cn/direct/a9a6d33e8ddb4f74bd7ecfa49b9b61e6.png)


