OSPF的高级配置(连载1)
一:實(shí)驗(yàn)背景:
飛龍公司的規(guī)模越來越大,網(wǎng)絡(luò)也越來越復(fù)雜,公司吞并了一個(gè)小公司,但是和這個(gè)公司網(wǎng)絡(luò)合并時(shí),卻無法直接接入OSPF的骨干區(qū)域,網(wǎng)絡(luò)條目也越來越多.
為了減少路由條目的數(shù)目,要求對(duì)路由條目進(jìn)行匯總.
二:實(shí)驗(yàn)?zāi)康?
1:通過虛鏈路實(shí)現(xiàn)Area 3與骨干區(qū)域的相連
2:分別實(shí)現(xiàn)路由匯總(區(qū)域內(nèi)路由匯總和外部路由匯總),實(shí)現(xiàn)路由匯總后查看路由條目.
3:實(shí)現(xiàn)全網(wǎng)絡(luò)的路由.
三:實(shí)驗(yàn)拓?fù)?br />一:實(shí)驗(yàn)背景:
飛龍公司的規(guī)模越來越大,網(wǎng)絡(luò)也越來越復(fù)雜,公司吞并了一個(gè)小公司,但是和這個(gè)公司網(wǎng)絡(luò)合并時(shí),卻無法直接接入OSPF的骨干區(qū)域,網(wǎng)絡(luò)條目也越來越多.
為了減少路由條目的數(shù)目,要求對(duì)路由條目進(jìn)行匯總.
二:實(shí)驗(yàn)?zāi)康?
1:通過虛鏈路實(shí)現(xiàn)Area 3與骨干區(qū)域的相連
2:分別實(shí)現(xiàn)路由匯總(區(qū)域內(nèi)路由匯總和外部路由匯總),實(shí)現(xiàn)路由匯總后查看路由條目.
3:實(shí)現(xiàn)全網(wǎng)絡(luò)的路由.
三:實(shí)驗(yàn)拓?fù)?br />
三:實(shí)驗(yàn)步驟:
? ?1:先配置多區(qū)域的OSPF,打通全網(wǎng)路由,注意,發(fā)布環(huán)回接口.
? ?2:區(qū)域3無法與骨干區(qū)域直接相連,所以先用虛鏈路連接到骨干區(qū)域。
? ?3:將外部路由重新發(fā)布到ospf.
? ?4: 配置NSSA和Totally Stubby區(qū)域.
? ?5: 在ASBR和ABR上分別做路由匯總.(在R3和R2上用環(huán)回接口模擬幾個(gè)網(wǎng)段,做匯總)
?說明實(shí)驗(yàn)現(xiàn)象.
實(shí)驗(yàn)步驟:
1、基本配置,配置接口IP及環(huán)回接口IP
R1(config)#inter loo 0
R1(config-if)#ip add 1.1.1.1 255.255.255.255
R1(config-if)#interface f0/0
R1(config-if)#no shut
R1(config-if)#ip add 10.1.1.1 255.255.255.0
R1(config-if)#interface f1/0
R1(config-if)#no shut
R1(config-if)#ip add 11.1.1.1 255.255.255.0
R2(config)#interface loo 0
R2(config-if)#ip add 2.2.2.2 255.255.255.255
R2(config-if)#interface f0/0
R2(config-if)#no shut
R2(config-if)#ip add 10.1.1.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#interface f1/0
R2(config-if)#no shut
R2(config-if)#ip add 20.1.1.1 255.255.255.0
R3(config)#interface loo 0
R3(config-if)#ip add 3.3.3.3 255.255.255.255
R3(config-if)#interface f0/0
R3(config-if)#no shut
R3(config-if)#ip add 21.1.1.1 255.255.255.0
R3(config-if)#interface f1/0
R3(config-if)#no shut
R3(config-if)#ip add 20.1.1.2 255.255.255.0
R4(config)#interface loo 0
R4(config-if)#ip add 4.4.4.4 255.255.255.255
R4(config-if)#interface f0/0
R4(config-if)#no shut
R4(config-if)#ip add 30.1.1.1 255.255.255.0
R4(config-if)#interface f1/0
R4(config-if)#no shut
R4(config-if)#ip add 11.1.1.2 255.255.255.0
R5(config)#interface loo 0
R5(config-if)#ip add 5.5.5.5 255.255.255.255
R5(config-if)#interface f0/0
R5(config-if)#no shut
R5(config-if)#ip add 30.1.1.2 255.255.255.0
R5(config-if)#interface f1/0
R5(config-if)#no shut
R5(config-if)#ip add 31.1.1.1 255.255.255.0
R6(config-if)#interface loo 0
R6(config-if)#ip add 6.6.6.6 255.255.255.255
R6(config-if)#interface f1/0
R6(config-if)#ip add 31.1.1.2 255.255.255.0
R6(config-if)#no shut
R7(config)#interface loo 0
R7(config-if)#ip add 7.7.7.7 255.255.255.255
R7(config-if)#interface f0/0
R7(config-if)#no shut
R7(config-if)#ip add 21.1.1.2 255.255.255.0
R4#ping 30.1.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 30.1.1.2, timeout is 2 seconds:
.!!!!
//現(xiàn)在相鄰的設(shè)備之間已經(jīng)可以Ping 通了
2、打通全網(wǎng)路由
R1(config)#router os 110
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0
R1(config-router)#network 10.1.1.0 0.0.0.255 ar 0
R1(config-router)#network 11.1.1.0 0.0.0.255 ar 0
R2(config)#router os 110
R2(config-router)#network 2.2.2.2 0.0.0.0 ar 0
R2(config-router)#network 10.1.1.0 0.0.0.255 ar 0
R2(config-router)#network 20.1.1.0 0.0.0.255 ar
R2(config-router)#network 20.1.1.0 0.0.0.255 ar 1
R3(config)#router os 110
R3(config-router)#network 3.3.3.3 0.0.0.0 ar 1
R3(config-router)#network 20.1.1.0 0.0.0.255 ar 1
R3(config-router)#exit
R3(config)#router rip ? ? ? ? ? ? ? ?//R3為ASBR,連接兩個(gè)不同的自治系統(tǒng)。
R3(config-router)#version 2
R3(config-router)#no auto-summary
R3(config-router)#network 21.1.1.0
R4(config)#router os 110
R4(config-router)#network 4.4.4.4 0.0.0.0 ar 0
R4(config-router)#network 11.1.1.0 0.0.0.255 ar 0
R4(config-router)#network 30.1.1.0 0.0.0.255 ar 2
R5(config)#router os 110
R5(config-router)#network 5.5.5.5 0.0.0.0 ar 2
R5(config-router)#network 30.1.1.0 0.0.0.255 ar 2
R5(config-router)#network 31.1.1.0 0.0.0.255 ar 3
R6(config)#router os 110
R6(config-router)#network 6.6.6.6 0.0.0.0 ar 3
R6(config-router)#network 31.1.1.0 0.0.0.255 ar 3
R7(config)#router rip
R7(config-router)#version 2
R7(config-router)#no auto-summary
R7(config-router)#network 7.7.7.7
R7(config-router)#network 21.1.1.0
R4#show ip route
? ?1.0.0.0/32 is subnetted, 1 subnets
O ? ? ? 1.1.1.1 [110/2] via 11.1.1.1, 00:04:41, FastEthernet1/0
? ?2.0.0.0/32 is subnetted, 1 subnets
O ? ? ? 2.2.2.2 [110/3] via 11.1.1.1, 00:04:41, FastEthernet1/0
? ?3.0.0.0/32 is subnetted, 1 subnets
O IA ? ?3.3.3.3 [110/4] via 11.1.1.1, 00:03:25, FastEthernet1/0
? ?4.0.0.0/32 is subnetted, 1 subnets
C ? ? ? 4.4.4.4 is directly connected, Loopback0
? ?20.0.0.0/24 is subnetted, 1 subnets
O IA ? ?20.1.1.0 [110/3] via 11.1.1.1, 00:03:25, FastEthernet1/0
? ?5.0.0.0/32 is subnetted, 1 subnets
O ? ? ? 5.5.5.5 [110/2] via 30.1.1.2, 00:03:25, FastEthernet0/0
? ?10.0.0.0/24 is subnetted, 1 subnets
O ? ? ? 10.1.1.0 [110/2] via 11.1.1.1, 00:04:43, FastEthernet1/0
? ?11.0.0.0/24 is subnetted, 1 subnets
C ? ? ? 11.1.1.0 is directly connected, FastEthernet1/0
? ?30.0.0.0/24 is subnetted, 1 subnets
C ? ? ? 30.1.1.0 is directly connected, FastEthernet0/0
//查看R4的路由表可以看出R4學(xué)到了本區(qū)域的及其它OSPF區(qū)域的路由信息,但是沒有Area 3 以及RIP自治系統(tǒng)的路由信息,這是因?yàn)锳rea 3 沒有和骨干區(qū)域直連,RIP和OSPF屬于不同的自治系統(tǒng),不能直接學(xué)習(xí)路由信息。
3、配置虛鏈路
R4(config)#router os 110
R4(config-router)#area 2 virtual-link 5.5.5.5
R5(config)#router os 110
R5(config-router)#area 2 virtual-link 4.4.4.4
再次查看R4的路由表
R4#show ip route
? ?1.0.0.0/32 is subnetted, 1 subnets
O ? ? ? 1.1.1.1 [110/2] via 11.1.1.1, 00:00:24, FastEthernet1/0
? ?2.0.0.0/32 is subnetted, 1 subnets
O ? ? ? 2.2.2.2 [110/3] via 11.1.1.1, 00:00:24, FastEthernet1/0
? ?3.0.0.0/32 is subnetted, 1 subnets
O IA ? ?3.3.3.3 [110/4] via 11.1.1.1, 00:00:24, FastEthernet1/0
? ?4.0.0.0/32 is subnetted, 1 subnets
C ? ? ? 4.4.4.4 is directly connected, Loopback0
? ?20.0.0.0/24 is subnetted, 1 subnets
O IA ? ?20.1.1.0 [110/3] via 11.1.1.1, 00:00:24, FastEthernet1/0
? ?5.0.0.0/32 is subnetted, 1 subnets
O ? ? ? 5.5.5.5 [110/2] via 30.1.1.2, 00:00:24, FastEthernet0/0
? ?6.0.0.0/32 is subnetted, 1 subnets
O IA ? ?6.6.6.6 [110/3] via 30.1.1.2, 00:00:27, FastEthernet0/0
? ?10.0.0.0/24 is subnetted, 1 subnets
O ? ? ? 10.1.1.0 [110/2] via 11.1.1.1, 00:00:27, FastEthernet1/0
? ?11.0.0.0/24 is subnetted, 1 subnets
C ? ? ? 11.1.1.0 is directly connected, FastEthernet1/0
? ?31.0.0.0/24 is subnetted, 1 subnets
O IA ? ?31.1.1.0 [110/2] via 30.1.1.2, 00:00:27, FastEthernet0/0
? ?30.0.0.0/24 is subnetted, 1 subnets
C ? ? ? 30.1.1.0 is directly connected, FastEthernet0/0
//可以看到,添加完虛鏈路之后,就可以學(xué)習(xí)到Area 3的鏈路信息了,但是還是沒有RIP路由協(xié)議的路由信息.
4、重分發(fā)
R3(config-router)#router os 110
R3(config-router)#redistribute rip metric 100 ?subnets
R3(config-router)#router rip
R3(config-router)#redistribute os 110 metric 1
//再次查看R4的路由表
R4#show ip route
? ?1.0.0.0/32 is subnetted, 1 subnets
O ? ? ? 1.1.1.1 [110/2] via 11.1.1.1, 00:14:37, FastEthernet1/0
? ?2.0.0.0/32 is subnetted, 1 subnets
O ? ? ? 2.2.2.2 [110/3] via 11.1.1.1, 00:14:37, FastEthernet1/0
? ?3.0.0.0/32 is subnetted, 1 subnets
O IA ? ?3.3.3.3 [110/4] via 11.1.1.1, 00:14:37, FastEthernet1/0
? ?4.0.0.0/32 is subnetted, 1 subnets
C ? ? ? 4.4.4.4 is directly connected, Loopback0
? ?21.0.0.0/24 is subnetted, 1 subnets
O E2 ? ?21.1.1.0 [110/100] via 11.1.1.1, 00:06:11, FastEthernet1/0
? ?20.0.0.0/24 is subnetted, 1 subnets
O IA ? ?20.1.1.0 [110/3] via 11.1.1.1, 00:14:37, FastEthernet1/0
? ?5.0.0.0/32 is subnetted, 1 subnets
O ? ? ? 5.5.5.5 [110/2] via 30.1.1.2, 00:14:38, FastEthernet0/0
? ?6.0.0.0/32 is subnetted, 1 subnets
O IA ? ?6.6.6.6 [110/3] via 30.1.1.2, 00:14:38, FastEthernet0/0
? ?7.0.0.0/32 is subnetted, 1 subnets
O E2 ? ?7.7.7.7 [110/100] via 11.1.1.1, 00:06:13, FastEthernet1/0
? ?10.0.0.0/24 is subnetted, 1 subnets
O ? ? ? 10.1.1.0 [110/2] via 11.1.1.1, 00:14:38, FastEthernet1/0
? ?11.0.0.0/24 is subnetted, 1 subnets
C ? ? ? 11.1.1.0 is directly connected, FastEthernet1/0
? ?31.0.0.0/24 is subnetted, 1 subnets
O IA ? ?31.1.1.0 [110/2] via 30.1.1.2, 00:14:38, FastEthernet0/0
? ?30.0.0.0/24 is subnetted, 1 subnets
C ? ? ? 30.1.1.0 is directly connected, FastEthernet0/0
//可以看到現(xiàn)在R4上已經(jīng)有了RIP路由協(xié)議的路由信息。
查看R7的路由表
R7(config-router)#do show ip route
? ?1.0.0.0/32 is submitted, 1 subnets
R ? ? ? 1.1.1.1 [120/1] via 21.1.1.1, 00:00:08, FastEthernet0/0
? ?2.0.0.0/32 is subnetted, 1 subnets
R ? ? ? 2.2.2.2 [120/1] via 21.1.1.1, 00:00:08, FastEthernet0/0
? ?3.0.0.0/32 is subnetted, 1 subnets
R ? ? ? 3.3.3.3 [120/1] via 21.1.1.1, 00:00:08, FastEthernet0/0
? ?4.0.0.0/32 is subnetted, 1 subnets
R ? ? ? 4.4.4.4 [120/1] via 21.1.1.1, 00:00:08, FastEthernet0/0
? ?21.0.0.0/24 is subnetted, 1 subnets
C ? ? ? 21.1.1.0 is directly connected, FastEthernet0/0
? ?20.0.0.0/24 is subnetted, 1 subnets
R ? ? ? 20.1.1.0 [120/1] via 21.1.1.1, 00:00:08, FastEthernet0/0
? ?5.0.0.0/32 is subnetted, 1 subnets
R ? ? ? 5.5.5.5 [120/1] via 21.1.1.1, 00:00:10, FastEthernet0/0
? ?6.0.0.0/32 is subnetted, 1 subnets
R ? ? ? 6.6.6.6 [120/1] via 21.1.1.1, 00:00:10, FastEthernet0/0
? ?7.0.0.0/32 is subnetted, 1 subnets
C ? ? ? 7.7.7.7 is directly connected, Loopback0
? ?10.0.0.0/24 is subnetted, 1 subnets
R ? ? ? 10.1.1.0 [120/1] via 21.1.1.1, 00:00:10, FastEthernet0/0
? ?11.0.0.0/24 is subnetted, 1 subnets
R ? ? ? 11.1.1.0 [120/1] via 21.1.1.1, 00:00:10, FastEthernet0/0
? ?31.0.0.0/24 is subnetted, 1 subnets
R ? ? ? 31.1.1.0 [120/1] via 21.1.1.1, 00:00:10, FastEthernet0/0
? ?30.0.0.0/24 is subnetted, 1 subnets
R ? ? ? 30.1.1.0 [120/1] via 21.1.1.1, 00:00:10, FastEthernet0/0
//可以看到R7也學(xué)到了OSPF自治系統(tǒng)的路由信息。
?
?
實(shí)驗(yàn)為配置完成,轉(zhuǎn)連載2
?
轉(zhuǎn)載于:https://blog.51cto.com/ladect/226042
總結(jié)
以上是生活随笔為你收集整理的OSPF的高级配置(连载1)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 生命中的五个球
- 下一篇: RS-232交叉串口线的做法与测试.do