BGP專案
專案目的:
實現全網互通,並按要求的路線進行資料傳輸。
專案拓撲圖:
配置檔案:
R1:
#
sysname r1
#
interface GigabitEthernet0/0/0
ip address 12.1.1.1 255.255.255.0
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
bgp 100
peer 2.2.2.2 as-number 100
peer 2.2.2.2 connect-interface LoopBack0
#
network 1.1.1.1 255.255.255.255
network 12.1.1.0 255.255.255.0
peer 2.2.2.2 enable
#
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 12.1.1.0 0.0.0.255
R2:
#
sysname r2
#
interface GigabitEthernet0/0/0
ip address 12.1.1.2 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 28.1.1.2 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 23.1.1.2 255.255.255.0
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
#
bgp 100
router-id 2.2.2.2
peer 1.1.1.1 as-number 100
peer 1.1.1.1 connect-interface LoopBack0
peer 3.3.3.3 as-number 200
peer 3.3.3.3 ebgp-max-hop 255
peer 3.3.3.3 connect-interface LoopBack0
peer 8.8.8.8 as-number 300
peer 8.8.8.8 ebgp-max-hop 255
peer 8.8.8.8 connect-interface LoopBack0
#
network 1.1.1.1 255.255.255.255
network 2.2.2.2 255.255.255.255
network 3.3.3.3 255.255.255.255
network 8.8.8.8 255.255.255.255
network 12.1.1.0 255.255.255.0
network 23.1.1.0 255.255.255.0
network 28.1.1.0 255.255.255.0
peer 1.1.1.1 enable
peer 1.1.1.1 next-hop-local
peer 3.3.3.3 enable
peer 8.8.8.8 enable
peer 8.8.8.8 route-policy as export
#
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 12.1.1.0 0.0.0.255
#
route-policy as permit node 10
apply as-path 555 666 777 additive
#
ip route-static 3.3.3.3 255.255.255.255 23.1.1.3
ip route-static 8.8.8.8 255.255.255.255 28.1.1.8
R3:
#
sysname r3
#
interface GigabitEthernet0/0/0
ip address 35.1.1.3 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 36.1.1.3 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 23.1.1.3 255.255.255.0
#
interface GigabitEthernet0/0/3
ip address 34.1.1.3 255.255.255.0
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#
bgp 200
router-id 3.3.3.3
peer 2.2.2.2 as-number 100
peer 2.2.2.2 ebgp-max-hop 255
peer 2.2.2.2 connect-interface LoopBack0
peer 4.4.4.4 as-number 200
peer 4.4.4.4 connect-interface LoopBack0
peer 5.5.5.5 as-number 400
peer 5.5.5.5 ebgp-max-hop 255
peer 5.5.5.5 connect-interface LoopBack0
peer 6.6.6.6 as-number 300
peer 6.6.6.6 ebgp-max-hop 255
peer 6.6.6.6 connect-interface LoopBack0
#
network 2.2.2.2 255.255.255.255
network 3.3.3.3 255.255.255.255
network 4.4.4.4 255.255.255.255
network 5.5.5.5 255.255.255.255
network 6.6.6.6 255.255.255.255
network 34.1.1.0 255.255.255.0
network 35.1.1.0 255.255.255.0
network 36.1.1.0 255.255.255.0
peer 2.2.2.2 enable
peer 2.2.2.2 route-policy as export
peer 4.4.4.4 enable
peer 4.4.4.4 next-hop-local
peer 5.5.5.5 enable
peer 6.6.6.6 enable
peer 6.6.6.6 route-policy as export
#
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 34.1.1.0 0.0.0.255
network 3.3.3.3 0.0.0.0
#
route-policy as permit node 10
if-match acl 2000
apply as-path 444 555 666 additive
#
route-policy as permit node 20
#
ip route-static 2.2.2.2 255.255.255.255 23.1.1.2
ip route-static 5.5.5.5 255.255.255.255 35.1.1.5
ip route-static 6.6.6.6 255.255.255.255 36.1.1.6
R4:
#
sysname r4
#
interface GigabitEthernet0/0/0
ip address 45.1.1.4 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 34.1.1.4 255.255.255.0
#
interface LoopBack0
ip address 4.4.4.4 255.255.255.255
#
bgp 200
router-id 4.4.4.4
peer 3.3.3.3 as-number 200
peer 3.3.3.3 connect-interface LoopBack0
peer 5.5.5.5 as-number 400
peer 5.5.5.5 ebgp-max-hop 255
peer 5.5.5.5 connect-interface LoopBack0
#
network 3.3.3.3 255.255.255.255
network 4.4.4.4 255.255.255.255
network 5.5.5.5 255.255.255.255
network 34.1.1.0 255.255.255.0
network 45.1.1.0 255.255.255.0
peer 3.3.3.3 enable
peer 3.3.3.3 next-hop-local
peer 5.5.5.5 enable
#
ospf 1 router-id 4.4.4.4
area 0.0.0.0
network 4.4.4.4 0.0.0.0
network 34.1.1.0 0.0.0.255
#
ip route-static 5.5.5.5 255.255.255.255 45.1.1.5
R5:
#
sysname r5
#
interface GigabitEthernet0/0/0
ip address 56.1.1.5 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 35.1.1.5 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 45.1.1.5 255.255.255.0
#
interface LoopBack0
ip address 5.5.5.5 255.255.255.255
#
bgp 400
router-id 5.5.5.5
peer 3.3.3.3 as-number 200
peer 3.3.3.3 ebgp-max-hop 255
peer 3.3.3.3 connect-interface LoopBack0
peer 4.4.4.4 as-number 200
peer 4.4.4.4 ebgp-max-hop 255
peer 4.4.4.4 connect-interface LoopBack0
peer 6.6.6.6 as-number 300
peer 6.6.6.6 ebgp-max-hop 255
peer 6.6.6.6 connect-interface LoopBack0
#
network 3.3.3.3 255.255.255.255
network 4.4.4.4 255.255.255.255
network 5.5.5.5 255.255.255.255
network 6.6.6.6 255.255.255.255
network 35.1.1.0 255.255.255.0
network 45.1.1.0 255.255.255.0
network 56.1.1.0 255.255.255.0
peer 3.3.3.3 enable
peer 4.4.4.4 enable
peer 6.6.6.6 enable
#
ip route-static 3.3.3.3 255.255.255.255 35.1.1.3
ip route-static 6.6.6.6 255.255.255.255 56.1.1.6
R6:
#
sysname r6
#
interface GigabitEthernet0/0/0
ip address 67.1.1.6 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 56.1.1.6 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 36.1.1.6 255.255.255.0
#
interface LoopBack0
ip address 6.6.6.6 255.255.255.255
#
bgp 300
router-id 6.6.6.6
peer 3.3.3.3 as-number 200
peer 3.3.3.3 ebgp-max-hop 255
peer 3.3.3.3 connect-interface LoopBack0
peer 5.5.5.5 as-number 400
peer 5.5.5.5 ebgp-max-hop 255
peer 5.5.5.5 connect-interface LoopBack0
peer 7.7.7.7 as-number 300
peer 7.7.7.7 connect-interface LoopBack0
peer 8.8.8.8 as-number 300
peer 8.8.8.8 connect-interface LoopBack0
#
network 3.3.3.3 255.255.255.255
network 5.5.5.5 255.255.255.255
network 6.6.6.6 255.255.255.255
network 7.7.7.7 255.255.255.255
network 8.8.8.8 255.255.255.255
network 36.1.1.0 255.255.255.0
network 56.1.1.0 255.255.255.0
network 67.1.1.0 255.255.255.0
peer 3.3.3.3 enable
peer 5.5.5.5 enable
peer 7.7.7.7 enable
peer 7.7.7.7 next-hop-local
peer 8.8.8.8 enable
peer 8.8.8.8 next-hop-local
#
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 6.6.6.6 0.0.0.0
network 67.1.1.0 0.0.0.255
#
ip route-static 3.3.3.3 255.255.255.255 36.1.1.3
ip route-static 5.5.5.5 255.255.255.255 56.1.1.5
R7
#
sysname r7
#
interface GigabitEthernet0/0/0
ip address 78.1.1.7 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 67.1.1.7 255.255.255.0
#
interface LoopBack0
ip address 7.7.7.7 255.255.255.255
#
bgp 300
router-id 7.7.7.7
peer 6.6.6.6 as-number 300
peer 6.6.6.6 connect-interface LoopBack0
peer 8.8.8.8 as-number 300
peer 8.8.8.8 connect-interface LoopBack0
#
network 6.6.6.6 255.255.255.255
network 7.7.7.7 255.255.255.255
network 8.8.8.8 255.255.255.255
network 67.1.1.0 255.255.255.0
network 78.0.0.0
network 78.1.1.0 255.255.255.0
peer 6.6.6.6 enable
peer 8.8.8.8 enable
#
ospf 1 router-id 7.7.7.7
area 0.0.0.0
network 7.7.7.7 0.0.0.0
network 67.1.1.0 0.0.0.255
network 78.1.1.0 0.0.0.255
R8
#
sysname r8
#
interface GigabitEthernet0/0/0
ip address 28.1.1.8 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 78.1.1.8 255.255.255.0
#
interface LoopBack0
ip address 8.8.8.8 255.255.255.255
#
bgp 300
router-id 8.8.8.8
peer 2.2.2.2 as-number 100
peer 2.2.2.2 ebgp-max-hop 255
peer 2.2.2.2 connect-interface LoopBack0
peer 6.6.6.6 as-number 300
peer 6.6.6.6 connect-interface LoopBack0
peer 7.7.7.7 as-number 300
peer 7.7.7.7 connect-interface LoopBack0
#
network 2.2.2.2 255.255.255.255
network 6.6.6.6 255.255.255.255
network 7.7.7.7 255.255.255.255
network 8.8.8.8 255.255.255.255
network 28.1.1.0 255.255.255.0
network 78.1.1.0 255.255.255.0
peer 2.2.2.2 enable
peer 6.6.6.6 enable
peer 6.6.6.6 next-hop-local
peer 7.7.7.7 enable
peer 7.7.7.7 next-hop-local
#
ospf 1 router-id 8.8.8.8
area 0.0.0.0
network 78.1.1.0 0.0.0.255
network 8.8.8.8 0.0.0.0
#
ip route-static 2.2.2.2 255.255.255.255 28.1.1.2
相關文章
- BGP
- BGP/MPLS 虛擬專用網路 Option B
- BGP專線如何提高網路安全與穩定性?
- BGP/MPLS 虛擬專用網路 Option B RR
- 【BGP乾貨】怎麼理解BGP協議?協議
- 普及什麼是BGP伺服器。BGP機房是什麼以及高防BGP伺服器
- BGP協議協議
- 【BGP乾貨】什麼是BGP?有什麼用?
- BGP相關命令
- BGP小實驗
- BGP 路由技術路由
- BGP屬性 ASPath
- 什麼是BGP高防?BGP高防有什麼優勢?
- BGP 相關術語
- BGP基礎知識
- BGP綜合實驗
- BGP是什麼意思,一般的BGP機房是什麼意思
- bgp雙線是什麼意思?bgp雙線有什麼優勢?-ElinkcloudCloud
- BGP團體屬性、CommunityUnity
- 13、BGP與BFD聯動
- BGP協議總結(2)協議
- 【BGP乾貨】BGP線路原則詳解:是什麼?(動態/靜態)
- BGP會損害網路效能?如何根據應用需求最佳化BGP?-ElinkcloudCloud
- BGP路由協議學習一路由協議
- 11、BGP鄰居震盪抑制
- BGP劫持原理及如何防禦
- 6 分鐘看完 BGP 協議。協議
- BBS專案專案總結
- IPLC專線、CN2、BGP、CIA和普通線路的區別和聯絡
- 【專案經驗】--環保專案
- mvn 建立java專案 web專案JavaWeb
- 專案
- BGP - 不同 AS 間執行的協議協議
- HCNP Routing&Switching之BGP路由控制路由
- 專案專案管理包括哪些內容專案管理
- 小米商城專案(JSP+Servlet專案)JSServlet
- git拉取專案以及提交專案Git
- Idea 建立 父專案和子專案Idea