OSPF的高级配置(连载1)

 
实验人:张浩  QQ:672128305
一:实验背景:

飞龙公司的规模越来越大,网络也越来越复杂,公司吞并了一个小公司,但是和这个公司网络合并时,却无法直接接入OSPF的骨干区域,网络条目也越来越多.
为了减少路由条目的数目,要求对路由条目进行汇总.

二:实验目的:

1:通过虚链路实现Area 3与骨干区域的相连
2:分别实现路由汇总(区域内路由汇总和外部路由汇总),实现路由汇总后查看路由条目.
3:实现全网络的路由.

三:实验拓扑
一:实验背景:

飞龙公司的规模越来越大,网络也越来越复杂,公司吞并了一个小公司,但是和这个公司网络合并时,却无法直接接入OSPF的骨干区域,网络条目也越来越多.
为了减少路由条目的数目,要求对路由条目进行汇总.

二:实验目的:

1:通过虚链路实现Area 3与骨干区域的相连
2:分别实现路由汇总(区域内路由汇总和外部路由汇总),实现路由汇总后查看路由条目.
3:实现全网络的路由.

三:实验拓扑
OSPF的高级配置(连载1)_第1张图片
三:实验步骤:
   1:先配置多区域的OSPF,打通全网路由,注意,发布环回接口.
   2:区域3无法与骨干区域直接相连,所以先用虚链路连接到骨干区域。
   3:将外部路由重新发布到ospf.
   4: 配置NSSA和Totally Stubby区域.
   5: 在ASBR和ABR上分别做路由汇总.(在R3和R2上用环回接口模拟几个网段,做汇总)
 说明实验现象.
实验步骤:
1、基本配置,配置接口IP及环回接口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:
.!!!!
//现在相邻的设备之间已经可以Ping 通了

2、打通全网路由
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,连接两个不同的自治系统。
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学到了本区域的及其它OSPF区域的路由信息,但是没有Area 3 以及RIP自治系统的路由信息,这是因为Area 3 没有和骨干区域直连,RIP和OSPF属于不同的自治系统,不能直接学习路由信息。

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


//可以看到,添加完虚链路之后,就可以学习到Area 3的链路信息了,但是还是没有RIP路由协议的路由信息.





4、重分发
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


//可以看到现在R4上已经有了RIP路由协议的路由信息。






查看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也学到了OSPF自治系统的路由信息。
 
 
实验为配置完成,转连载2
 

你可能感兴趣的:(职场,路由,休闲,ospf)