Check out these additional Routing Resources: | Our IP Routing course at Udemy | Our Routing Collection on Patreon | 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:

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:

We see all the routes in the R1 IPv6 routing table.
A quick set of pings from PC1 confirms reachability:

If you are curious about the IPv6 OSPFv3 configurations, here they are:
|
R1 config t |
R2 config t |
R3 config t |
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:

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:

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:

All of this works the exact same way in IPv4 networks with OSPFv2.
If you would like to help support the continued development of independent networking, broadband, Wi-Fi, VoIP, and packet analysis content, please consider joining our Patreon community where you will gain access to exclusive technical resources, downloadable labs and PCAPs, bonus course content, troubleshooting guides, and additional member-only material. Comments and technical discussion are always welcomed at our Patreon community or on our Discord server. You can also support our work by simply buying us a coffee — every contribution helps us continue creating practical, real-world network science education for professionals and enthusiasts alike.
