Search This Blog

Tuesday, October 12, 2010

OSPF Route summarization

In OSPF summarization can occur on 2 types of routers: ABR and/or ASBR.
The internal routes of OSPF can be summarized on an ABR whereas the external (redistributed) routes can be summarized on an ASBR.When a summary on an ABR use the command: area xx range, whereas on an ASBR we will use the command: summary-address.
For example:In OSPF summarization can occur on 2 types of routers: ABR and/or ASBR.
The internal routes of OSPF can be summarized on an ABR whereas the external (redistributed) routes can be summarized on an ASBR.When a summary on an ABR use the command: area xx range, whereas on an ASBR we will use the command: summary-address.
For example:R2 is the ABR and we want to summarize R1 networks into area 1, so we will configure at R2, under router ospf:
area 1 range 1.1.0.0 255.255.252.0

By doing that we will advertise to area 1 (in this case R3) a route summary of 1.1.x.x networks from area 0.

Show ip route, at R3, will show:
R3#sh ip route ospf
1.0.0.0/22 is subnetted, 1 subnets
O IA 1.1.0.0 [110/75] via 10.1.23.2, 04:08:43, FastEthernet0/0
[output omitted]
R2 is the ABR and we want to summarize R1 networks into area 1, so we will configure at R2, under router ospf:
area 1 range 1.1.0.0 255.255.252.0

By doing that we will advertise to area 1 (in this case R3) a route summary of 1.1.x.x networks from area 0.

Show ip route, at R3, will show:
R3#sh ip route ospf
1.0.0.0/22 is subnetted, 1 subnets
O IA 1.1.0.0 [110/75] via 10.1.23.2, 04:08:43, FastEthernet0/0
[output omitted]

While show ip route, at R2, will show:
R2#sh 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

1.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
O 1.1.1.1/32 [110/65] via 10.1.12.1, 05:38:56, Serial0/0.21
O 1.1.0.0/22 is a summary, 05:38:56, Null0
O 1.1.0.1/32 [110/65] via 10.1.12.1, 05:38:56, Serial0/0.21
O 1.1.3.1/32 [110/65] via 10.1.12.1, 05:38:56, Serial0/0.21
O 1.1.2.1/32 [110/65] via 10.1.12.1, 05:38:56, Serial0/0.21
C 2.0.0.0/8 is directly connected, Loopback0
[output omitted]

Take note for route to null 0 - In OSPF a discard route is installed automatically when summarization is configured, the discard route prevents routing loops.

In order to remove the discard route use the command: no discard-route internal
under OSPF router config.

Like wise the same concept works for summarization of external routes, routes that are redistributed into OSPF from different source (Static, RIPv2, EIGRP etc.).

For example:
Here i have distributed 5 networks from RIPv2 through R3, which in this case an ASBR.
The summarization should occur on R3 using the following config:
router ospf 1
log-adjacency-changes
summary-address 4.4.0.0 255.255.252.0
network 3.3.3.3 0.0.0.0 area 2
[output omitted]

Show ip route on R2 will shows:
R2#sh 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

C 2.0.0.0/8 is directly connected, Loopback0
O E2 4.4.0.0/22 [110/20] via 10.1.23.3, 06:07:50, FastEthernet0/0
[output omitted]

Again, as in the case of the ABR, the OSPF protocol injects discard route automatically, which can be ignored using the command: no discard-route external, under OSPF router config.Take note for route to null 0 - In OSPF a discard route is installed automatically when summarization is configured, the discard route prevents routing loops.

In order to remove the discard route use the command: no discard-route internal
under OSPF router config.

Like wise the same concept works for summarization of external routes, routes that are redistributed into OSPF from different source (Static, RIPv2, EIGRP etc.).

For example:
Here i have distributed 5 networks from RIPv2 through R3, which in this case an ASBR.
The summarization should occur on R3 using the following config:
router ospf 1
log-adjacency-changes
summary-address 4.4.0.0 255.255.252.0
network 3.3.3.3 0.0.0.0 area 2
[output omitted]

Show ip route on R2 will shows:
R2#sh 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

C 2.0.0.0/8 is directly connected, Loopback0
O E2 4.4.0.0/22 [110/20] via 10.1.23.3, 06:07:50, FastEthernet0/0
[output omitted]

Again, as in the case of the ABR, the OSPF protocol injects discard route automatically, which can be ignored using the command: no discard-route external, under OSPF router config.

No comments:

Post a Comment