arearange1

What is the ‘area range’ command in OSPF?

Check out these additional Routing Resources:
Our IP Routing course at Udemy Our Custom Profiles for Wireshark Classes at the Online School

This is commonly asked question from our routing courses and routing discussions in other courses.  Let’s explain this command in this article.

To start, you have to know that OSPF supports different areas.  Different areas can be used to control routing between areas (think of inter area routing and intra area routing).  For example you might have one area that you do not want routed to another area (e.g. Area 3 cannot talk to Area 7).  Further you may want to manage the size of the routing table by summarizing routes in one area.

I have created a sample network using IPv6 as follows:

arearange1

Note that there are three areas, Area 0, Area 1 and Area 2.  Normally Area 0 would be considered the ‘backbone area’  but in this case we will keep things simple.  We will start by everyone being able to see everyone:

arearange2

We see all the routes in the R1 IPv6 routing table.

A quick set of pings from PC1 confirms reachability:

arearange3

If you are curious about the IPv6 OSPFv3 configurations, here they are:

R1

config t
ipv6 unicast-routing
ipv6 cef
ipv6 router ospf 1
router-id 0.0.0.1
int loop 0
no ip address
ipv6 enable
ipv6 address 1::1/128
ipv6 ospf 1 area 0
int f0/0
no ip address
ipv6 enable
ipv6 address 1:1::2/64
ipv6 ospf 1 area 0
int f0/1
no ip address
ipv6 enable
ipv6 ospf 1 area 0
end

R2

config t
ipv6 unicast-routing
ipv6 cef
ipv6 router ospf 1
router-id 0.0.0.2
int loop 0
no ip address
ipv6 enable
ipv6 ospf 1 area 0
ipv6 address 2::2/128
int f0/0
no ip address
ipv6 enable
ipv6 ospf 1 area 0
int f0/1
no ip address
ipv6 enable
ipv6 address 2:2::2/64
ipv6 ospf 1 area 2
int f1/0
no ip address
ipv6 enable
ipv6 ospf 1 area 1
end

R3

config t
ipv6 unicast-routing
ipv6 cef
ipv6 router ospf 1
router-id 0.0.0.3
int loop 0
no ip address
ipv6 enable
ipv6 address 3::3/128
ipv6 ospf 1 area 1
int f0/0
no ip address
ipv6 enable
ipv6 ospf 1 area 1
int f0/1
no ip address
ipv6 enable
ipv6 address 3:3::2/64
ipv6 ospf 1 area 1
end

 OK – now let’s see what the area range command does.  Note the area range command is not yet implemented in the above configuration.

The area range command format is as follows:

area{ IPv6 address | decimal } range ipv6 address/mask [ advertise | not-advertise ] [ cost cost_value ]

Let’s say we want to limit Area 1 routes from reaching Area 0.  This means that on the R2 – the Area Border Router, I can add the area range command:

area 1 range 3:3::/64 not-advertise

Now let’s look at the R1 routing table:

arearange4 

You can see that the 3:3::/64 route is no longer in the table.  Without a route in the table, any destinations in that network will not be reachable while everything else is.  Let’s try again from PC1:

arearange5

 We see then that using the command can allow or not allow routes to be propagated from the ABR therefore controlling reachability between areas.

Another thing the area range command can do is essentially summarize routes.  First, I have negated the prior area range command so once again, everyone can see everyone else in the network.  Now, we see in Area 1 two prefixes: 3::3/128 and 3:3::/64 (just look at the first R1 routing table at the beginning of the article).  What is we wanted to summarize this as 3::/16?  We would use the following command on R2 the ABR:

area 1 range 3::/16 advertise

The result is instead of two routes in the routing table representing Area 1, we now have only one:

arearange6

 

All of this works the exact same way in IPv4 networks with OSPFv2.

I hope you find this article and its content helpful.  Comments are welcomed below.  If you would like to see more articles like this, please support us by clicking the patron link where you will receive free bonus access to courses and more, or simply buying us a cup of coffee!, and all comments are welcome! 

 

 

 

 

 

 

Leave a Comment

Contact Us Here


Please verify.
Validation complete :)
Validation failed :(
 
Your contact request has been received. We usually respond within an hour, but please be patient. We will get back to you very soon.
Scroll to Top