實驗目的:redis
掌握OSPF的高級配置 (路由優化、地址彙總、虛鏈路和重分發)網絡
實驗環境拓撲圖及要求:dom
要求:ide
一、 如圖所示,根據要求配置動態路由協議,配置路由重分發和虛鏈路,實現全網互通。oop
二、 查看RouterA路由表,路由標誌E2和IA分別表示什麼含義學習
三、 優化路由:配置區域3徹底末梢區域測試
四、 優化路由:配置區域2 NSSA,比較路由器D路由表的變化,可否再學習到路由器E的路由?優化
五、 在路由器D上ping 100.16.1.1,可否ping通,若不通,該如何解決?3d
六、 優化路由:在路由器A、B、D上進行路由彙總,在路由器A上查看路由表,比較路由表的變化。router
實驗步驟:【必寫】
分類寫出你的實驗進行中的步驟,可用文字或圖片加水印標記
配置文檔:
RA:
en
conf t
host RA
no ip domain-lookup
int loop 0 //配置loop的IP地址
ip add 10.0.0.1 255.255.0.0
exit
int loop 1
ip add 200.16.1.1 255.255.255.0
exit
int loop 2
ip add 200.16.2.1 255.255.255.0
exit
int loop 3
ip add 200.16.3.1 255.255.255.0
exit
int f0/0 //配置端口IP地址
ip add 192.168.1.2 255.255.255.0
no sh
exit
router ospf 250 //啓動ospf協議
network 10.0.0.0 0.0.255.255 area 0 //宣告相應的網段並加入相應的區域
network 192.168.1.0 0.0.0.255 area 0
network 200.16.0.0 0.0.3.255 area 3
area 3 range 200.16.0.0 255.255.252.0 //配置彙總地址
ip route 200.16.0.0 255.255.252.0 Null0 //配置一條黑洞路由,將沒必要要的路由信息丟棄
end
------------------------------------------------------
RB:
en
conf t
host RB
no ip domain-lookup
int loop 0
ip add 20.0.0.2 255.255.0.0
exit
int f0/0
ip add 192.168.0.1 255.255.255.0
no sh
exit
int f1/0
ip add 192.168.1.1 255.255.255.0
no sh
exit
int f2/0
ip add 200.1.1.1 255.255.255.0
no sh
exit
router rip //啓用RIP協議
redistribute ospf 250 metric 10 //配置協議重分發並設置跳數爲10
version 2 //配置rip爲版本2
no auto-summary //關閉自動彙總
network 200.1.1.0 //宣告網段
network 100.16.1.0
network 100.16.2.0
network 100.16.3.0
exit
router ospf 250
redistribute rip metric 200 subnets //配置協議重分發並設置管理距離爲200,連同子網一塊兒宣告
network 20.0.0.0 0.0.255.255 area 1
network 192.168.0.0 0.0.0.255 area 1
network 192.168.1.0 0.0.0.255 area 0
area 1 virtual-link 30.0.0.3 //在區域1上配置一條虛鏈路並指向對應的端口
end
------------------------------------------------------------
RC:
en
conf t
host RC
no ip domain-lookup
int loop 0
ip add 30.0.0.3 255.255.0.0
exit
int f0/0
ip add 172.16.0.1 255.255.255.0
no sh
exit
int f1/0
ip add 192.168.0.2 255.255.255.0
no sh
exit
router ospf 250
network 192.168.0.0 0.0.0.255 area 1
network 30.0.0.0 0.0.255.255 area 2
network 172.16.0.0 0.0.0.255 area 2
area 1 virtual-link 20.0.0.2 //在區域1上配置一條虛鏈路並指向對應的端口
end
-------------------------------------------------------------------
RD:
en
conf t
host RD
no ip domain-lookup
int loop 0
ip add 40.0.0.4 255.255.0.0
exit
int loop 1
ip add 172.16.1.1 255.255.255.0
exit
int loop 2
ip add 172.16.2.1 255.255.255.0
exit
int loop 3
ip add 172.16.3.1 255.255.255.0
exit
int f0/0
ip add 172.16.0.2 255.255.255.0
no sh
exit
router rip
redistribute ospf 250 metric 10
version 2
no auto-summary
network 172.16.1.0
network 172.16.2.0
network 172.16.3.0
exit
router ospf 250
redistribute rip metric 200 subnets
network 172.16.0.0 0.0.0.255 area 2
network 40.0.0.0 0.0.255.255 area 2
end
----------------------------------------------------------------------
RE:
en
conf t
host RE
no ip domain-lookup
int loop 1
ip add 100.16.1.1 255.255.255.0
exit
int loop 2
ip add 100.16.2.1 255.255.255.0
exit
int loop 3
ip add 100.16.3.1 255.255.255.0
exit
int f0/0
ip add 200.1.1.2 255.255.255.0
no sh
exit
router rip
version 2
no auto-summary
network 200.1.1.0
network 100.16.1.0
network 100.16.2.0
network 100.16.3.0
end
-------------------------------------------------------------------
測試截圖:
再按照題目3,4的要求作。。。。
RA:
en
conf t
host RA
no ip domain-lookup
int loop 0
ip add 10.0.0.1 255.255.0.0
exit
int loop 1
ip add 200.16.1.1 255.255.255.0
exit
int loop 2
ip add 200.16.2.1 255.255.255.0
exit
int loop 3
ip add 200.16.3.1 255.255.255.0
exit
int f0/0
ip add 192.168.1.2 255.255.255.0
no sh
exit
router ospf 250
network 10.0.0.0 0.0.255.255 area 0
network 192.168.1.0 0.0.0.255 area 0
network 200.16.0.0 0.0.3.255 area 3
area 3 range 200.16.0.0 255.255.252.0
area 3 stub no-summary //配置區域三爲徹底末梢區域
ip route 200.16.0.0 255.255.252.0 Null0
end
------------------------------------------------------
RB:
en
conf t
host RB
no ip domain-lookup
int loop 0
ip add 20.0.0.2 255.255.0.0
exit
int f0/0
ip add 192.168.0.1 255.255.255.0
no sh
exit
int f1/0
ip add 192.168.1.1 255.255.255.0
no sh
exit
int f2/0
ip add 200.1.1.1 255.255.255.0
no sh
exit
router rip
redistribute ospf 250 metric 10
version 2
no auto-summary
network 200.1.1.0
network 100.16.1.0
network 100.16.2.0
network 100.16.3.0
exit
router ospf 250
redistribute rip metric 200 subnets
network 20.0.0.0 0.0.255.255 area 1
network 192.168.0.0 0.0.0.255 area 1
network 192.168.1.0 0.0.0.255 area 0
summary-address 100.16.0.0 255.255.252.0 //外部彙總
area 1 virtual-link 30.0.0.3
end
------------------------------------------------------------
RC:
en
conf t
host RC
no ip domain-lookup
int loop 0
ip add 30.0.0.3 255.255.0.0
exit
int f0/0
ip add 172.16.0.1 255.255.255.0
no sh
exit
int f1/0
ip add 192.168.0.2 255.255.255.0
no sh
exit
router ospf 250
network 192.168.0.0 0.0.0.255 area 1
network 30.0.0.0 0.0.255.255 area 2
network 172.16.0.0 0.0.0.255 area 2
area 1 virtual-link 20.0.0.2
area 2 nssa no-summary //配置區域2爲徹底非純末梢區域
end
-------------------------------------------------------------------
RD:
en
conf t
host RD
no ip domain-lookup
int loop 0
ip add 40.0.0.4 255.255.0.0
exit
int loop 1
ip add 172.16.1.1 255.255.255.0
exit
int loop 2
ip add 172.16.2.1 255.255.255.0
exit
int loop 3
ip add 172.16.3.1 255.255.255.0
exit
int f0/0
ip add 172.16.0.2 255.255.255.0
no sh
exit
router rip
redistribute ospf 250 metric 10
version 2
no auto-summary
network 172.16.1.0
network 172.16.2.0
network 172.16.3.0
exit
router ospf 250
redistribute rip metric 200 subnets
summary-address 172.16.0.0 255.255.252.0 //外部彙總
network 172.16.0.0 0.0.0.255 area 2
network 40.0.0.0 0.0.255.255 area 2
area 2 nssa //配置區域2爲非純末梢區域
end
----------------------------------------------------------------------
RE:
en
conf t
host RE
no ip domain-lookup
int loop 1
ip add 100.16.1.1 255.255.255.0
exit
int loop 2
ip add 100.16.2.1 255.255.255.0
exit
int loop 3
ip add 100.16.3.1 255.255.255.0
exit
int f0/0
ip add 200.1.1.2 255.255.255.0
no sh
exit
router rip
version 2
no auto-summary
network 200.1.1.0
network 100.16.1.0
network 100.16.2.0
network 100.16.3.0
end
-------------------------------------------------------------------
測試截圖:
七、 在路由器D上ping 100.16.1.1,可否ping通,若不通,該如何解決?
Ping不通。。。。由router E能夠看出來,路由器E已經學到了到172.16.0.0的路由。。。可是在D上卻沒有學到。。。。我想在D上配置幾條到E的靜態路由就可以實現了。。。試試先!?
在路由器D上加上這幾條命令。。。該方法可行,可是在大型網絡中,配置靜態路由太繁雜了。
其實只需在RC上將非純末梢區域改爲徹底非純末梢區域就能夠了。
RD:
en
conf t
ip route 192.168.0.0 255.255.255.0 172.16.0.1 //配置靜態路由
ip route 200.1.1.0 255.255.255.0 192.168.0.1
ip route 100.16.1.0 255.255.255.0 200.1.1.2
ip route 100.16.2.0 255.255.255.0 200.1.1.2
ip route 100.16.3.0 255.255.255.0 200.1.1.2
end
測試截圖: