|
This tutorial shows the effect of the "area range" command in the OSPF routing process.
If you have many small networks advertised from area 0 to any other area or from any non backbone area into the backbone, the "area range" command gives you a summary route instead of the many smaller routes. In an area the OSPF database on each router must be an exact copy of the databases of the other routers. This means, that no summarization in an area is allowed. ABRs are the only routers who can perform summarization with the help of an "area range" command.
We will then have 2 new loopback interfaces on R3 in area 10. In the OPSF configuration this interafces will be put into OSPF via the "network" statement.
R3#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#interface Loopback 1
R3(config-if)#ip address 192.168.200.1 255.255.255.255
R3(config-if)#exit
R3(config)#interface Loopback 2
R3(config-if)#ip address 192.168.200.2 255.255.255.255
R3(config-if)#exit
R3(config)#router ospf 100
R3(config-router)#network 192.168.200.1 0.0.0.0 area 10
R3(config-router)#network 192.168.200.2 0.0.0.0 area 10
R3(config-router)#end
R3#
The routing table on R1 shows the two routes as hostroutes. This is normal, because loopback interfaces have the OSPF network type "Loopback" which makes the routes look as hostroutes, even if the netmask on the interface is not /32.
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
172.17.0.0/32 is subnetted, 3 subnets
C 172.17.0.1 is directly connected, Loopback0
O IA 172.17.0.3 [110/129] via 192.168.100.2, 00:01:11, Serial1/0
O IA 172.17.0.2 [110/65] via 192.168.100.2, 00:01:11, Serial1/0
192.168.200.0/32 is subnetted, 2 subnets
O IA 192.168.200.1 [110/129] via 192.168.100.2, 00:01:11, Serial1/0
O IA 192.168.200.2 [110/129] via 192.168.100.2, 00:00:20, Serial1/0
192.168.100.0/30 is subnetted, 2 subnets
O IA 192.168.100.4 [110/128] via 192.168.100.2, 00:01:11, Serial1/0
C 192.168.100.0 is directly connected, Serial1/0
On R2, the Area Border Router, the "area range" command is inserted into the routing process.
R2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router ospf 100
R2(config-router)#area 10 range 192.168.200.0 255.255.255.0
R2(config-router)#end
R2#
It reads: Take the routes from area 10 which fall into the range. Do not advertise any specific routes to the backbone, but instead advertise the summary.
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
172.17.0.0/32 is subnetted, 3 subnets
C 172.17.0.1 is directly connected, Loopback0
O IA 172.17.0.3 [110/129] via 192.168.100.2, 00:05:00, Serial1/0
O IA 172.17.0.2 [110/65] via 192.168.100.2, 00:05:00, Serial1/0
O IA 192.168.200.0/24 [110/129] via 192.168.100.2, 00:01:45, Serial1/0
192.168.100.0/30 is subnetted, 2 subnets
O IA 192.168.100.4 [110/128] via 192.168.100.2, 00:05:00, Serial1/0
C 192.168.100.0 is directly connected, Serial1/0
You now can see the summary route in the routing table of router R1.
On Router R2 OSPF put a new route in the routing table. The summary route can be seen as a route to NULL0 in the table.
R2#show ip route ospf
172.17.0.0/32 is subnetted, 3 subnets
O 172.17.0.1 [110/65] via 192.168.100.1, 00:00:54, Serial1/0
O 172.17.0.3 [110/65] via 192.168.100.6, 00:00:44, Serial1/1
192.168.200.0/24 is variably subnetted, 3 subnets, 2 masks
O 192.168.200.0/24 is a summary, 00:00:44, Null0
O 192.168.200.1/32 [110/65] via 192.168.100.6, 00:00:44, Serial1/1
O 192.168.200.2/32 [110/65] via 192.168.100.6, 00:00:44, Serial1/1
|
Routing table before summarization:
R2
Gateway of last resort is not set
172.17.0.0/32 is subnetted, 3 subnets
O 172.17.0.1 [110/65] via 192.168.100.1, 00:01:08, Serial2/0
O 172.17.0.3 [110/65] via 192.168.100.6, 00:01:08, Serial2/1
C 172.17.0.2 is directly connected, Loopback0
192.168.200.0/32 is subnetted, 2 subnets
O 192.168.200.1 [110/65] via 192.168.100.6, 00:01:08, Serial2/1
O 192.168.200.2 [110/65] via 192.168.100.6, 00:01:08, Serial2/1
192.168.100.0/30 is subnetted, 2 subnets
C 192.168.100.4 is directly connected, Serial2/1
C 192.168.100.0 is directly connected, Serial2/0
R1
Gateway of last resort is not set
172.17.0.0/32 is subnetted, 3 subnets
C 172.17.0.1 is directly connected, Loopback0
O IA 172.17.0.3 [110/129] via 192.168.100.2, 02:00:13, Serial2/0
O IA 172.17.0.2 [110/65] via 192.168.100.2, 02:00:13, Serial2/0
192.168.200.0/32 is subnetted, 2 subnets
O IA 192.168.200.1 [110/129] via 192.168.100.2, 00:00:07, Serial2/0
O IA 192.168.200.2 [110/129] via 192.168.100.2, 00:00:07, Serial2/0
192.168.100.0/30 is subnetted, 2 subnets
O IA 192.168.100.4 [110/128] via 192.168.100.2, 02:00:13, Serial2/0
C 192.168.100.0 is directly connected, Serial2/0
R3
Gateway of last resort is not set
172.17.0.0/32 is subnetted, 3 subnets
O IA 172.17.0.1 [110/129] via 192.168.100.5, 02:04:59, Serial2/1
C 172.17.0.3 is directly connected, Loopback0
O 172.17.0.2 [110/65] via 192.168.100.5, 02:04:59, Serial2/1
192.168.200.0/32 is subnetted, 2 subnets
C 192.168.200.1 is directly connected, Loopback1
C 192.168.200.2 is directly connected, Loopback2
192.168.100.0/30 is subnetted, 2 subnets
C 192.168.100.4 is directly connected, Serial2/1
O IA 192.168.100.0 [110/128] via 192.168.100.5, 02:05:00, Serial2/1
Routing table after summarization:
R2
Gateway of last resort is not set
172.17.0.0/32 is subnetted, 3 subnets
O 172.17.0.1 [110/65] via 192.168.100.1, 00:00:03, Serial2/0
O 172.17.0.3 [110/65] via 192.168.100.6, 00:00:03, Serial2/1
C 172.17.0.2 is directly connected, Loopback0
192.168.200.0/24 is variably subnetted, 3 subnets, 2 masks
O 192.168.200.0/24 is a summary, 00:00:03, Null0
O 192.168.200.1/32 [110/65] via 192.168.100.6, 00:00:03, Serial2/1
O 192.168.200.2/32 [110/65] via 192.168.100.6, 00:00:03, Ser
192.168.100.0/30 is subnetted, 2 subnets
C 192.168.100.4 is directly connected, Serial2/1
C 192.168.100.0 is directly connected, Serial2/0
R1
Gateway of last resort is not set
172.17.0.0/32 is subnetted, 3 subnets
C 172.17.0.1 is directly connected, Loopback0
O IA 172.17.0.3 [110/129] via 192.168.100.2, 02:04:42, Serial2/0
O IA 172.17.0.2 [110/65] via 192.168.100.2, 02:04:42, Serial2/0
O IA 192.168.200.0/24 [110/129] via 192.168.100.2, 00:01:08, Serial2/0
192.168.100.0/30 is subnetted, 2 subnets
O IA 192.168.100.4 [110/128] via 192.168.100.2, 02:04:42, Serial2/0
C 192.168.100.0 is directly connected, Serial2/0
R3
Gateway of last resort is not set
172.17.0.0/32 is subnetted, 3 subnets
O IA 172.17.0.1 [110/129] via 192.168.100.5, 02:02:35, Serial2/1
C 172.17.0.3 is directly connected, Loopback0
O 172.17.0.2 [110/65] via 192.168.100.5, 02:02:35, Serial2/1
192.168.200.0/32 is subnetted, 2 subnets
C 192.168.200.1 is directly connected, Loopback1
C 192.168.200.2 is directly connected, Loopback2
192.168.100.0/30 is subnetted, 2 subnets
C 192.168.100.4 is directly connected, Serial2/1
O IA 192.168.100.0 [110/128] via 192.168.100.5, 02:02:37, Serial2/1