R7#ping 31.1.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 31.1.1.2, timeout is 2 seconds:
!!.!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1872/1877/1888 ms
R7 可以Ping 通R6 ,现在已经实现了全网互通。
5、配置特殊区域:
Area 1 为完全NSSA区域,Area 3 配置为 完全末梢区域
Area 1:
R2(config)#router os 110
R2(config-router)#area 1 nssa no-summary
R3(config)#router os 110
R3(config-router)#area 1 nssa
再次查看R3的路由表:
R3#show ip route
Gateway of last resort is 20.1.1.1 to network 0.0.0.0
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback0
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
C 20.1.1.0 is directly connected, FastEthernet1/0
7.0.0.0/32 is subnetted, 1 subnets
R 7.7.7.7 [120/1] via 21.1.1.2, 00:00:09, FastEthernet0/0
O*IA 0.0.0.0/0 [110/2] via 20.1.1.1, 00:00:00, FastEthernet1/0
//通过R3的路由表可以看到,只有本区域的路由信息以及直连的外部自治系统的路由信息。且多出了一条默认路由来和其它的区域通信。
Area 3:
R5(config)#router os 110
R5(config-router)#area 3 stub no-summary
R6(config)#router os 110
R6(config-router)#area 3 stub
查看R6的路由表:
R6#show ip route
Gateway of last resort is 31.1.1.1 to network 0.0.0.0
6.0.0.0/32 is subnetted, 1 subnets
C 6.6.6.6 is directly connected, Loopback0
31.0.0.0/24 is subnetted, 1 subnets
C 31.1.1.0 is directly connected, FastEthernet1/0
O*IA 0.0.0.0/0 [110/2] via 31.1.1.1, 00:00:46, FastEthernet1/0
//可以看到在R6中只有本区域的路由信息,没有本自治系统的其它区域的路由信息,在R6中也有一条默认路由。
6、地址汇总
ASBR汇总:
R7(config)#interface loo 1
R7(config-if)#ip add 100.1.1.1 255.255.255.0
R7(config-if)#interface loo 2
R7(config-if)#ip add 100.1.2.1 255.255.255.0
R7(config-if)#interface loo 3
R7(config-if)#ip add 100.1.3.1 255.255.255.0
R7(config-if)#interface loo 4
R7(config-if)#ip add 100.1.4.1 255.255.255.0
R7(config)#router rip
R7(config-router)#version 2
R7(config-router)#no auto-summary
R7(config-router)#network 100.1.1.0
R7(config-router)#network 100.1.2.0
R7(config-router)#network 100.1.3.0
R7(config-router)#network 100.1.4.0
再次查看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:23:26, FastEthernet1/0
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/3] via 11.1.1.1, 00:23:26, FastEthernet1/0
100.0.0.0/24 is subnetted, 4 subnets
O E2 100.1.4.0 [110/100] via 11.1.1.1, 00:00:29, FastEthernet1/0
O E2 100.1.1.0 [110/100] via 11.1.1.1, 00:00:29, FastEthernet1/0
O E2 100.1.3.0 [110/100] via 11.1.1.1, 00:00:29, FastEthernet1/0
O E2 100.1.2.0 [110/100] via 11.1.1.1, 00:00:29, 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:22:31, 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:12:50, 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:23:26, FastEthernet1/0
5.0.0.0/32 is subnetted, 1 subnets
O 5.5.5.5 [110/2] via 30.1.1.2, 00:51:43, 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:12:55, 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:12:50, FastEthernet1/0
10.0.0.0/24 is subnetted, 1 subnets
O 10.1.1.0 [110/2] via 11.1.1.1, 00:23:31, 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:13:12, FastEthernet0/0
30.0.0.0/24 is subnetted, 1 subnets
C 30.1.1.0 is directly connected, FastEthernet0/0
//R4中我们可以看到已经学到了100网段。
R3(config)#router os 110
R3(config-router)#summary-address 100.1.0.0 255.255.252.0
再次查看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:30:40, FastEthernet1/0
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/3] via 11.1.1.1, 00:30:40, FastEthernet1/0
100.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O E2 100.1.4.0/24 [110/100] via 11.1.1.1, 00:07:43, FastEthernet1/0
O E2 100.1.0.0/22 [110/100] via 11.1.1.1, 00:00:10, 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:29:45, 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:19:59, 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:31:08, FastEthernet1/0
5.0.0.0/32 is subnetted, 1 subnets
O 5.5.5.5 [110/2] via 30.1.1.2, 00:59: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:20:37, 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:20:32, FastEthernet1/0
10.0.0.0/24 is subnetted, 1 subnets
O 10.1.1.0 [110/2] via 11.1.1.1, 00:31:13, 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:20:54, FastEthernet0/0
30.0.0.0/24 is subnetted, 1 subnets
C 30.1.1.0 is directly connected, FastEthernet0/0
//我们可以看到在R4中的100网段的路由条目已经进行了路由汇总。
ABR汇总:
R2(config-if)#interface loo 10
R2(config-if)#ip add 200.1.1.1 255.255.255.0
R2(config-if)#interfa loo 11
R2(config-if)#ip add 200.1.2.1 255.255.255.0
R2(config-if)#interface loo 12
R2(config-if)#ip add 200.1.3.1 255.255.255.0
R2(config-if)#interface loo 13
R2(config-if)#ip add 200.1.4.1 255.255.255.0
再次查看R4的路由表:
R4#show ip route
200.1.4.0/32 is subnetted, 1 subnets
O IA 200.1.4.1 [110/3] via 11.1.1.1, 00:01:25, FastEthernet1/0
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/2] via 11.1.1.1, 00:44:05, FastEthernet1/0
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/3] via 11.1.1.1, 00:44:05, FastEthernet1/0
100.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O E2 100.1.4.0/24 [110/100] via 11.1.1.1, 00:01:20, FastEthernet1/0
O E2 100.1.0.0/22 [110/100] via 11.1.1.1, 00:01:20, 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:43:10, 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:01:22, 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:44:02, FastEthernet1/0
5.0.0.0/32 is subnetted, 1 subnets
O 5.5.5.5 [110/2] via 30.1.1.2, 01:12:18, FastEthernet0/0
200.1.1.0/32 is subnetted, 1 subnets
O IA 200.1.1.1 [110/3] via 11.1.1.1, 00:02:21, FastEthernet1/0
6.0.0.0/32 is subnetted, 1 subnets
O IA 6.6.6.6 [110/3] via 30.1.1.2, 00:33:31, FastEthernet0/0
200.1.2.0/32 is subnetted, 1 subnets
O IA 200.1.2.1 [110/3] via 11.1.1.1, 00:02:01, FastEthernet1/0
7.0.0.0/32 is subnetted, 1 subnets
O E2 7.7.7.7 [110/100] via 11.1.1.1, 00:01:22, FastEthernet1/0
200.1.3.0/32 is subnetted, 1 subnets
O IA 200.1.3.1 [110/3] via 11.1.1.1, 00:01:51, FastEthernet1/0
10.0.0.0/24 is subnetted, 1 subnets
O 10.1.1.0 [110/2] via 11.1.1.1, 00:44:06, 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:33:48, FastEthernet0/0
30.0.0.0/24 is subnetted, 1 subnets
C 30.1.1.0 is directly connected, FastEthernet0/0
//通过R4的路由表我们可以看到已经有了200网段的路由信息。
R2(config)#router os 110
R2(config-router)#area 1 range 200.1.0.0 255.255.252.0
R4#show ip route
200.1.4.0/32 is subnetted, 1 subnets
O IA 200.1.4.1 [110/3] via 11.1.1.1, 00:07:30, FastEthernet1/0
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/2] via 11.1.1.1, 00:50:10, FastEthernet1/0
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/3] via 11.1.1.1, 00:50:10, FastEthernet1/0
100.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O E2 100.1.4.0/24 [110/100] via 11.1.1.1, 00:01:43, FastEthernet1/0
O E2 100.1.0.0/22 [110/100] via 11.1.1.1, 00:01:43, 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:49:15, 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:01:46, 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:50:08, FastEthernet1/0
5.0.0.0/32 is subnetted, 1 subnets
O 5.5.5.5 [110/2] via 30.1.1.2, 01:18: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:39:37, 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:01:46, FastEthernet1/0
10.0.0.0/24 is subnetted, 1 subnets
O 10.1.1.0 [110/2] via 11.1.1.1, 00:50:12, 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:39:54, FastEthernet0/0
30.0.0.0/24 is subnetted, 1 subnets
C 30.1.1.0 is directly connected, FastEthernet0/0
O IA 200.1.0.0/22 [110/3] via 11.1.1.1, 00:01:51, FastEthernet1/0
//在R4的路由表中可以看到已经对200网段做了汇总。
二、 实验总结:
虚链路:
虚链路必须配置在两台ABR路由器之间
传送区域(传送区域必须是标准区域)
注意Router_id
汇总:
ASBR:summary-address 汇总后的目标网段 子网掩码
ABR :area area_id range汇总后的目标网段 子网掩码
重分发:
必须在ASBR上进行,对两个不同的自治系统进行互指。