cisco怎么配置OSPF虛鏈路
cisco怎么配置OSPF虛鏈路
cisco公司已成為公認(rèn)的全球網(wǎng)絡(luò)互聯(lián)解決方案的領(lǐng)先廠商,該公司出產(chǎn)的一系列路由器更是引領(lǐng)全球,那么你知道cisco怎么配置OSPF虛鏈路嗎?下面是學(xué)習(xí)啦小編整理的一些關(guān)于cisco怎么配置OSPF虛鏈路的相關(guān)資料,供你參考。
cisco配置OSPF虛鏈路的方法
這個配置將驗證一個OSPF虛電路(Virtual-Link)的過程,重點在觀察虛鏈路連接的臨時網(wǎng)絡(luò)與正常區(qū)域間路由有何區(qū)別。上圖中區(qū)域4(area 4)沒有和area 0直接相連。在R2與R3之間配置了一條虛鏈路。
// R1 //
int lo0
ip ad 1.1.1.1 255.255.255.0
int e0
ip ad 192.1.1.1 255.255.255.0
router os 1
network 192.1.1.0 0.0.0.255 area 0
// R2 //
int lo0
ip ad 2.2.2.2 255.255.255.0
int e0
ip ad 192.1.1.2 255.255.255.0
int e1
ip ad 193.1.1.2 255.255.255.0
router os 1
network 192.1.1.0 0.0.0.255 area 0
network 193.1.1.0 0.0.0.255 area 1
// R3 //
int lo0
ip ad 3.3.3.3 255.255.255.0
int e1
ip ad 193.1.1.3 255.255.255.0
int e0
ip ad 194.1.1.3 255.255.255.0
router os 1
network 193.1.1.0 0.0.0.255 area 1
network 194.1.1.0 0.0.0.255 area 4
// R4 //
int lo0
ip ad 4.4.4.4 255.255.255.0
int e0
ip ad 194.1.1.4 255.255.255.0
router os 1
network 194.1.1.0 0.0.0.255 area 4
基本配置完成后,我們在每臺路由器上分別來驗證一下:
r1#sh ip os nei
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/BDR 00:00:33 192.1.1.2 Ethernet0/0
r1#
r1#sh ip ro
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
O IA 193.1.1.0/24 [110/20] via 192.1.1.2, 00:00:19, Ethernet0/0
C 192.1.1.0/24 is directly connected, Ethernet0/0
//注意R1上有關(guān)于193.1.1.0的路由條目,是屬于IA類型(域間路由)
r2#sh ip os nei
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 1 FULL/DR 00:00:35 192.1.1.1 Ethernet0/0
3.3.3.3 1 FULL/BDR 00:00:35 193.1.1.3 Ethernet1/0
r2#
r2#
r2#sh ip ro
2.0.0.0/24 is subnetted, 1 subnets
C 2.2.2.0 is directly connected, Loopback0
C 193.1.1.0/24 is directly connected, Ethernet1/0
C 192.1.1.0/24 is directly connected, Ethernet0/0
r3#sh ip os nei
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/DR 00:00:32 193.1.1.2 Ethernet1/0
4.4.4.4 1 FULL/DR 00:00:34 194.1.1.4 Ethernet0/0
r3#sh ip ro
3.0.0.0/24 is subnetted, 1 subnets
C 3.3.3.0 is directly connected, Loopback0
C 193.1.1.0/24 is directly connected, Ethernet1/0
O IA 192.1.1.0/24 [110/20] via 193.1.1.2, 00:02:49, Ethernet1/0
C 194.1.1.0/24 is directly connected, Ethernet0/0
//注意R3中有關(guān)于192.1.1.0的路由是屬于IA類型(域間路由)
r4#sh ip os nei
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 1 FULL/BDR 00:00:33 194.1.1.3 Ethernet0/0
r4#sh ip ro
4.0.0.0/24 is subnetted, 1 subnets
C 4.4.4.0 is directly connected, Loopback0
C 194.1.1.0/24 is directly connected, Ethernet0/0
//R4上沒有關(guān)于AREA 0內(nèi)的任何路由信息
我們下面在R2、R3上添加Virtual-link的配置:
R2:
router os 1
area 1 virtual-link 3.3.3.3
R3:
router os 1
area 1 virtual-link 2.2.2.2
對比之前的路由信息,看有何區(qū)別:
r1#sh ip ro
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
O IA 193.1.1.0/24 [110/20] via 192.1.1.2, 00:00:01, Ethernet0/0
C 192.1.1.0/24 is directly connected, Ethernet0/0
O IA 194.1.1.0/24 [110/30] via 192.1.1.2, 00:00:01, Ethernet0/0
//多了一條194網(wǎng)段的路由,類型IA(區(qū)域間)
r2#sh ip ro
2.0.0.0/24 is subnetted, 1 subnets
C 2.2.2.0 is directly connected, Loopback0
C 193.1.1.0/24 is directly connected, Ethernet1/0
C 192.1.1.0/24 is directly connected, Ethernet0/0
O IA 194.1.1.0/24 [110/20] via 193.1.1.3, 00:00:06, Ethernet1/0
//多了一條194網(wǎng)段路由,類型為IA(區(qū)域間)
r3#sh ip ro
3.0.0.0/24 is subnetted, 1 subnets
C 3.3.3.0 is directly connected, Loopback0
C 193.1.1.0/24 is directly connected, Ethernet1/0
O 192.1.1.0/24 [110/20] via 193.1.1.2, 00:02:56, Ethernet1/0
C 194.1.1.0/24 is directly connected, Ethernet0/0
//R3的192路由原本為IA類型(區(qū)域間),現(xiàn)在轉(zhuǎn)為O類型(區(qū)域內(nèi)),說明R3認(rèn)為自已與192網(wǎng)段是直連的。虛鏈路相當(dāng)于將R3直接連接了AREA 0 與 AREA 4區(qū)域
r4#sh ip ro
4.0.0.0/24 is subnetted, 1 subnets
C 4.4.4.0 is directly connected, Loopback0
O IA 193.1.1.0/24 [110/20] via 194.1.1.3, 00:03:40, Ethernet0/0
O IA 192.1.1.0/24 [110/30] via 194.1.1.3, 00:03:25, Ethernet0/0
C 194.1.1.0/24 is directly connected, Ethernet0/0
//R4上192路由類型IA(區(qū)域間)
最后我們將虛鏈路效果再與正常連接方式進(jìn)行一下比對,如下圖:
驗證如下:
r1#sh ip ro
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
O IA 193.1.1.0/24 [110/20] via 192.1.1.2, 00:00:41, Ethernet0/0
C 192.1.1.0/24 is directly connected, Ethernet0/0
C 192.2.2.0/24 is directly connected, Ethernet1/0
O IA 194.1.1.0/24 [110/20] via 192.2.2.4, 00:00:39, Ethernet1/0
r2#sh ip ro
2.0.0.0/24 is subnetted, 1 subnets
C 2.2.2.0 is directly connected, Loopback0
C 193.1.1.0/24 is directly connected, Ethernet1/0
C 192.1.1.0/24 is directly connected, Ethernet0/0
O 192.2.2.0/24 [110/20] via 192.1.1.1, 00:01:04, Ethernet0/0
O IA 194.1.1.0/24 [110/30] via 192.1.1.1, 00:00:03, Ethernet0/0
r2#
r3#sh ip ro
3.0.0.0/24 is subnetted, 1 subnets
看過文章“cisco怎么配置OSPF虛鏈路”的人還看了:
4.思科路由器怎么進(jìn)入 思科路由器怎么設(shè)置
10.cisco如何看未接來電