Config Lab: OSPF Interface Config 1

 In 200-301 V1 Ch22: OSPF - Basic Features, 200-301 V1 Part 6: OSPF, 200-301 V1 Parts, CML-Free-Labs, Config Lab, Config Lab CCNA Vol 1 Part 6, Hands-on

From the first days of OSPF in Cisco routers, OSPF configuration has included a network command. The network command enables OSPF on that router’s interfaces, but it uses indirect logic. In fact, the network command does not list interface numbers. Cisco added an alternative OSPF configuration method a while back – a method that does directly enable OSPF on the interface, and avoids using the OSPF network command. I’m sure you guessed by now: today’s lab gives you a chance to practice configuring OSPF with this alternative method.

All about Config Labs

The blog has a series of lab exercises called “Config Labs.” Each lab presents a topology with the relevant initial configuration for each device. The lab also lists new requirements, after which you should create the additional configuration to meet those requirements. You can do the lab on paper, in a text editor, or use software tools like Cisco Packet Tracer or Cisco Modeling Labs.

Once you have created your answer, you can click various tabs at the bottom of this post to see the lab answers, comments about the lab, and other helpful information.

The Lab Exercise

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. (This lab does not tell you the name of the command, in the spirit of letting you exercise your knowledge.)

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 for all interfaces
  • Enable OSPF directly on each interface, rather than using the indirect method and the OSPF network command
  • Assume all interfaces shown in the lab are up and working

 

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.

hostname R1
!
interface GigabitEthernet0/0
 no shutdown
 ip address 172.21.1.1 255.255.255.128
!
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

Example 1: R1 Config

 

hostname R2
!
interface GigabitEthernet0/0
 no shutdown
 ip address 172.22.2.2 255.255.255.192
!
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

Example 2: R2 Config

 

hostname R3
!
interface GigabitEthernet0/0
 no shutdown
 ip address 172.23.3.3 255.255.255.224
!
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

Example 3: R3 Config

Config Lab Intro Video

The above lab intro – the text, figures, and initial configuration – tells you all you need to know. But if you want a little more, with a little different slant on what to do in this lab, watch this lab intro video!

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:

  1. Download the .pkt file linked below.
  2. Open the .pkt file, creating a working lab with the same topology and interfaces as the lab exercise.
  3. Add your planned configuration to the lab.
  4. Test the configuration using some of the suggestions below.

Download this lab’s Packet Tracer File

This Lab Supports Both CML-Free and CML-Personal!!!

The downloadable file listed here works in both CML-P or CML-F because it uses the IOL (router) and IOL-L2 (switch) reference platform images supported by both products as of CML V2.8. Note that these images also require less CPU and RAM than the other CML-P options.

Use the same general workflow as with Cisco Packet Tracer, as follows:

  1. Download the CML file (filetype .yaml) linked below.
  2. Import the lab’s CML file into CML.
  3. Start the lab in CML.
  4. Compare the CML lab topology and interface IDs to this lab Blog page, as they may differ (more detail below).
  5. Add your planned configuration to the lab, adjusting for interface ID differences.
  6. Test the configuration using some of the suggestions below.

Download this lab’s CML file!

 

Interface ID Differences:

The lab diagrams on this page use interface IDs (IIDs) that match the Packet Tracer version of the lab. When using CML, adjust the lab IIDs based on this table. Also, note that the IOL and IOL-L2 images used by the supplied CML file support only the “Ethernet” interface type, and not “FastEthernet” or “GigabitEthernet”.

The conventions for this lab are:

  • All Gigabit interface types become Ethernet.
  • All interface numbers stay the same. For instance, G0/0 becomes E0/0, and G0/1 becomes E0/1.
Port Shown in Lab  CML Port
G0/0 E0/0
G0/1 E0/1
G0/2 E0/2

 

Using the “One-Router as Many Hosts” Feature

The lab diagram on this page shows:

  • 3 routers
  • 3 LANs with unspecified LAN switches
  • 3 hosts

However, CML-Free allows only five active nodes. To overcome that limitation, the supplied CML does the following:

  • Uses the CML “Unmanaged Switch” node type to create each LAN. Unmanaged switches do not count against the five-node limit. Each unmanaged switch places all ports in the same VLAN with all ports up.
  • Uses an extra router as a “One-Router-as-Many-Hosts” router. The router, per its pre-configuration, acts like ALL the hosts in the design – while counting as only one node towards the CML five-node limit. With this node, you can test as if sitting at the lab’s host, for instance, to issue ping and traceroute commands.

To learn about the one-router-as-many-hosts method, look to the following videos:

 

Note: The one-router-as-many-hosts router may use passwords. The passwords and usernames are always “cisco”.

Lab Answers Below: Spoiler Alert

Lab Answers: Configuration (Click Tab to Reveal)

Answers

Figure 1: Three Router Triangle with IP Subnets

 

interface GigabitEthernet0/0
 ip ospf 11 area 0
!
interface GigabitEthernet0/1
 ip ospf 11 area 0
!
interface GigabitEthernet0/2
 ip ospf 11 area 0
!
router ospf 11
 router-id 1.1.1.1

Example 4: R1 Config

 

interface GigabitEthernet0/0
 ip ospf 22 area 0
!
interface GigabitEthernet0/1
 ip ospf 22 area 0
!
interface GigabitEthernet0/2
 ip ospf 22 area 0
!
router ospf 22
 router-id 2.2.2.2

Example 5: R2 Config

 

interface GigabitEthernet0/0
 ip ospf 33 area 0
!
interface GigabitEthernet0/1
 ip ospf 33 area 0
!
interface GigabitEthernet0/2
 ip ospf 33 area 0
!
router ospf 33
 router-id 3.3.3.3

Example 6: R3 Config

Commentary, Issues, and Verification Tips (Click Tabs to Reveal)

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.

First, for the OSPF process itself, the configuration sits at the bottom of each of the three examples (Examples 4, 5, and 6). The lab asked that we not rely on interface IP addresses to find an OSPF router ID, so R1 is configured with a router-id of 1.1.1.1, R2 with a router-id of 2.2.2.2 and R3 with a router-id of 3.3.3.3, 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 – process number 11 on router R1, 22 on R2, and 33 on R3. Note that as always, OSPF process IDs are local settings and do not need to match between neighboring routers. However, the Individual ip ospf process-id area area-id interface subcommands must refer to that local router’s own process ID.

Note that the Individual ip ospf process-id area area-id interface subcommands also refer to the OSPF area, which in this lab is area 0 in all cases.

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.

Known Issues in this Lab w/ CML

This tab lists known issues with running this lab in CML with the supplied file. The issues are:

# Summary Detail
1 No known issues. .

 

Why Would CML Have Issues?

(Note: The text below is the same as every Config Lab.)

CML supports a variety of Cisco operating systems (called reference platforms.) To make them work in CML, Cisco makes some adjustments to the code. Also, because no real router or switch hardware exists, some software features do not work the same when running in CML versus a real Cisco device. When we come across any difference when testing the lab, we’ll try to leave a note just above in case it helps you with the 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. 

  1. Each router should have two OSPF neighbors; verify that fact with the show ip ospf neighbor command.
  2. Each router should list three OSPF-learned routes, which you can verify with the show ip route command. (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.)
  3. Verify which interfaces are enabled for OSPF with the show ip ospf interface brief command.
  4. Verify the OSPF router ID with the show ip ospf database command.
  5. Try ping and traceroute/tracert commands from the hosts, directed at the other two hosts. All should succeed once your configuration is complete. Both the CPT and CML files should be preconfigured so that the hosts have an IP address in the correct subnets, with correct default gateway settings.

For host testing, note that the host PCs should be pre-configured with these addresses:

  • PC1: 172.21.1.2
  • PC2: 172.22.2.3
  • PC3: 172.23.3.4

Config Lab Review Video

Want to hear more about this lab’s solution? Check out the video to the left.

Config Lab: L3 EtherChannel 1
Config Lab: OSPF Interface Config 2
Subscribe
Notify of
guest

6 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Kwadell

Why for the process-id did you use 11,22,33? I used 1,2, and 3. Does it matter? I know each router is suppose to have their own unique process-id.

certskills

No reason, really. 1, 2, 3 work fine as well.
FYI, note that all three routers could have used the same process ID number – they do not have to be different.

Alberto Silva

I would just add this to each router
passive-interface gigabitEthernet 0/0

Alasan

Hi after configuring the Router ID on each router, giving r1 the lowest RID, the show ip ospf neighbor output is still showing IP address as neighbor ID and R1 as DR. I thought with all default setting the highest configured router Id wins the election to become the Dr.

My second question doesn’t relate to this lab. I just found out about the ccna network simulator to use for hands on trainings. I’ve been using the lads on this site as hands on exercise. I downloaded the free ccna network simulator available on the site, it says there 21 free labs we can use for practice but i only saw 3 labs on there.

Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.

6
0
Would love your thoughts, please comment.x
()
x