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 for IP routes and the summary-prefix command for IPv6 routes.
- Configure the interface's IP addresses 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.
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.
- 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 (016777215) 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 summary-prefix command to summarize external routes being redistributed into OSPF.
- 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.
summary-address
- Use to aggregate external routes at the border of the OSPF routing domain.
- Use the summary-address command for IP routes. Use the summary-prefix command for IPv6 routes.
- 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, these commands summarize only routes from other routing protocols that are being redistributed into OSPF.
- With these commands, 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.