What if your #CCNA exam required you to configure the OSPF network command with a particular style of mask? What if it said “match all addresses in the subnet”, or “match all addresses in the classful network”? Or even “match only the specific interface addresses”? Could you change from using your preferred method of configuring the OSPF network commands to doing it their way? Today’s lab gives you a chance to practice, in about 5-10 minutes. Enjoy!
Requirements
Configure legacy OSPF (using network commands) between R1, R2 and R3. As a means to let you exercise the network command, this lab varies the requirements for the network commands on each router. The specific rules for this lab, for all three routers, are:
- Configure each router with a router-id of x.x.x.x where x equals the router number.
- Use OSPF area 0
- Use an OSPF process ID number of 5
Additionally, because the network command could use many different wildcard masks, use the following rules when choosing the wildcard masks to use on each router:
- Router R1: Each network command should match classful networks only, that is, match class A, B, and C networks.
- Router R2: Each network command should match the specific IPv4 addresses of the router interfaces.
- Router R3: Each network command should match the subnets of the router interfaces.
Note that in a real network, you would probably pick one style over another and use that on all routers. This lab uses a variety just to give you a variety of practice.
Figure 1: Three Router Triangle with IP Subnets
Initial Configuration
Example 1, 2 and 3 show the beginning configuration state of R1, R2 and R3.
Example 1: R1 Config
hostname R1 ! interface GigabitEthernet0/1 no shutdown ip address 172.30.1.1 255.255.255.252 ! interface GigabitEthernet0/2 no shutdown ip address 172.30.1.10 255.255.255.252 ! interface GigabitEthernet0/3 no shutdown ip address 172.16.1.1 255.255.255.0
Example 2: R2 Config
hostname R2 ! interface GigabitEthernet0/1 no shutdown ip address 172.30.1.5 255.255.255.252 ! interface GigabitEthernet0/2 no shutdown ip address 172.30.1.2 255.255.255.252 ! interface GigabitEthernet0/3 no shutdown ip address 172.16.2.2 255.255.255.0
Example 3: R3 Config
hostname R3 ! interface GigabitEthernet0/1 no shutdown ip address 172.30.1.9 255.255.255.252 ! interface GigabitEthernet0/2 no shutdown ip address 172.30.1.6 255.255.255.252 ! interface GigabitEthernet0/3 no shutdown ip address 172.16.3.3 255.255.255.0
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..
To test your solution if you happen to try it with VIRL or real gear, you can check a few obvious items with show commands. First, each router should have two OSPF neighbors (show ip ospf neighbor). Each router should list three OSPF-learned routes (show ip route). If you view the links between routers as WAN links, the three OSPF routes will be for: the two remote LANs, plus the WAN link between the other two routers. Finally, you can check the interfaces enabled for OSPF with show ip ospf interface brief, and the OSPF router ID with show ip ospf database.
Do this Lab with Cisco’s VIRL
You can do these labs on paper and still get a lot out of the lab. As an extra help, we have added files for the Virtual Internet Routing Lab (VIRL) software as well. The .VIRL file found here is a file that when used with VIRL will load a lab topology similar to this lab’s topology, with the initial configuration shown in the lab as well. This section lists any differences between the lab exercise and the .VIRL file’s topology and configuration.
Download this lab’s VIRL file!
Network Device Info
The VIRL file uses the exact same ports and topology as the original lab exercise.
Host Device Info
This table lists host information pre-configured in VIRL, information that might not be required by the lab but may be useful to you.
Device | IP Address | Mac Address | User/password |
PC1 | 172.16.1.2 | 02:00:11:11:11:11 | cisco/cisco |
PC2 | 172.16.2.3 | 02:00:22:22:22:22 | cisco/cisco |
PC3 | 172.16.3.4 | 02:00:33:33:33:33 | cisco/cisco |
Handy Host Commands:
To see PC IP address: ifconfig eth1
Ping example: ping -c 4 10.1.1.1
Trace example: traceroute 10.1.1.1
To connect to another node within the topology: telnet 10.1.1.1