Check your latest OSPF interface config here. Do the lab first. You know the drill.
Answers
Figure 1: Two Routers with IP Subnets
Example 3: R1 Config
interface GigabitEthernet0/1 ip ospf 50 area 0 ! interface GigabitEthernet0/2 ip ospf 50 area 0 ! router ospf 50 router-id 1.1.1.1
Example 4: R2 Config
interface GigabitEthernet0/1 ip ospf 50 area 0 ! interface GigabitEthernet0/2 ip ospf 50 area 0 ! router ospf 50 router-id 2.2.2.2
Commentary
The legacy method of configuring OSPF uses network statements inside of OSPF router configuration mode. The network command causes the OSPF process to match the interfaces that will be included into the OSPF area specified. The alternative is to use commands inside interface configuration mode to specify that it will be included inside the OSPF area specified. This newer interface method is considered by many to be easier and a more readable configuration method.
For this lab each of the routers will be configured with an OSPF process ID of 50 (this is a locally significant number only). R1 will be configured with a router-id of 1.1.1.1 and R2 will be configured with a router-id of 2.2.2.2 using the router-id command. This command is still located under OSPF router configuration mode even when using interface configuration commands to specify the included OSPF interfaces.
Note the absence of network commands under the router ospf commands.
Individual ip ospf process-id area area-id interface subcommands replace the network command’s purpose. Each of these commands enables the OSPF process listed by number. Because this lab asked you to use process ID 50 on both routers, and to put all interfaces in area 0, the answers show the command ip ospf 50 area 0 throughout the configuration, one per router interface.