Aggregating OSPF Networks
You can aggregate OSPF networks at the border of an OSPF area by using the area range command. You can also aggregate OSPF networks when entering the border of the OSPF domain by using the summary-address command.
area range
- Use to aggregate OSPF routes at an OSPF area border.
- Use only for ABRs.
- You can configure multiple instances of the area range command for a single OSPF area.
- Use the following steps to create an area range:
- Configure the interface's IP address(es) using the ip address command.
- Enable OSPF using the router ospf command.
- Configure the network area with the network area command.
- Configure the area range with the area range command.
- Use the no-summary keyword to specify that the summary LSA not be sent into the stub area (IPv6 only).
- Example
host1(config-if)#ip address 2.2.10.1 255.255.255.0host1(config-if)#ip address 2.2.11.1 255.255.255.0 secondaryhost1(config)#router ospf 2host1(config-router)#network 2.2.0.0 0.0.255.255 area 0At this point, the OSPF process is configured with two OSPF interfaces. If your router is an ABR, two networks must be summarized: 2.2.10.0/24 and 2.2.11.0/24.
host1(config-router)#area 0 range 2.2.0.0 255.255.0.0After you enter this area range command, only the aggregated range 2.2.0.0/16 is going to be summarized.
- By default, the range of configured networks is advertised in type 3 (summary) LSAs.
- Use the advertise keyword (IPv6 only) to specify advertisement of configured networks.
- Use the do-not-advertise keyword to prevent advertisement of configured networks.
- Use the cost keyword (IPv6 only) to define the cost value (0-16777215) for the specified range of networks.
- Use the command no area area-id (with no other keywords) to remove the specified area from the configuration.
- Use the summary-address or ipv6 summary-prefix command to summarize external routes being redistributed into OSPF.
- Use the no version to disable the aggregation of routes at the OSPF area border.
summary-address
summary-prefix
- Use to aggregate external routes at the border of the OSPF routing domain.
- Use only for AS boundary routers.
- The AS boundary router advertises one external route as an aggregate for all redistributed routes that are covered by the address.
- For OSPF, this command summarizes only routes from other routing protocols that are being redistributed into OSPF.
- With this command, you can reduce the load of advertising many OSPF external routes by specifying a range that includes some (or all) of these external routes.
- Example
host1(config-router)#summary-address 10.1.0.0 255.255.0.0Use the area range command for route summarization between OSPF areas. Use the no version to restore the default.