日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

使用分发列表过滤BGP路由

發布時間:2023/12/15 编程问答 24 豆豆
生活随笔 收集整理的這篇文章主要介紹了 使用分发列表过滤BGP路由 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

一、拓撲圖:

二、配置各路由器的IP地址,并運行BGP協議。
1、為了讓R3學到明細路由,我們把R1自動匯總關掉:
R1(config)#router bgp 64512 R1(config-router)#no auto-summary R1(config-router)#net 172.16.255.0 mask 255.255.255.252 R1(config-router)#net 172.16.0.1 mask 255.255.255.252 R1(config-router)#net 172.16.0.0 mask 255.255.255.0? R1(config-router)#net 172.16.1.0 mask 255.255.255.0 R1(config-router)#net 172.16.2.0 mask 255.255.255.0 R1(config-router)#net 172.16.3.0 mask 255.255.255.0 R1(config-router)#nei 172.16.255.2 remote 64512 R2(config-if)#router bgp 64512 R2(config-router)#net 172.16.255.0 mask 255.255.255.252 R2(config-router)#net 10.1.255.0 mask 255.255.255.252 R2(config-router)#nei 172.16.255.1 remote 64512 R2(config-router)#nei 10.1.255.2 remote 64513 R3(config-if)#router bgp 64513 R3(config-router)#net 10.1.255.0 mask 255.255.255.252 R3(config-router)#nei 10.1.255.1 remote 64512
2、配置完之后,看一下R3的路由表:
R3#sh ip route ………… Gateway of last resort is not set 172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks B???????172.16.255.0/30 [20/0] via 10.1.255.1, 00:08:58 B???????172.16.0.0/24 [20/0] via 10.1.255.1, 00:08:58 B???????172.16.1.0/24 [20/0] via 10.1.255.1, 00:08:58 B???????172.16.2.0/24 [20/0] via 10.1.255.1, 00:08:58 B???????172.16.3.0/24 [20/0] via 10.1.255.1, 00:08:58 10.0.0.0/30 is subnetted, 1 subnets C???????10.1.255.0 is directly connected, Serial1/0
三、在R2上建立ACL,并用分發列表去應用ACL以達到過濾指定的路由:
R2(config)#access-list 1 deny 172.16.0.0 0.0.0.255 R2(config)#access-list 1 deny 172.16.1.0 0.0.0.255 R2(config)#access-list 1 per any?(其它路由都不拒絕) R2(config-router)#nei 10.1.255.2 distribute-list 1 out?(對目標鄰居應用分發列表)
四、再來查看一下R3的路由表,發現指定的兩條路由被過濾掉了:
R3#clear ip bgp * soft?(軟涮新一下BGP數據庫) R3#sh ip route ……………… Gateway of last resort is not set 172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks B???????172.16.255.0/30 [20/0] via 10.1.255.1, 00:17:19 B???????172.16.2.0/24 [20/0] via 10.1.255.1, 00:17:19 B???????172.16.3.0/24 [20/0] via 10.1.255.1, 00:17:19 10.0.0.0/30 is subnetted, 1 subnets C???????10.1.255.0 is directly connected, Serial1/0 R3#
本文轉自wxs-163 51CTO博客,原文鏈接:http://blog.51cto.com/supercisco/273886

總結

以上是生活随笔為你收集整理的使用分发列表过滤BGP路由的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。