It’s too easy – enabling OSPF per interface rather than using the old IOS network command. In some ways, we may not trust that it’s that easy. So get some practice with today’s lab, a nice clean set of OSPF requirements including the use of interface commands to enable OSPF.
Requirements
Configure OSPF for the lab network shown in the figure. However, do not use the traditional configuration with network commands in OSPF configuration mode. Instead, use OSPF interface configuration.
The specific rules for this lab are:
- Configure so each router uses a router-id of x.x.x.x where x equals the router number.
- Do not rely on interface IP addresses for the setting of the router IDs.
- Use OSPF area 0
- Use an OSPF process-id number of 50
- Enable OSPF directly on each interface, rather than using the indirect method and the OSPF network
- Assume all interfaces shown in the lab are up and working
Figure 1: Two Routers with IP Subnets
Initial Configuration
Examples 1 and 2 show the beginning configuration state of R1 and R2.
Example 1: R1 Config
hostname R1 ! interface GigabitEthernet0/1 no shutdown ip address 10.50.100.97 255.255.255.224 ! interface GigabitEthernet0/2 no shutdown ip address 10.50.100.129 255.255.255.224
Example 2: R2 Config
hostname R2 ! interface GigabitEthernet0/1 no shutdown ip address 10.50.100.98 255.255.255.224 ! interface GigabitEthernet0/2 no shutdown ip address 10.50.101.1 255.255.255.224
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 interface IPv6 addresses 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!
Note that while many Cisco switches no longer support ISL as a trunking protocol, the layer 2 switch image in VIRL does, so it needs to be configured to know whether to use ISL or 802.1Q. The lab exercise does not mention this fact. So, FYI, the .VIRL file includes this command (already configured) so trunking will work:
switchport trunk encapsulation dot1q
Network Device Info:
This table lists the interfaces changed in this lab to work well in VIRL.
Device | Lab Port | VIRL Port |
SW1 | F0/2 | G0/2 |
SW1 | F0/1 | G0/3 |
SW2 | F0/2 | G0/2 |
SW2 | F0/1 | G0/3 |
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.100.124/29 | 02:00:11:11:11:11 | cisco/cisco |
PC2 | 172.16.100.125/29 | 02:00:22:22:22:22 | 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