最近在網上看到這個拓撲感覺不錯,就拿來做了,做了些小修改
配置:
<RT1>dis cu
#
version 5.20, Alpha 1011
#
sysname RT1
#
router id 1.1.1.1
#
vlan 1
#
domain system
access-limit disable
state active
idle-cut disable
self-service-url disable
#
interface Ethernet0/1/0
port link-mode route
#
interface Serial0/2/0
link-protocol ppp
ip address 17.17.17.1 255.255.255.0
#
interface Serial0/2/1
link-protocol ppp
ip address 14.14.14.1 255.255.255.0
#
interface NULL0
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
bgp 100
undo synchronization
peer 17.17.17.7 as-number 700
peer 14.14.14.4 as-number 100
peer 14.14.14.4 next-hop-local//強制本地爲下一跳
#
load xml-configuration
#
user-interface con 0
user-interface vty 0 4
#
return
<RT2>dis cu
#
version 5.20, Alpha 1011
#
sysname RT2
#
router id 2.2.2.2
#
vlan 1
#
domain system
access-limit disable
state active
idle-cut disable
self-service-url disable
#
acl number 2000
rule 0 permit source 4.4.4.4 0/用acl匹配數據流,用於策略
#
interface Ethernet0/1/0
port link-mode route
#
interface Serial0/2/0
link-protocol ppp
ip address 24.24.24.2 255.255.255.0
#
interface Serial0/2/1
link-protocol ppp
ip address 23.23.23.2 255.255.255.0
#
interface Serial0/2/2
link-protocol ppp
ip address 25.25.25.2 255.255.255.0
#
interface NULL0
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
#
bgp 100
import-route ospf 1
undo synchronization
peer 4.4.4.4 as-number 100
peer 25.25.25.5 as-number 500
peer 3.3.3.3 as-number 100
peer 4.4.4.4 next-hop-local
peer 4.4.4.4 connect-interface LoopBack0/用換回口做bgp的建立
peer 25.25.25.5 route-policy xuanlu export//應用策略在出方向
peer 3.3.3.3 connect-interface LoopBack0
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 24.24.24.0 0.0.0.255
network 23.23.23.0 0.0.0.255
#
route-policy xuanlu permit node 10
if-match acl 2000
apply cost 22222//修改med值
#
load xml-configuration
#
user-interface con 0
user-interface vty 0 4
#
return
<RT3>dis cu
#
version 5.20, Alpha 1011
#
sysname RT3
#
router id 3.3.3.3
#
vlan 1
#
domain system
access-limit disable
state active
idle-cut disable
self-service-url disable
#
acl number 2000
rule 0 permit source 50.1.1.1 0
#
interface Ethernet0/1/0
port link-mode route
#
interface Serial0/2/0
link-protocol ppp
ip address 23.23.23.3 255.255.255.0
#
interface Serial0/2/1
link-protocol ppp
ip address 35.35.35.3 255.255.255.0
#
interface Serial0/2/2
link-protocol ppp
ip address 34.34.34.3 255.255.255.0
#
interface NULL0
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#
bgp 100
import-route ospf 1//引入ospf
undo synchronization
peer 4.4.4.4 as-number 100
peer 2.2.2.2 as-number 100
peer 35.35.35.5 as-number 500
peer 4.4.4.4 route-policy xuanlu export
peer 4.4.4.4 next-hop-local
peer 4.4.4.4 connect-interface LoopBack0
peer 2.2.2.2 connect-interface LoopBack0
#
ospf 1
area 0.0.0.0
network 23.23.23.0 0.0.0.255
network 34.34.34.0 0.0.0.255
network 3.3.3.3 0.0.0.0
#
route-policy xuanlu permit node 10
if-match acl 2000
apply local-preference 333
#
load xml-configuration
#
user-interface con 0
user-interface vty 0 4
#
return
<RT4>dis cu
#
version 5.20, Alpha 1011
#
sysname RT4
#
router id 4.4.4.4
#
vlan 1
#
domain system
access-limit disable
state active
idle-cut disable
self-service-url disable
#
interface Ethernet0/1/0
port link-mode route
#
interface Serial0/2/0
link-protocol ppp
ip address 14.14.14.4 255.255.255.0
#
interface Serial0/2/1
link-protocol ppp
ip address 24.24.24.4 255.255.255.0
#
interface Serial0/2/2
link-protocol ppp
ip address 34.34.34.4 255.255.255.0
#
interface Serial0/2/3
link-protocol ppp
ip address 46.46.46.4 255.255.255.0
#
interface NULL0
#
interface LoopBack0
ip address 4.4.4.4 255.255.255.255
#
bgp 100
import-route ospf 1
undo synchronization
peer 14.14.14.1 as-number 100
peer 2.2.2.2 as-number 100
peer 46.46.46.6 as-number 600
peer 3.3.3.3 as-number 100
peer 14.14.14.1 reflect-client/反射器
peer 2.2.2.2 connect-interface LoopBack0
peer 3.3.3.3 connect-interface LoopBack0
#
ospf 1
area 0.0.0.0
network 24.24.24.0 0.0.0.255
network 34.34.34.0 0.0.0.255
network 4.4.4.4 0.0.0.0
#
load xml-configuration
#
user-interface con 0
user-interface vty 0 4
#
return
<RT5>dis cu
#
version 5.20, Alpha 1011
#
sysname RT5
#
router id 5.5.5.5
#
vlan 1
#
domain system
access-limit disable
state active
idle-cut disable
self-service-url disable
#
interface Ethernet0/1/0
port link-mode route
ip address 50.50.50.50 255.255.255.0
#
interface Serial0/2/0
link-protocol ppp
ip address 25.25.25.5 255.255.255.0
#
interface Serial0/2/1
link-protocol ppp
ip address 35.35.35.5 255.255.255.0
#
interface NULL0
#
interface LoopBack0
ip address 5.5.5.5 255.255.255.255
#
interface LoopBack1
ip address 50.1.1.1 255.255.255.255
#
interface LoopBack2
ip address 50.2.2.2 255.255.255.255
#
interface LoopBack3
ip address 50.3.3.3 255.255.255.255
#
bgp 500
network 50.50.50.0 255.255.255.0
import-route direct route-policy 501
undo synchronization
peer 25.25.25.2 as-number 100
peer 35.35.35.3 as-number 100
#
route-policy 501 permit node 10
if-match ip-prefix 501
#
ip ip-prefix 501 index 10 permit 50.1.1.1 32//ip前綴列表
#
load xml-configuration
#
user-interface con 0
user-interface vty 0 4
#
return
<RT6>dis cu
#
version 5.20, Alpha 1011
#
sysname RT6
#
router id 6.6.6.6
#
vlan 1
#
domain system
access-limit disable
state active
idle-cut disable
self-service-url disable
#
interface Ethernet0/1/0
port link-mode route
ip address 60.60.60.60 255.255.255.0
#
interface Serial0/2/0
link-protocol ppp
ip address 46.46.46.6 255.255.255.0
#
interface NULL0
#
interface LoopBack0
ip address 6.6.6.6 255.255.255.255
#
bgp 600
network 60.60.60.0 255.255.255.0
undo synchronization
peer 46.46.46.4 as-number 100
peer 46.46.46.4 route-policy tuanti export
peer 46.46.46.4 advertise-community//團體屬性
#
route-policy tuanti permit node 10
apply community no-export//具有此屬性的路由在收到後,不能被髮布到本地AS之外
#
load xml-configuration
#
user-interface con 0
user-interface vty 0 4
#
return
<RT7>dis cu
#
version 5.20, Alpha 1011
#
sysname RT7
#
router id 7.7.7.7
#
vlan 1
#
domain system
access-limit disable
state active
idle-cut disable
self-service-url disable
#
interface Ethernet0/1/0
port link-mode route
ip address 70.70.70.70 255.255.255.0
#
interface Serial0/2/0
link-protocol ppp
ip address 17.17.17.7 255.255.255.0
#
interface NULL0
#
interface LoopBack0
ip address 7.7.7.7 255.255.255.255
#
bgp 700
network 70.70.70.0 255.255.255.0
undo synchronization
peer 17.17.17.1 as-number 100
peer 17.17.17.1 route-policy jieshou import
#
route-policy jieshou permit node 10
if-match as-path 111
#
ip as-path 111 deny 100$//正則表達式,拒絕as100
ip as-path 111 permit .*//允許所有
#
load xml-configuration
#
user-interface con 0
user-interface vty 0 4
#
return
BGP綜合實驗
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
在 單 個 區 域 配 置OSPF
wpgs
2019-02-23 14:05:20
互連多個OSPF區域
wpgs
2019-02-23 14:05:20
OSPF篇:幀中繼承載OSPF-廣播
shejp4010
2019-02-23 13:22:24
LVS集羣部署詳細過程(LVS+OSPF)
vfast_wuwei
2019-02-23 12:55:06
LVS在大流量下基於OSPF的負載均衡實施方案
vfast_wuwei
2019-02-23 12:55:03
ospf缺省路由的產生
網絡征途
2019-02-23 00:33:41
ospf
shuiyong1989
2019-02-22 23:16:58
lvs fullnat部署手冊(二)keepalived配置篇
紫暝1127
2019-02-22 23:07:00
基於centos部署lvs fullnat 彙總
紫暝1127
2019-02-22 23:07:00
H3C——路由引入和路由過濾配置實例
maguanghua00
2019-02-22 22:43:20
BGP 13條選路原則
linuxchenju
2019-02-22 23:52:22
bgp
shuiyong1989
2019-02-22 23:16:58
24小時熱門文章
-
再談23種設計模式(3):行爲型模式(學習筆記)
-
Power Automate Desktop 安裝完,登錄後老是提示one driver 錯誤
-
微前端學習筆記(4):從微前端到微模塊之EMP與hel-micro方案探索
-
微前端學習筆記(1):微前端總體架構概述,從微服務發微
-
985 碩士程序員,空窗 4 個月沒有 Offer!
-
一文搞懂 Spring 循環依賴
-
賽博鬥地主——使用大語言模型扮演Agent智能體玩牌類遊戲。
-
VScode右鍵打開(添加到右鍵)
-
記一次 .NET某工控視覺自動化系統 卡死分析
-
WindowsServer--SQL Server搭建主從同步實現讀寫分離 - 事務性分發