Assigning an area range

  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 

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