找回密码
 请使用中文注册

手机号码,快捷登录

手机号码,快捷登录

查看: 207|回复: 0

「实验分享」CCIE—BGP路由黑洞实验

[复制链接]
阅读字号:

124

主题

0

回帖

2702

积分

版主

积分
2702
发表于 2023-5-12 17:53:41 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?请使用中文注册

×
实验目的:
l掌握BGP路由黑洞的运行原理
l如何解决路由黑洞
实验说明:
l通过此实验练习,可以更好理解路由黑洞原理
实验环境:
l三台支持SPSERVICES的IOS的路由器
l直通线
实验拓扑: 174543fazlg21t6e2n2zzu.png
实验步骤:
R1(config)#interface f0/0
R1(config-if)#ip address 12.1.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#int lo 0
R1(config-if)#ip address 1.1.1.1 255.255.255.255
R1(config)#router ospf 110
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 12.1.1.1 0.0.0.0 a 0
R1(config-router)#network 1.1.1.1 0.0.0.0 a 0
R1(config)#int lo 11
R1(config-if)#ip address 11.11.11.11 255.255.255.255
R1(config)#router bgp 100
R1(config-router)#bgp router-id 1.1.1.1
R1(config-router)#neighbor 3.3.3.3 remote-as 100
R1(config-router)#neighbor 3.3.3.3 update-source lo 0{建立IBGP邻居关系,需要手动指定通过Loop口建立会话。}
R1(config-router)#network 11.11.11.11 mask 255.255.255.255{宣告一条11.11.11.11的路由}
R2(config)#interface f0/0
R2(config-if)#ip address 12.1.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#int f1/0
R2(config-if)#ip address 23.1.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config)#router ospf 110
R2(config-router)#router-id 2.2.2
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 12.1.1.2 0.0.0.0 a 0
R2(config-router)#network 23.1.1.2 0.0.0.0 a 0
R3(config)#interface f1/0
R3(config-if)#ip address 23.1.1.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#int lo 0
R3(config-if)#ip address 3.3.3.3 255.255.255.255
R3(config)#router ospf 110
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network 23.1.1.3 0.0.0.0 a 0
R3(config-router)#network 3.3.3.3 0.0.0.0 a 0
R3(config)#router bgp 100
R3(config-router)#bgp router-id 3.3.3.3
R3(config-router)#neighbor 1.1.1.1 remote-as 100
R3(config-router)#neighbor 1.1.1.1 update-source lo 0
R3(config-router)#network 33.33.33.33 mask 255.255.255.255
R3(config)#int lo 33
R3(config-if)#ip address 33.33.33.33 255.255.255.255
此时R1能收到33.33.33.33 R3收到11.11.11.11
R1#show ip bgp
Network Next Hop Metric LocPrf Weight Path
*> 11.11.11.11/32 0.0.0.0 0 32768 i{R1本地产生自己的路由}
*>i33.33.33.33/32 3.3.3.3 0 100 0 i{这里的i表示通过ibgp学到}{通过R3学到33.33.33.33}
R3同理
测试:R1的源11.11.11.11 ping R3的33.33.33.33
R1#ping 33.33.33.33 source lo 11
.....
分析:
由于R1能获取到R3的路由,因此将去往33.33.33.33的流量通过路由表发送给R2,而此时R2收到此流量时,发现目的地位33.33.33.33
由于R2没有建立任何IBGP邻居,因此无法收到33.33.33.33.因此R2是没有任何路由匹配而丢弃该流量。此现象为路由黑洞
解决方法:
1,在R2上将BGP重分布到ospf使得R2能收到33.33.33.33
2,R2手动产生关于33.33.33.33的路由以及11.11.11.11的路由
如:R2 ip route 33.33.33.33 255.255.255.255 23.1.1.3
3,R1,R2,R3做IBGP全互联
4,Mpls打标记
您需要登录后才可以回帖 登录 | 请使用中文注册

本版积分规则

QQ|Archiver|手机版|家电维修论坛 ( 蜀ICP备19011473号-4 川公网安备51102502000164号 )

GMT+8, 2025-6-14 12:09 , Processed in 0.202490 second(s), 24 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表