Config Lab: IPv4 Static Routes 1

Wendell Odom
By Wendell Odom September 14, 2021 09:05

One of the best ways to learn IPv4 routing is to think hard about IPv4 static routes. Today’s lab gives you more of that with a typical config lab. It starts with a topology and with IPv4 addresses configured. Your job: add IPv4 static routes for all remote subnets on all four routers in the topology.

All about Config Labs

The blog has a series of lab exercises called “Config Labs.” Each lab presents a topology with the relevant initial configuration for each device. The lab also lists new requirements, after which you should create the additional configuration to meet those requirements. You can do the lab on paper, in a text editor, or use software tools like Cisco Packet Tracer or Cisco Modeling Labs.

Once you have created your answer, you can click various tabs at the bottom of this post to see the lab answers, comments about the lab, and other helpful information.

The Lab Exercise


Configure static IPv4 routes on the routers shown in the figure so that each router can forward packets to all the subnets shown in the figure. The specific rules for this lab are:

  • Configure static routes on each of the four routers
  • Configure static routes to each subnet that is not a connected subnet
  • Assumptions:
    • All router interfaces shown in the lab are up, working and have correct IPv4 addresses assigned per the figure
    • All PCs have been configured with an IPv4 address and are working



Figure 1: Simple Hub and Spoke Topology


Initial Configuration

Examples 1, 2, 3 and 4 show the beginning configuration state of Core, Branch1, Branch2 and Branch3.


Example 1: Core Config


Example 2: Branch1 Config


Example 3: Branch2 Config


Example 4: Branch3 Config

Answer Options - Click Tabs to Reveal

You can learn a lot and strengthen real learning of the topics by creating the configuration – even without a router or switch CLI. In fact, these labs were originally built to be used solely as a paper exercise!

To answer, just think about the lab. Refer to your primary learning material for CCNA, your notes, and create the configuration on paper or in a text editor. Then check your answer versus the answer post, which is linked at the bottom of the lab, just above the comments section.

You can also implement the lab using the Cisco Packet Tracer network simulator. With this option, you use Cisco’s free Packet Tracer simulator. You open a file that begins with the initial configuration already loaded. Then you implement your configuration and test to determine if it met the requirements of the lab.

(Use this link for more information about Cisco Packet Tracer.)

Use this workflow to do the labs in Cisco Packet Tracer:

  1. Download the .pkt file linked below.
  2. Open the .pkt file, creating a working lab with the same topology and interfaces as the lab exercise.
  3. Add your planned configuration to the lab.
  4. Test the configuration using some of the suggestions below.

Download this lab’s Packet Tracer File

You can also implement the lab using Cisco Modeling Labs – Personal (CML-P). CML-P (or simply CML) replaced Cisco Virtual Internet Routing Lab (VIRL) software in 2020, in effect serving as VIRL Version 2.

If you prefer to use CML, use a similar workflow as you would use if using Cisco Packet Tracer, as follows:

  1. Download the CML file (filetype .yaml) linked below.
  2. Import the lab’s CML file into CML and then start the lab.
  3. Compare the lab topology and interface IDs to this lab, as they may differ (more detail below).
  4. Add your planned configuration to the lab.
  5. Test the configuration using some of the suggestions below.

Download this lab’s CML file!


Network Device Info:

The switches used for this lab are all layer 2 switches.

This table lists the interfaces used in the lab exercise documentation that differ from those used in the sample CML file.

Device Lab Port  CML Port
Core G0/0 G0/3


Host device info:

This table lists host information pre-configured in CML/VIRL, information that might not be required by the lab but may be useful to you.

Device IP Address User/password
PC1 cisco/cisco
PC2 cisco/cisco
PC3 cisco/cisco

Lab Answers Below: Spoiler Alert

Lab Answers: Configuration (Click Tab to Reveal)


Figure 1: Simple Hub and Spoke Topology

Example 1: Core Config


Example 2: Branch1 Config


Example 3: Branch2 Config


Example 4: Branch3 Config

Commentary, Issues, and Verification Tips (Click Tabs to Reveal)


When configuring static routes, it is important to ensure that you have all of the correct IPv4 subnet information, just a little difference in subnet mask can make a big difference in routing behavior.

For this lab you were tasked with configuring static routes to all remote subnets on all routers. The figure shows six different subnets. The Core router connects to three subnets, so it will need three static routes. Each branch router connects to two subnets, so each branch router will need static routes for four different subnets.

For Core, the three remote LAN subnets are, and Just to help us get our bearings, Table 1 lists the three destination subnets, with router Core’s outgoing interface and next-hop global unicast address:

Destination Subnet

Off of Router…

Core Router’s Outgoing interface

Core’s Next-Hop Address







Table 1: Data to Use in Router Core’s Static IPv4 Routes

The configuration, shown in Example 1, repeats the ip route command three times. Each time it lists the destination subnet per the first column of the table, and the next hop address per the last column. For example, the complete command to configure one static route would be ip route (Note that the mask is in DDN format, not prefix format.)

For Branch1, before thinking about the configuration command, think about the topology in the figure. Branch1 has two connected subnets. Then, to send packets to the other four subnets, router Branch1 will always send the packets out its G0/1 interface to the Core router next. As a result, and as seen in Example 2, all four of Branch1’s routes list as the next hop address. The four commands each list different destination subnets:,,, and

Branch2 uses the same basic logic as router Branch1. Branch2 has two connected subnets, four remote subnets, and all four static routes for the remote subnets points to router Core next. In Branch2’s case, the next-hop address of the Core router is As seen in Example 3, the four ip route commands list as the next-hop address, with subnets,,, and in the four different commands.

As you probably guess by now, Branch3 uses the same basic logic as routers Branch1 and Branch2. Branch3 has two connected subnets, four remote subnets, and all four static routes for the remote subnets points to router Core next. In Branch3’s case, the next-hop address of the Core router is As seen in Example 4, the four ip route commands list as the next-hop address, with subnets,,, and

Known Issues in this Lab

This section of each Config Lab Answers post hopes to help with those issues by listing any known issues with Packet Tracer related to this lab. In this case, the issues are:

# Summary Detail
1 None No known issues related to this lab.


Why Would Cisco Packet Tracer Have Issues?

(Note: The below text is the same in every Config Lab.)

Cisco Packet Tracer (CPT) simulates Cisco routers and switches. However, CPT does not run the same software that runs in real Cisco routers and switches. Instead, developers wrote CPT to predict the output a real router or switch would display given the same topology and configuration – but without performing all the same tasks, an actual device has to do. On a positive note, CPT requires far less CPU and RAM than a lab full of devices so that you can run CPT on your computer as an app. In addition, simulators like CPT help you learn about the Cisco router/switch user interface – the Command Line Interface (CLI) – without having to own real devices.

CPT can have issues compared to real devices because CPT does not run the same software as Cisco devices. CPT does not support all commands or parameters of a command. CPT may supply output from a command that differs in some ways from what an actual device would give. Those differences can be a problem for anyone learning networking technology because you may not have experience with that technology on real gear – so you may not notice the differences. So this section lists differences and issues that we have seen when using CPT to do this lab.

Beyond comparing your answers to this lab’s Answers post, you can test in Cisco Packet Tracer (CPT) or Cisco Modeling Labs (CML). In fact, you can and should explore the lab once configured. For this lab, once you have completed the configuration, try these verification steps. 

Answer on Paper, or Maybe Test in Lab

Next, write your answer on paper. Or if you have some real gear, or other tools, configure the lab with those tools.

If you do implement the entire network in a lab, you can test the solution by going to each PC and pinging the other three. All the pings should work. Additionally, you could use an extended ping command to ping from each router’s G0/2 interface to each other router’s G0/2 interface IP address. For instance, from R1, the command ping source would test the forward route to R4’s G0/2 subnet, and the reverse route back to R1’s G0/2 subnet. Finally, issuing a traceroute command from any of the PCs in the lab would let you see the path through the network.

More Labs with Related Content!

Config Lab: IPv4 Addresses 5
Config Lab: IPv4 Static Routes 2
Wendell Odom
By Wendell Odom September 14, 2021 09:05
Write a comment


  1. Brett October 26, 23:05

    In my solution, I used a summary route on each of my branch routers, rather than add each /30 route individually. Am I on the right track in summarizing these, or should it be avoided?

    Reply to this comment
    • certskills October 27, 14:01

      Hey Brett,
      It’s not harmful to use a summary route as you did here. But I think you’re asking more about what makes sense in real networks. While you could create one route instead of many, I’d even go for a default route on each of the remote routers and do away with all of the more specific routes. Of course, the lab exercise is written to encourage exercise with the commands, and this one hopes to give exercise with subnet routes rather than default routes. So as long as you understand what static routes you configured and what they do, the goal is met.

      Reply to this comment
  2. Matt Perry November 23, 13:40

    In my solution, I did not need to enter ip route 10.100.200.X.Y for the branch routers. Each pc was able to ping the other by only adding the ip route 192.168.5X.0 routes. Since the core is directly attached to the 10.100.200.X.Y routes, why do I need to add them to the branch routers? As I said, what I have works and I did not add them.

    Reply to this comment
    • Wendell Odom Author November 30, 17:50

      Hi Matt,
      Ignoring the lab steps for a moment, I agree, what you did should work to support the PCs, in subnets 192.168.5x.0, to ping each other successfully.
      Now thinking about the lab, the routes on the branch routers for the WAN subnets were needed in the lab because the lab asked for them. But why? Well, say if the lower left router wanted to ping the WAN interface IP addresses for the two not-connected WAN subnets, it would need routes for those. Or, if from any of the branch routers, you tested by pinging remote PCs, the source IP address of those pings, by default, would the the branch router’s WAN IP address. So the return packet would need to be supported by a route to the WAN subnet.
      So, if you’re interested, repeat your test with your current config, but now ping from the branch routers, and see the results. Then try adding those static routes for the WAN subnets and thinking through the logic.

      Reply to this comment
  3. IAN DEWAR November 27, 09:14

    Wendell, You’ve stated interface GigabitEthernet0/3 for Example 1: Core Config.
    There is no GigabitEthernet0/3 interface. It should be GigabitEthernet0/0!

    Reply to this comment
View comments

Write a comment

Comment; Identify w/ Social Media or Email


Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.