CCNP認證考試OSPF 實驗案例詳解
本文講述了CCNP認證考試OSPF 實驗案例。分享給大家供大家參考,具體如下:
CCNP---OSPF 實驗
目錄
實驗拓撲圖

實驗要求
1.R4為ISP,只能配置IP地址;R4與其他所有直連設備間使用公有IP;
2.R3—R5、R6、R7之間為MGRE環(huán)境,R3為中心站點;
3.整個OSPF環(huán)境IP地址為172.16.0.0 /16;
4.R12配置兩個環(huán)回在EIGRP區(qū)域,其余路由器各自配置一個環(huán)回;
5.所有設備均可訪問R4的環(huán)回;
6.減少LSA的更新量加快收斂,保障更新安全;
7.全網(wǎng)可達。
配置過程
子網(wǎng)劃分
OSPF 區(qū)域:
172.16.0.0 /16 — 借三位
(1)172.16.0.0 /19 – 隧道 — 借兩位
172.16.0.0 /21
172.16.8.0 /21 – R5環(huán)回
172.16.16.0 /21 – R6環(huán)回
172.16.24.0 /21 – R7環(huán)回
(2)172.16.32.0 /19 – a1 — 借兩位
172.16.32.0 /21
172.16.40.0 /21 – R1環(huán)回
172.16.48.0 /21 – R2環(huán)回
172.16.56.0 /21 – R3環(huán)回
(3)172.16.64.0 /19 – a2 — 借兩位
172.16.64.0 /21
172.16.72.0 /21
172.16.80.0 /21 – R11環(huán)回
(4)172.16.96.0 /19 – a3 — 借兩位
172.16.96.0 /21
172.16.104.0 /21
172.16.112.0 /21 – R8環(huán)回
(5)172.16.128.0 /19 – a4 — 借兩位
172.16.128.0 /21
172.16.136.0 /21 – R9環(huán)回
172.16.144.0 /21 – R10環(huán)回
(6)172.16.160.0 /19 – EIGRP 區(qū)域 — 借一位
172.16.160.0 /20 – R12環(huán)回
172.16.176.0 /20 – R12環(huán)回
配置IP地址
R1:
R1#conf t
R1(config)#int fa 0/0
R1(config-if)#ip add 172.16.32.1 255.255.248.0
R1(config-if)#no shu
R1(config-if)#int lo 1
R1(config-if)#ip add
R1(config-if)#ip add 172.16.40.1 255.255.248.0
R1(config-if)#exit
R2:
R2#conf t
R2(config)#int fa 0/0
R2(config-if)#ip add 172.16.32.2 255.255.248.0
R2(config-if)#no shu
R2(config-if)#int lo 1
R2(config-if)#ip add 172.16.48.1 255.255.248.0
R2(config-if)#exit
R3:
R3#conf t
R3(config)#int fa 0/0
R3(config-if)#ip add 172.16.32.3 255.255.248.0
R3(config-if)#no shu
R3(config-if)#int se 4/0
R3(config-if)#ip add 43.0.0.2 255.255.255.0
R3(config-if)#no shu
R3(config-if)#int lo 1
R3(config-if)#ip add 172.16.56.1 255.255.248.0
R3(config-if)#exit
R3(config)#ip route 0.0.0.0 0.0.0.0 43.0.0.1
R4:
R4#conf t
R4(config)#int se 4/0
R4(config-if)#ip add 43.0.0.1 255.255.255.0
R4(config-if)#no shu
R4(config-if)#int se 4/1
R4(config-if)#ip add 45.0.0.1 255.255.255.0
R4(config-if)#no shu
R4(config-if)#int se 4/2
R4(config-if)#ip add 46.0.0.1 255.255.255.0
R4(config-if)#no shu
R4(config-if)#int se 4/3
R4(config-if)#ip add 47.0.0.1 255.255.255.0
R4(config-if)#no shu
R4(config-if)#int lo 1
R4(config-if)#ip add 4.4.4.4 255.255.255.0
R4(config-if)#end
R4#write
R5:
R5#conf t
R5(config)#int se 4/1
R5(config-if)#ip add 45.0.0.2 255.255.255.0
R5(config-if)#no shu
R5(config-if)#int lo 1
R5(config-if)#ip add 172.16.8.1 255.255.248.0
R5(config-if)#exit
R5(config)#ip route 0.0.0.0 0.0.0.0 45.0.0.1
R6:
R6#conf t
R6(config)#int se 4/2
R6(config-if)#ip add 46.0.0.2 255.255.255.0
R6(config-if)#no shu
R6(config-if)#in se 4/0
R6(config-if)#ip add 172.16.64.1 255.255.248.0
R6(config-if)#no shu
R6(config-if)#int lo 1
R6(config-if)#ip add 172.16.16.1 255.255.248.0
R6(config-if)#exit
R6(config)#ip route 0.0.0.0 0.0.0.0 46.0.0.1
R7:
R7#conf t
R7(config)#int se 4/3
R7(config-if)#ip add 47.0.0.2 255.255.255.0
R7(config-if)#no shu
R7(config-if)#int se 4/0
R7(config-if)#ip add 172.16.96.1 255.255.248.0
R7(config-if)#no shu
R7(config-if)#int lo 1
R7(config-if)#ip add 172.16.24.1 255.255.248.0
R7(config-if)#exit
R7(config)#ip route 0.0.0.0 0.0.0.0 47.0.0.1
R8:
R8#conf t
R8(config)#int se 4/0
R8(config-if)#ip add 172.16.96.2 255.255.248.0
R8(config-if)#no shu
R8(config-if)#int se 4/1
R8(config-if)#ip add 172.16.104.1 255.255.248.0
R8(config-if)#no shu
R8(config-if)#int lo 1
R8(config-if)#ip add 172.16.112.1 255.255.248.0
R8(config-if)#exit
R9:
R9#conf t
R9(config)#int se 4/1
R9(config-if)#ip add 172.16.104.2 255.255.248.0
R9(config-if)#no shu
R9(config-if)#int se 4/2
R9(config-if)#ip add 172.16.128.1 255.255.248.0
R9(config-if)#no shu
R9(config-if)#int lo 1
R9(config-if)#ip add 172.16.136.1 255.255.248.0
R9(config-if)#exit
R10:
R10#conf t
R10(config)#int se 4/2
R10(config-if)#ip add 172.16.128.2 255.255.248.0
R10(config-if)#no shu
R10(config)#int lo 1
R10(config-if)#ip add 172.16.144.1 255.255.248.0
R10(config-if)#exit
R11:
R11#conf t
R11(config)#int se 4/0
R11(config-if)#ip add 172.16.64.2 255.255.248.0
R11(config-if)#no shu
R11(config-if)#int se 4/1
R11(config-if)#ip add 172.16.72.1 255.255.248.0
R11(config-if)#no shu
R11(config-if)#int lo 1
R11(config-if)#ip add 172.16.80.1 255.255.248.0
R11(config-if)#exit
R12:
R12#conf t
R12(config)#int se 4/1
R12(config-if)#ip add 172.16.72.2 255.255.248.0
R12(config-if)#no shu
R12(config-if)#int lo 1
R12(config-if)#ip add 172.16.160.1 255.255.240.0
R12(config-if)#int lo 2
R12(config-if)#ip add 172.16.172.1 255.255.240.0
R12(config-if)#exit
建立隧道(MGRE)
R3:
R3(config)#int tun 1
R3(config-if)#ip add 172.16.0.1 255.255.248.0
R3(config-if)#tun source 43.0.0.2
R3(config-if)#tun mod gre mul
R3(config-if)#ip nhrp map mul dyna
R3(config-if)#ip nhrp network-id 300
R3(config-if)#exit
R5:
R5(config)#int tun 1
R5(config-if)#ip add 172.16.0.2 255.255.248.0
R5(config-if)#tun sou se 4/1
R5(config-if)#tun mod gre mul
R5(config-if)#ip nhrp nhs 172.16.0.1
R5(config-if)#ip nhrp map 172.16.0.1 43.0.0.2
R5(config-if)#ip nhrp network-id 300
R5(config-if)#ip nhrp map mul 45.0.0.2(開啟偽廣播)
R5(config-if)#exit
R6:
R6(config)#int tun 1
R6(config-if)#ip add 172.16.0.3 255.255.248.0
R6(config-if)#tun sou se 4/2
R6(config-if)#tun mod gre mul
R6(config-if)#ip nhrp nhs 172.16.0.1
R6(config-if)#ip nhrp map 172.16.0.1 43.0.0.2
R6(config-if)#ip nhrp network-id 300
R6(config-if)#ip nhrp map mul 46.0.0.2
R6(config-if)#exit
R7:
R7(config)#int tun 1
R7(config-if)#ip add 172.16.0.4 255.255.248.0
R7(config-if)#tun sou se 4/3
R7(config-if)#tun mod gre mul
R7(config-if)#ip nhrp nhs 172.16.0.1
R7(config-if)#ip nhrp map 172.16.0.1 43.0.0.2
R7(config-if)#ip nhrp network-id 300
R7(config-if)#ip nhrp map mul 47.0.0.2
R7(config-if)#exit
啟用協(xié)議
R1:
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#net 172.16.0.0 0.0.255.255 a 1
R2:
R2(config)#router ospf 1
R2(config-router)#router-id 2.2.2.2
R2(config-router)#net 172.16.0.0 0.0.255.255 a 1
R3:
R3(config)#router ospf 1
R3(config-router)#router-id 3.3.3.3
R3(config-router)#net 172.16.32.3 0.0.0.0 a 1
R3(config-router)#net 172.16.56.1 0.0.0.0 a 1
R3(config-router)#net 172.16.0.1 0.0.0.0 a 0
R3(config-router)#exit
R3(config)#int tun 1
R3(config-if)#ip ospf net point-to-multipoint(修改模式為一對多,防止路由翻滾)
R5:
R5(config)#router ospf 1
R5(config-router)#router-id 5.5.5.5
R5(config-router)#net 172.16.0.2 0.0.0.0 a 0
R5(config-router)#net 172.16.8.1 0.0.0.0 a 0
R5(config-router)#exit
R5(config)#int tun 1
R5(config-if)#ip ospf net point-to-multipoint
R5(config-router)#end
R5#write
R6:
R6(config)#router ospf 1
R6(config-router)#router-id 6.6.6.6
R6(config-router)#net 172.16.0.3 0.0.0.0 a 0
R6(config-router)#net 172.16.16.1 0.0.0.0 a 0
R6(config-router)#net 172.16.64.1 0.0.0.0 a 2
R6(config-router)#exit
R6(config)#int tun 1
R6(config-if)#ip ospf net point-to-multipoint
R7:
R7(config)#router ospf 1
R7(config-router)#router-id 7.7.7.7
R7(config-router)#net 172.16.0.4 0.0.0.0 a 0
R7(config-router)#net 172.16.24.1 0.0.0.0 a 0
R7(config-router)#net 172.16.96.1 0.0.0.0 a 3
R7(config-router)#exit
R7(config)#int tun 1
R7(config-if)#ip ospf net point-to-multipoint
R8:
R8(config)#router ospf 1
R8(config-router)#router-id 8.8.8.8
R8(config-router)#net 172.16.0.0 0.0.255.255 a 3
R9:
R9(config)#router ospf 1
R9(config-router)#router-id 9.9.9.9
R9(config-router)#net 172.16.104.2 0.0.0.0 a 3
R9(config-router)#exit
R9(config)#router ospf 2
R9(config-router)#router-id 99.99.99.99
R9(config-router)#net 172.16.128.1 0.0.0.0 a 4
R9(config-router)#net 172.16.136.1 0.0.0.0 a 4
R10:
R10(config)#router ospf 1
R10(config-router)#router-id 10.10.10.10
R10(config-router)#net 172.16.0.0 0.0.255.255 a 4
R10(config-router)#end
R10#write
R11:
R11(config)#router ospf 1
R11(config-router)#router-id 11.11.11.11
R11(config-router)#net 172.16.0.0 0.0.255.255 a 2
R12
R12(config)#router ospf 1
R12(config-router)#router-id 12.12.12.12
R12(config-router)#net 172.16.72.2 0.0.0.0 a 2
R12(config-router)#exit
R12(config)#router eigrp 90
R12(config-router)#net 172.16.160.1 0.0.0.0
R12(config-router)#net 172.16.176.1 0.0.0.0
R12(config-router)#no auto-summary
處理不規(guī)則區(qū)域 a4 及域外路由 EIGRP
特殊區(qū)域(多進程雙向重發(fā)布):
R9(config)#router ospf 1
R9(config-router)#redistribute ospf 2 subnets
R9(config-router)#router ospf 2
R9(config-router)#redistribute ospf 1 subnets
域外路由 EIGRP:
R12(config)#router ospf 1
R12(config-router)#redistribute eigrp 90 subnets
此時 OSPF 內網(wǎng)全網(wǎng)可達。
配置 NAT
R3:
R3(config)#int se 4/0
R3(config-if)#ip nat outside
R3(config-if)#int fa 0/0
R3(config-if)#ip nat inside
R3(config-if)#exit
R3(config)#access-list 1 permit 172.16.0.0 0.0.255.255
R3(config)#ip nat inside source list 1 interface se 4/0
R3(config)#router ospf 1
R3(config-router)#default-information originate(下發(fā)缺?。?/p>
R6:
R6(config)#int se 4/2
R6(config-if)#ip nat outside
R6(config-if)#int se 4/0
R6(config-if)#ip nat inside
R6(config-if)#exit
R6(config)#access-list 1 permit 172.16.0.0 0.0.255.255
R6(config)#ip nat inside source list 1 interface se 4/2
R6(config)#router ospf 1
R6(config-router)#default-information originate
R7:
R7(config)#int se 4/3
R7(config-if)#ip nat outside
R7(config-if)#int se 4/0
R7(config-if)#ip nat inside
R7(config-if)#exit
R7(config)#access-list 1 permit 172.16.0.0 0.0.255.255
R7(config)#ip nat inside source list 1 interface se 4/3
R7(config)#router ospf 1
R7(config-router)#default-information originate
R9:
R9(config)#router ospf 2
R9(config-router)#default-information originate
此時全網(wǎng)可達。
優(yōu)化路由,減少 LSA 的更新量
手工匯總(ABR、ASBR)
R3(匯總區(qū)域1):
R3(config)#router ospf 1
R3(config-router)#area 1 range 172.16.32.0 255.255.224.0
R6(匯總區(qū)域2):
R6(config)#router ospf 1
R6(config-router)#area 2 range 172.16.64.0 255.255.224.0
R7(匯總區(qū)域3):
R7(config)#router ospf 1
R7(config-router)#area 3 range 172.16.96.0 255.255.224.0
R12(手工匯總域外路由):
R12(config)#router ospf 1
R12(config-router)#summary-address 172.16.160.0 255.255.224.0
R9(手工匯總區(qū)域4):
R9(config-router)#router ospf 1
R9(config-router)#area 4 range 172.16.128.0 255.255.224.0
PS:多進程雙向重發(fā)布之后R9也屬于 ASBR 。
特殊區(qū)域
(1)完全末梢區(qū)域(totally-stub)
R1:
R1(config)#router ospf 1
R1(config-router)#area 1 stub
R1(config-router)#end
R1#write
R2:
R2(config)#router ospf 1
R2(config-router)#area 1 stub
R2(config-router)#end
R2#write
R3:
R3(config)#router ospf 1
R3(config-router)#area 1 stub
R3(config-router)#area 1 stub no-summary
R3(config-router)#end
R3#write
PS:末梢區(qū)域需要在該區(qū)域的所有路由器上面配置,否則鄰居關系會斷開;而完全末梢區(qū)域只需要在ABR 上面配置。
(2)完全 NSSA
區(qū)域2:
R11:
R11(config)#router ospf 1
R11(config-router)#area 2 nssa
R11(config-router)#end
R11#write
R12:
R12(config)#router ospf 1
R12(config-router)#area 2 nssa
R12(config-router)#end
R12#write
R6:
R6(config)#router ospf 1
R6(config-router)#area 2 nssa
R6(config-router)#area 2 nssa no-summary
R6(config-router)#end
R6#write
區(qū)域3:
R8:
R8(config)#router ospf 1
R8(config-router)#area 3 nssa
R8(config-router)#end
R8#write
R9:
R9(config)#router ospf 1
R9(config-router)#area 3 nssa
R9(config-router)#end
R9#write
R7:
R7(config)#router ospf 1
R7(config-router)#area 3 nssa
R7(config-router)#area 3 nssa no-summary
R7(config-router)#end
R7#write
此時路由最簡最優(yōu)。

相關文章
- 這篇文章主要介紹了CCNP 認證考試OSPF基本概念與原理,較為詳細的分析了CCNP 認證考試中OSPF基本概念、原理、配置方法及相關操作注意事項,需要的朋友可以參考下2020-04-10
這篇文章主要介紹了思科CCNP認證交換知識點,總結記錄了思科CCNP認證交換技術與交換機操作相關概念、原理、知識點與注意事項,需要的朋友可以參考下2020-03-26
CCNP TSHOOT(642-832)認證考試指南 中文PDF版 73.7MB
本書涵蓋了與TSHOOT考試相關的Cisco Catalyst交換機和路由器的各種故障檢測與排除技術,包括STP、第一跳冗余性協(xié)議、EIGRP、OSPF、BGP、路由重分發(fā)、IP服務、IP通信以及IPv2016-10-19
CCNP-ONT認證考試指南 中文PDF掃描版 8.55MB
本書是Cisco CCNP ONT認證考試(642-845)的官方指南,全書緊密圍繞ONT考試主題,在內容的組織和編寫上切實凸顯了認證考試需求。此外,本書也非常適合從事融合型網(wǎng)絡優(yōu)化和設2016-10-10
CCNP BCMSN 認證考試指南(第4版) 中文PDF版 13.3MB
全書分為7個部分,共20章和1個附錄,內容包括:園區(qū)網(wǎng)概述和設計、交換機端口配置、VLAN和中繼、聚合交換機鏈路、生成樹協(xié)議、多層交換、路由器、監(jiān)控引擎和電源冗余、IP電2016-10-10
本書是Cisco CCNP ISCW認證考試(642-825)的官方學習認證指南,主要內容包括基本的遠程工作者服務實現(xiàn)技術、幀模式MPLS的實現(xiàn)、站點互聯(lián)IPSec VPN的實現(xiàn)以及網(wǎng)絡安全策略(包2016-10-10
CCNPSWITCH認證考試指南 中文PDF掃描版 47.6MB
每章開頭的“我已經(jīng)知道了嗎?”測驗幫助讀者確定如何分配有限的學習時間,末尾的“備考任務”列出了本章的關鍵主題和重要術語并對涉及的命令進行了總結,配套光盤中的模擬2016-10-10
CCNP BSCI認證考試指南 高夫 Gough Clare 中文 PDF版 [78M]
CCNP BSCI認證考試指南》是一部全面的備考CCNP/CCDP/CCIP考試的自學書籍,它考察了讀者構建可擴展的Cisco互連網(wǎng)絡的能力2012-12-03
思科CCNP安全認證642系列官方指南英文版,包括642-617,642-637,642-6472011-10-23
思科CCNA路由器配置——OSPF基于區(qū)域的MD5認證實驗詳解
這篇文章主要介紹了思科CCNA路由器OSPF基于區(qū)域的MD5認證實驗,結合實例形式詳細分析了思科CCNA OSPF基于區(qū)域的MD5認證具體步驟、配置命令與相關操作注意事項,需要的朋友可2020-03-03










