multi-area-ospf-featured-image

CCNA/CCNP Lab: Configuring Multi-area OSPF

Lab Overview

In this lab, I will be going over how to configure multiarea OSPF. If you haven’t gone through my single-area OSPF lab, I would recommend going over that first. You can find it here. For this guide, I will be using Packet Tracer, which is a free netowrk simulation tool that can be downloaded free from the Cisco Networking Academy website.

In this post, I cover the following:

I have provided Packet Tracer labs to go with this post. If you already know OSPF, I encourage you to attempt it before seeing the solution. If not, feel free to download the starter files and follow along. You can download them from the links below.

Configuring Multiarea OSPF for IPv4

Above is the topology we’re going to be configuring for the IPv4 section of this guide. There are four different routers. R2-4 have LANs attached to them with /24 masks. The links between the routers are all /30 networks. Each router also has a loopback interface configured, which will also be included in the OSPF advertisements.

Objectives
1) Configure OSPF on each router with the process ID of 1.
2) Set the router-id to the loopback address on each router.
3) Advertise directly connected networks based on subnet.
4) Advertise loopback through the Lo0 interface. (don’t use network command)
5) Verify router connectivity by pinging loopbacks of other routers.
6) Verify remote network connectivity by pinging between PCs.

Bonus: Identity which routers are ABRs, Internals, Backbones, or ASBRs.

Note: Everything in this topology has been configured except OSPF. The only thing you need to do is to configure OSPF to allow each network to communicate with each other.

1. Configuring the OSPF Process

To begin OSPF configuration we need to configure the router OSPF process. We do that with the following commands:

Example:
R1(config)# router ospf {process ID}
R1(config-router)#  

Config:
R1(config)# router ospf 1
R1(config-router)#  

Unlike other routing protocols, the process ID is unique to the local router, so it does not matter if other routers are configured with the same process ID. I have asked you to configure them all with the same process ID to prove that point. You could also configure them with different process IDs, doing so will have no effect.

2. Configuring Router ID

OSPF uses router ids to identify routers. By default, the router-id is set to the highest configured loopback, or the highest configured physical interface if there is no loopback. It can also be configured using the router-id command inside the OSPF process. It is best practice to configure a loopback, then use the router-id command with the loopback address. In this lab, the loopback interface is already configured so you simply set the router-id to the loopback configured on the routers.

R1(config)# router ospf 1
R1(config-router)# router-id 1.1.1.1

3. Advertising Directly Connected Networks

There are a couple of ways to advertise networks connected to the router. You can use the network command inside the OSPF process and specify the network address and wildcard, for example, network 192.168.1.0 0.0.0.255 area 0 would advertise the 192.168.1.0/24 network into OSPF.

Alternatively, you can simply use network 0.0.0.0 255.255.255.255 area 0 to advertise all networks attached to the router. In this lab, I ask you to use the first example method, as it is best practice and more commonly used. (Note: you will not advertise the loopback this way in this lab, although you could)

R1(config)# router ospf 1
R1(config-router)# network 10.1.1.0 0.0.0.3 area 0 (network between R1 & R2)
R1(config-router)# network 10.1.2.0 0.0.0.3 area 0 (network between R1 & R3)
R1(config-router)# network 10.1.3.0 0.0.0.3 area 0 (network between R1 & R4)

4. Advertising the Loopbacks through the Interface

Another way to advertise networks is on a per-interface basis. If you go to interface configuration mode, you can use the command ip ospf {process id} area {area} to configure the interface for OSPF. For exampleip ospf 1 area 0 configures the interface for OSPF process 1 in area 0. I have asked you to configure the loopbacks on all routers using this method.

Note: R2’s loopback should be in area 1, R3’s loopback should be in area 2, R3’s loopback should be in area 3.

R1(config)# interface lo0
R1(config-if)# ip ospf 1 area 0

You will need to complete the OSPF configuration on R2, R3, and R4.

5. Verify Router Connectivity

With step 4 completed, the basic OSPF configuration is complete. We can now ping between the routers to verify connectivity. I ask you to ping loopbacks, but you can also ping interface IP addresses if you wish. Below you can see some successful pings.

6. Pinging between PCs

You can also hop into the command prompt on some of the PCs and ping between them to verify remote network connectivity. Your first pings may drop as the packets traverse the networks, but all pings should be successful after that.

Bonus: Identify ABRs, internals, backbone, and ASBRs

  • R1 is considered to back an internal/backbone router. It is an internal router because all of its interfaces are only in one area, which is area 0. Because the router is in the backbone area, it is a backbone router as well.
  • R2, R3, and R4 are all area border routers (ABR) because they all interfaces in more than one area. They can also be considered backbone routers because they all have at least one interface connected to the backbone area.
  • Because this topology only uses OSPF and is not connected to a different routing domain or another autonomous system, there is no autonomous system border router (ASBR).

Configuring Multiarea OSPF for IPv6

Above is the topology we are going to be configuring for the IPv6 lab. To keep it simple, I decided to leave LANs out of this topology. This a pure IPv6 network, meaning there are no IPv4 addresses configured on any of the routers.

Objectives
1) Configure OSPFv3 process using process ID 1
2) Configure a router-id for each router
3) Configure networks to be in Areas 0, 1, or 2, according to the topology
4) Configure loopbacks to be in the areas indicated in the notes
5) Very router connectivity by pinging loopbacks

Note: Everything in this topology has been configured except OSPFv3. The only thing you need to do is to configure OSPFv3 to allow each router to communicate with each other.

1) Configuring the OSPF Process

Because we are configuring OSPF in an IPv6 only network, we’ll only be using the IPv6 version of the commands. To begin the OSPF configuration, we’ll need to start the OSPF process by using the ipv6 router ospf {process id} command.

R1(config)# ipv6 router ospf 1
R1(config-rtr)# 

2) Configuring Router IDs

Router IDs work similarly in OSPFv3 as it does in OSPFv3 for IPv4. They both use 32-bit addresses. You may have noticed that when you started the OSPF process, the router displayed some text indicating there are no IPv4 addresses configured and asking you to manually configure one. Because this is an IPv6 only network, there are no IPv4 addresses the router can use automatically for its router ID. Meaning, we need to manually configure one.

R1(config)# ipv6 router ospf 1
R1(config-rtr)# router-id 1.1.1.1

I like to use router IDs exactly the same way I do in IPv4, so I’ve chosen to use the 1.1.1.1, 2.2.2.2, etc, scheme.

3) Configuring Networks to be in Area 0, 1, & 2

One difference between OSPFv2 and OSPFv3 is the way you advertise networks. In OSPFv3, the network command is not used. Instead, networks are advertised directly on the interfaces. OSPFv3 also uses link-local addresses to establish neighbor relationships instead of the configured IP address of the interface. However, it is still very similar to the way you do it in OSPFv2. Instead of using ip ospf {process ID} area {area}, you use ipv6 ospf {process ID} area {area}.

R1(config)# interface Gi0/0
R1(config-if)# ipv6 ospf 1 area 1

You’ll need to do this on every interface you want to be included in the OSPF process. The area number will differ depending on what areas the interfaces are connected to.

3) Configuring Loopbacks

Loopbacks can be added to the OSPF process in exactly the same way as physical interfaces. R1’s loopback should be in area 1, R2 and R3 should have their loopbacks in area 0, and R4’s loopback should be in area 2.

R1(config)# interface loopback0
R1(config-if)# ipv6 ospf 1 area 1

5) Verifying Connectivity

With Step 3 being completed, we’ve finished the basic OSPFv3 configuration (assuming you’ve configured all routers, not just R1). You can now verify connectivity by pinging any loopbacks, or even interfaces on other networks.

Troubleshooting

If you’re having trouble completing the labs, below are some commands that may help you find the problem.

IPv4
show ip protocols
show ip ospf neighbors
show ip ospf interface
show ip ospf brief
show ip route

IPv6
show ipv6 protocols
show ipv6 ospf neighbors
show ipv6 ospf interface
show ipv6 ospf brief
show ipv6 route

It is also worth mentioning that OSPF has some requirements in order to work:

  • Area ID must match
  • Router IDs must be different
  • Hello and Dead Timer intervals must match

All three of the above things are already true in the start file, but it is important to know and that could be a possible problem you face in the future. You can check for those things using the show ip ospf interface command. It will show all of the above information for each interface configured for OSPF.

Note: Packet Tracer can often have buggy behavior. If you cannot ping but are certain the configuration is correct, try saving and restarting Packet Tracer. Sometimes this is the case, but someone studying for the CCNA may not have the knowledge to recognize if it is a Packet Tracer bug or a configuration issue.

Thanks for Reading!

If you’ve gotten this far, thanks for reading. I hope this post has helped you understand how to get a basic OSPF configuration working. If you have any trouble, please feel free to contact me, and I will do my best to help. If you believe there is something wrong with the initial configuration, please contact me via my contact form to let me know.

Full Configuration

The full configurations for both labs can be found on my GitHub!

1 thought on “CCNA/CCNP Lab: Configuring Multi-area OSPF”

  1. Vraiment c’est très intéressant et si riche, s’il vous plaît envoyer moi la page.

Comments are closed.

Scroll to Top