温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

38-高级路由:BGP选路:环路预防

发布时间:2020-07-01 22:45:18 来源:网络 阅读:276 作者:第七_感 栏目:安全技术

一、实验拓扑:
38-高级路由:BGP选路:环路预防
Note:这里只用R2、R3路由器
二、实验要求:
1、R2身后增加Lo1:20.20.20.20,并宣告进BGP进程中;
2、R3上部署静态路由 出接口(必须是,否则有继承现象发生);
3、R3在BGP进程下宣告20.20.20.20;
4、R3上抓取流量,部署route-map,使得20.20.20.20最优路径的下一跳是2.2.2.2
5、查看R3上20.20.20.20的路由下一跳是否是0.0.0.0?这样是否有环路风险?
6、验证:部署4、后,最优路径的下一跳是否是2.2.2.2

三、命令部署:
1、2、3部署:
R2(config)#int lo1
R2(config-if)#ip add 20.20.20.20 255.255.255.0

R2(config)#router bgp 123
R2(config-router)#network 20.20.20.0 mask 255.255.255.0

R3(config)#ip route 20.20.20.0 255.255.255.0 f0/0

R3(config)#router bgp 123
R3(config-router)#network 20.20.20.0 mask 255.255.255.0

4、部署:
R3(config)#access-list 10 permit 20.20.20.0 0.0.0.255
R3(config)#route-map pl permit 10
R3(config-route-map)#match ip address 10
R3(config-route-map)#set weight 32768

R3(config-route-map)#route-map pl permit 20
R3(config-route-map)#match ip address 10
R3(config-route-map)#set local-preference 200
R3(config-route-map)#route-map permit 1000

R3(config)#router bgp 123
R3(config-router)#neighbor 2.2.2.2 route-map pl in

四、验证:
1、2、3部署完成后验证:
R3#show ip bgp
Network Next Hop Metric LocPrf Weight Path
*> 20.20.20.0/24 0.0.0.0 0 32768 I

  • i 2.2.2.2 0 100 0 i

R2#show ip bgp
Network Next Hop Metric LocPrf Weight Path

  • i20.20.20.0/24 3.3.3.3 0 100 0 i
    *> 0.0.0.0 0 32768 i
    4、部署完成后验证:

38-高级路由:BGP选路:环路预防

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI