OSPF Interface Config – Answers (Config Museum)
Today’s post shows the config for this latest Config Museum practice problem, with some commentary about how to configure OSPF per-interface. It helps to start with the problem statement, found in the previous Config museum post from a few days ago. As usual, no guile, no tricks, just a chance to exercise.
First: The Answer
The next three examples show the literal answers. To start, check your answers versus these answers; following the examples, I’ll make a few comments about options. Here’s a quick repeat of the figure, for reference:
Figure 1: Router Triangle with Sample IP Addresses for Calculations
Example 1: R1 Config
router ospf 1 router-id 1.1.1.1 ! interface GigabitEthernet0/0 no shutdown ip address 172.16.4.5 255.255.255.252 ip ospf 1 area 0 ! interface GigabitEthernet0/1 no shutdown ip address 172.16.4.1 255.255.255.252 ip ospf 1 area 0 ! interface GigabitEthernet0/4 no shutdown ip address 172.16.17.254 255.255.254.0 ip ospf 1 area 0
Example 2: R2 Config
router ospf 2 router-id 2.2.2.2 ! interface GigabitEthernet0/0 no shutdown ip address 172.16.4.6 255.255.255.252 ip ospf 2 area 0 ! interface GigabitEthernet0/1 no shutdown ip address 172.16.4.9 255.255.255.252 ip ospf 2 area 0 ! interface GigabitEthernet0/4 no shutdown ip address 172.16.12.254 255.255.255.0 ip ospf 2 area 0
Example 3: R3 Config
interface loopback 0 ip address 3.3.3.3 255.255.255.255 ! router ospf 3 ! Gets it’s router ID based on the loopback IP address interface GigabitEthernet0/0 no shutdown ip address 172.16.4.2 255.255.255.252 ip ospf 3 area 0 ! interface GigabitEthernet0/1 no shutdown ip address 172.16.4.10 255.255.255.252 ip ospf 3 area 0 ! interface GigabitEthernet0/4 no shutdown ip address 172.16.11.254 255.255.252.0 ip ospf 3 area 0
Commentary
Normally with Config Museum labs we just post the answer without much commentary, but this one begs for a few comments.
First, on the core point of using interface subcommands, two parameters must be chosen for the ip ospf interface subcommand. However, the choices are relatively basic. One parameter is the OSPF router process ID, as found on the router ospf command. The other is the OSPF area number to which the interface is assigned, and in this lab, all are assigned to area 0.
The rest of the possibly-tricky parts have nothing to do with the OSPF interface configuration.
For the OSPF router IDs, the instructions asked you to set them to something obvious, but it didn’t require you to use any particular method. The answers show two methods: directly setting the RID (routers R1 and R2), and using the router’s highest loopback IP address (router R3). But your answer could use either of those two methods, or it could have relied on a non-loopback interface IP address.
Finally, the OSPF process IDs do not have to match. Just to make that point, the answers lists here use different process IDs. However, any literal value within the allowed range (from 1 through a pretty large number) could have been used.