Config Lab: IPv4 Addresses 2
Repetition helps when learning IP addressing and subnetting. The next lab gives you more reps with subnetting math and with configuring router IP addresses. If you already know the math, make this one a speed test, and find out how long it takes you from the point of reading the specifics until you can type the config!
The Lab Exercise
Requirements
Configure the IP addresses for the LAN interfaces for the routers shown in the figure per the subnets listed in the figure. The specific rules for this lab are:
- On each router’s G0/1 interface, use the last octet of 1, 2, 3, or 4 for routers R1, R2, R3, and R4, respectively.
- On each router’s G0/2 interface, configure each router with the highest allowable address in the subnet.
- Assumptions:
- Assume all device interfaces shown in the lab are up and working.
- Assume that the PCs are pre-configured with the correct IP addresses.
Figure 1: Four Routers and Five Switches
Initial Configuration
Examples 1, 2, 3, and 4 show the beginning configuration state of R1, R2, R3, and R4.
hostname R1
!
interface GigabitEthernet0/1
no shutdown
!
interface GigabitEthernet0/2
no shutdown
Example 1: R1 Config
hostname R2
!
interface GigabitEthernet0/1
no shutdown
!
interface GigabitEthernet0/2
no shutdown
Example 2: R2 Config
hostname R3
!
interface GigabitEthernet0/1
no shutdown
!
interface GigabitEthernet0/2
no shutdown
Example 3: R3 Config
hostname R4
!
interface GigabitEthernet0/1
no shutdown
!
interface GigabitEthernet0/2
no shutdown
Example 4: R4 Config
Note also that the switch in the center of the network has all default configuration other than a hostname.
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:
- Download the .pkt file linked below.
- Open the .pkt file, creating a working lab with the same topology and interfaces as the lab exercise.
- Add your planned configuration to the lab.
- Test the configuration using some of the suggestions below.
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:
- Download the CML file (filetype .yaml) linked below.
- Import the lab’s CML file into CML and then start the lab.
- Compare the lab topology and interface IDs to this lab, as they may differ (more detail below).
- Add your planned configuration to the lab.
- 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/VIRL, information that the lab might not require but may be useful to you.
Device |
IP Address |
Mac Address |
User/password |
PC1 |
172.16.1.10 |
02:00:11:11:11:11 |
cisco/cisco |
PC2 |
192.168.1.77 |
02:00:22:22:22:22 |
cisco/cisco |
PC3 |
10.20.30.173 |
02:00:33:33:33:33 |
cisco/cisco |
PC4 |
10.100.45.200 |
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
interface GigabitEthernet0/1
ip address 172.16.100.1 255.255.255.0
!
interface GigabitEthernet0/2
ip address 172.16.1.30 255.255.255.224
Example 5: R1 Config
interface GigabitEthernet0/1
ip address 172.16.100.2 255.255.255.0
!
interface GigabitEthernet0/2
ip address 192.168.1.78 255.255.255.240
Example 2: R2 Config
interface GigabitEthernet0/1
ip address 172.16.100.3 255.255.255.0
!
interface GigabitEthernet0/2
ip address 10.20.30.174 255.255.255.248
Example 3: R3 Config
interface GigabitEthernet0/1
ip address 172.16.100.4 255.255.255.0
!
interface GigabitEthernet0/2
ip address 10.100.45.254 255.255.255.192
Example 4: R4 Config
Commentary, Issues, and Verification Tips (Click Tabs to Reveal)
Commentary
When configuring IP addressing information on a networking device, it is essential to ensure that the information is correct before putting a device into production. Unlike an IP overlap on a single PC which could affect that one device or possibly affect another PC on the local subnet, the misconfiguration of an IP address on a networking device can affect the whole LAN.
For this lab, you were tasked with performing the IP addressing configuration on the five subnets shown in the figure. Four of the subnets required that the router use the highest IP address in each subnet for the connecting interface, as follows:
- R1’s LAN subnet uses the 172.16.1.0/27 subnet. The range of addresses, including the subnet ID and broadcast address, is 172.16.1.0 – 172.16.1.31, for a router interface address of 172.16.1.30.
- R2’s LAN subnet uses the 192.168.1.64/28 subnet. The range of addresses, including the subnet ID and broadcast address, is 192.168.1.64 – 192.168.1.79, for a router interface address of 192.168.1.78.
- R3’s LAN subnet uses the 10.20.30.168/29 subnet. The range of addresses, including the subnet ID and broadcast address, is 10.20.30.168 – 10.20.30.175, for a router interface address of 10.20.30.174.
- R4’s LAN subnet uses the 10.100.45.192/26 subnet. The range of addresses, including the subnet ID and broadcast address, is 10.100.45.192 – 10.100.45.255, for a router interface address of 10.100.45.254.
Additionally, all four G0/1 interfaces needed an address in subnet 172.16.100.0/24.
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.Â
- From the console of each router, verify the router’s IP addresses:
- Use the show ip interface command to verify the address and mask.
- Use the show ip interfaces brief command to verify the addresses.
- Use the ping command against the addresses expected to be configured on the local router; all pings should work.
- The initial configuration does not include any routing protocol configuration, so unless you chose to add routing protocol configuration, you should see only connected and local routes in the routing tables. You can verify those routes as compared to the figure. On each router:
- Use the show ip route command. Look for two connected routes – one connected to interface G0/1 and one connected to interface G0/2.
- Use ping tests to ping the router IP addresses in shared subnet 172.16.100.0/24. From each router, ping all four router IP addresses in that subnet. All pings should work.
Great lab for practicing subnetting! If you want all the PCs to be able to ping each other, run these 3 commands on each router to turn on OSFP (you’ll have to wait a minute before all routers advertise everything):
conf t
int range g0/1-2
ip ospf 1 area 0
no shut
Also noticed that there’s a duplicate of this lab in CONFIG LAB CCNA VOL 1 PART 5 > Config Lab: IPv4 Addresses 2.
hello and thank you for the lab
please why i can’t ping from one Pc in one subnet to another Pc in another subnet ? event the 4 Routers have a static routes ??
thank you
Well, without bringing up the lab in PT to test it, I’d say check the default gateway settings on the PCs. If unset, or set incorrectly, the PC-to-PC pings would fail.
The last octet on the Switch side for each router’s G0/1 interface should be .251-.254 instead of .1-.4, right?
Jay,
I’m not following you. Can you clarify? The routers’ all have a G0/1 interface connected to a layer 2 switch. The layer 2 switch has no IP address that matters to the lab. The switch might have one IP address in that VLAN for management, but the lab is silent about suggesting a value. If you’re suggesting four different IP addresses for the switch, I’m confused. Clarify?
Wendell
I just use:
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
Then assign all the ip addresses to my interfaces in the lab.
Wendell,
All the labs are really helpful but I enjoyed this one the most. I couldn’t figure out why PC2 would not ping R2 per the verification tips for CPT/CML. Finally I realized PC2 was not assigned an address in the subnet.
Why is there a switch in the middle of the routers. Why should a switch be placed between routers?
I wanted a design with all four routers in the same subnet, so I used a switch in the middle and put all ports in the same VLAN.