【實驗環境】 veryhuo.com
C3640-IK9O3S-M Version 12.4(10) veryhuo.com
【實驗目的】
網
隧道技術解決OSPF區域分割問題 liehuo.net
【實驗拓撲】
liehuo.net
【實驗描述】
liehuo.net
Area 2與Area 0沒有直接相連,通過在R1和R2上創建tunnel接口,使得R2通過隧道直接接入Area 0來解決區域分割問題。
【實驗步驟】 liehuo.net
1、R1基本配置
liehuo.net
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Serial0/0
ip address 12.0.0.1 255.255.255.0
clock rate 64000
!
router ospf 110
router-id 1.1.1.1
network 1.1.1.1 0.0.0.0 area 0
network 12.0.0.0 0.0.0.255 area 1
! liehuo.net
2、R2基本配置 veryhuo.com
!
interface Serial0/0
ip address 12.0.0.2 255.255.255.0
!
interface Serial0/1
ip address 23.0.0.1 255.255.255.0
clock rate 64000
!
router ospf 110
router-id 2.2.2.2
network 12.0.0.0 0.0.0.255 area 1
network 23.0.0.0 0.0.0.255 area 2
!
veryhuo.com
3、R3基本配置 veryhuo.com
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Serial0/1
ip address 23.0.0.2 255.255.255.0
!
router ospf 110
router-id 3.3.3.3
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 2
network 23.0.0.0 0.0.0.255 area 2
! '網
此時Area 2由于沒有與Area 0直接相連而無法正常獲取路由信息 網
4、在R1上創建tunnel接口指向R2 liehuo.net
//創建隧道接口,接口id任意
interface Tunnel1
//為隧道接口設置邏輯地址,任意,與對端邏輯接口處于同網段即可
ip address 192.168.1.1 255.255.255.0
//設置隧道源,為本地接口
tunnel source 12.0.0.1
//設置隧道目的,為對端接口
tunnel destination 12.0.0.2 liehuo.net
5、在R2上創建tunnel接口指向R1
#網
interface Tunnel1
ip address 192.168.1.2 255.255.255.0
tunnel source 12.0.0.2
tunnel destination 12.0.0.1 liehuo.net
6、測試隧道
-網
//在R2上ping隧道對端的邏輯地址,只要隧道源與隧道目的之間有路由,隧道即可成功創建,此時R2相當于直接掛在R1上
R2#ping 192.168.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/33/84 ms
如果您覺得本網站對您的學習有所幫助,可以手機掃描二維碼進行捐贈