Assigning an area range

Ranges for an area can be assigned. Ranges allow a specific IP address and mask to represent a range of IP addresses within an area, so that only that reference range address is advertised to the network, instead of all the addresses within that range. Each area can have up to 32 range addresses.

About this task

Procedure

  1. Enter the configure terminal command to access global configuration mode.
    device# configure terminal
  2. Enter the router ospf command to enter OSPF router configuration mode and enable OSPFv2 on the device.
    device(config)# router ospf
  3. Enter the area range command, specifying an area ID, and enter the range. Use the cost parameter to specify the cost value for the area range. Repeat as necessary.
    device(config-ospf-router)# area 10.0.0.10 range 10.45.0.0 10.255.0.0 cost 20
    device(config-ospf-router)# area 10.0.0.20 range 10.45.0.0 10.255.0.0 cost 20 

Example

The following example defines an area range for subnets on 10.0.0.10 and 10.0.0.20 and sets a cost of 20 for the area range.

device# configure terminal
device(config)# router ospf
device(config-ospf-router)# area 10.0.0.10 range 10.45.0.0 10.255.0.0 cost 20
device(config-ospf-router)# area 10.0.0.20 range 10.45.0.0 10.255.0.0 cost 20