Config Lab: IPv4 Static Routes 2

 In 200-301 V1 Ch16: Router Addresses and Routes, 200-301 V1 Part 5: IPv4 Routing, 200-301 V1 Parts, Config Lab, Config Lab CCNA Vol 1 Part 5, Hands-on

The first time you learn about IP routing, some of the basic ideas just do not click until you think hard about the contents of the IP routing table. One of the best tools to make you think about those routes is to configure static IPv4 routes. This lab asks you to do just that – configure a small set of static routes in a four-router network. As usual, plan for about 10 minutes to do the lab on paper, or more if you want to try it on your own gear or other tools.

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

Requirements

Configure static IPv4 routes on the routers shown in the figure so that each PC can ping each other.  The specific rules for this lab are:

  • None of the routers use a dynamic routing protocol.
  • Assume all router interfaces shown in the lab are up, working and have correct IPv4 addresses assigned per the initial configurations.
  • Assume all PCs have been configured correctly, with a correct default gateway setting.

Figure 1: Four Switches with Trunks

Initial Configuration

Examples 1, 2, 3, and 4 show the beginning configuration state of R1, R2, R3, and R4.

hostname R1
!
interface GigabitEthernet0/1
 ip address 172.16.100.1 255.255.255.0
 no shutdown
!
interface GigabitEthernet0/2
 ip address 192.168.100.1 255.255.255.192
 no shutdown

Example 1: R1 Config

 

hostname R2
!
interface GigabitEthernet0/1
 ip address 172.16.100.2 255.255.255.0
 no shutdown
!
interface GigabitEthernet0/2
 ip address 192.168.100.65 255.255.255.192
 no shutdown

Example 2: R2 Config

 

hostname R3
!
interface GigabitEthernet0/1
 ip address 172.16.100.3 255.255.255.0
 no shutdown
!
interface GigabitEthernet0/2
 ip address 192.168.100.129 255.255.255.192
 no shutdown

Example 3: R3 Config

 

hostname R4
!
interface GigabitEthernet0/1
 ip address 172.16.100.4 255.255.255.0
 no shutdown
!
interface GigabitEthernet0/2
 ip address 192.168.100.193 255.255.255.192
 no shutdown

Example 4: R4 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 CML topology matches this lab topology exactly. The host info does as well.

 

Host device info:

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

Device

IP Address

Mac Address

User/password

PC1

192.168.100.62

02:00:11:11:11:11

cisco/cisco

PC2

192.168.100.126

02:00:22:22:22:22

cisco/cisco

PC3

192.168.100.190

02:00:33:33:33:33

cisco/cisco

PC4

192.168.100.254

02:00:44:44:44:44

cisco/cisco

Lab Answers Below: Spoiler Alert

Lab Answers: Configuration (Click Tab to Reveal)

Answers

Figure 1: Four Switches with Trunks

!
ip route 192.168.100.64 255.255.255.192 172.16.100.2
ip route 192.168.100.128 255.255.255.192 172.16.100.3
ip route 192.168.100.192 255.255.255.192 172.16.100.4

Example 5: R1 Config

!
ip route 192.168.100.0 255.255.255.192 172.16.100.1
ip route 192.168.100.128 255.255.255.192 172.16.100.3
ip route 192.168.100.192 255.255.255.192 172.16.100.4

Example 6: R2 Config

!
ip route 192.168.100.0 255.255.255.192 172.16.100.1
ip route 192.168.100.64 255.255.255.192 172.16.100.2
ip route 192.168.100.192 255.255.255.192 172.16.100.4

Example 7: R3 Config

!
ip route 192.168.100.0 255.255.255.192 172.16.100.1
ip route 192.168.100.64 255.255.255.192 172.16.100.2
ip route 192.168.100.128 255.255.255.192 172.16.100.3

Example 8: R4 Config

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

Commentary

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

For this lab, you were tasked with configuring static routes between the routers so that each of their LANs would be able to route packets to each other. Because there are four different routes in this topology, this means that there will be three remote LAN subnets that need to have routes configured per router.

For R1, the three remote LAN subnets are: 192.168.100.64/26, 192.168.100.128/26, and 192.168.100.192/26. The first route would be for R2’s LAN, the common subnet between the routers uses the 172.16.100.0/24 network. R2’s IP address on this shared LAN is 172.16.100.2, making this address the next-hop address in the static route. The complete command to configure this static route would be ip route 192.168.100.64 255.255.255.192 172.16.100.2.

R1’s second static route, for the subnet off R3’s G0/2 interface, would use R3’s IP address on this shared LAN of 172.16.100.3. The complete command to configure this static route would be ip route 192.168.100.128 255.255.255.192 172.16.100.3.

R1’s third and final route would be for the subnet off R4’s G0/2 interface, with R4’s IP address on the central LAN of 172.16.100.4 as the next-hop. The complete command to configure this static route would be ip route 192.168.100.192 255.255.255.192 172.16.100.4.

R2 likewise has three static routes, one each for the three remote LAN subnets: 192.168.100.0/26, 192.168.100.128/26 and 192.168.100.192/26. Note that of the three commands in Example 6, one references R1’s address as next hop, one references R3’s address as next-hop, and one references R4’s address as next-hop. Take the time to look at the subnet ID and mask in each command, compared to the figure; you should see correlation, with R1 as next-hop for the route to the subnet off R1’s G0/2 interface, and so on.

Similarly, R3 has three static routes, referencing R1, R2, and R4 as next-hop routers for three different remote subnets. R4 also has three static routes, with R1, R2, and R3 as the next-hop routers.

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 using them.

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 192.168.100.193 source 192.168.100.1 would test the forward route to R4’s G0/2 subnet, and the reverse route back to R1’s G0/2 subnet.

More Labs with Related Content!

Config Lab: IPv4 Static Routes 1
Config Lab: IPv4 Static Routes 3
Subscribe
Notify of
guest

10 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Brett

In the packet tracer lab, I believe PC2’s default gateway is configured incorrectly as 192.168.1.65, rather than 192.168.100.65.

certskills

Brett,
Agreed. I just updated the .pkt file and replaced it – next download it should be fixed. Thanks for letting me know.
Wendell

almeidajoaodealmeida

Hi Mr Wendell,
Would it be good approach to just configure the static routes by just using the exit interface ?
ip route 192.168.100.X 255.255.255.192 g0/1

certskills

Hi almeidajoaodealmeida,
The answer gets into some peculiar features of IPv4. So, using an outgoing interface, when it is a multiaccess interface, makes the static route a bit ambiguous. “Multiaccess” means that more than two devices can exist on the link. For example, on the G0/1 interface in the command you listed, there might be five routers on the link. To which router should the packet be forwarded?
So, in real life, for a multiaccess interface, use the next-hop address to remove that ambiguity.
Interestingly, with IPv4, if you did exactly as you suggest, the router with that static route would treat the route as a connected route, expecting the destinations to exist on that connected subnet. So, when forwarding a packet using that route, the router would ARP to find the matching MAC address. Then the correct next-hop router would issue an ARP reply, identifying itself, in a process called proxy ARP. That causes the first router to forward packets to the router that just made the proxy ARP reply… achieving the goal of forwarding the packet to the correct destination.
Or, avoid all that, and use the next-hop address. 🙂
Wendell

almeidajoaodealmeida

I got it, thank you! 🙂

Sam

I also used the outgoing interface, and noticed that there were several ‘Request timed out.’ replies before a successful ping. I suppose that’s due to ARP first needing to work to find the correct router?

Kevin Mx

Hello Mr Wendell, I have a question about static routes, is it necessary to configure the route at both ends, that is, in both directions?

What happens if I only configure it at one end, for example from R1 to R2, but not from R2 to R1

Greetings from Mexico City.

certskills

Kevin,
First, for context, in real networks, people seldom use static routes.
But, to be ready for the test, if you did not use a routing protocol at all, the answer is yes, you need routes in both directions. Why? All useful communication requires packets in both directions. With static routes in one direction, a packet can be forwarded (for instance) from a client to a server, but without a route in the reverse direction, the reply packet from the server to the client cannot be forwarded by the routers.

Issack Ibrahim

You will not get a return reply. Your ping will be timed out

Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.

10
0
Would love your thoughts, please comment.x
()
x