This article will tell you how to configure and experiment with OSPF using Cisco Packet Tracer. Before you attempt to configure OSPF, I would advise you to go through these two articles regarding OSPF from the Intense School website: CCNA Prep: Complete Guide To OSPF (Part 1) and CCNA Prep: Complete Guide To OSPF (Part 2).

By using those two resources, you will know what the commands will be needed and what the correct output should be if you have configured everything correctly.

I have created three Packet Tracer files:

  • ospf-init.pkt—This is the initial topology with all interfaces configured but no OSPF configuration. You should download this file and start to configure OSPF areas; when you are done, you should check reachability between the four PCs.
  • ospf-features.pkt—This is the starting point of the second scenario, where some optional OSPF feature will be configured. It can be used as a verification point for the first scenario as well. If you configure the first scenario correctly you can continue using that Packet Tracer file.
  • ospf-final-config.pkt—This is just for your verification and contains the final configuration at the end of both scenario one and two.

Regarding the topology, on every subnet where a PC is connected, the router’s interface has an IP address whose last octet is .1 and the last octet of the PC’s IP address is .100. The default gateway of the PC is the router’s IP address.

For instance, on the subnet with PC1: PC1 has the IP address of 10.10.10.100/24 and R1’s interface IP address is 10.10.10.1/24.

Each router has a loopback address in the form of x.x.x.x/32, where x is the router number. For instance, the loopback address of R1 is 1.1.1.1/32, as you can also see in the diagram.

Also, each subnet between the routers is written on the topology and every router is using its router number as the last octet. For instance, on the subnet 10.10.16.0/24, R1 has 10.10.16.1/24 and R6 has 10.10.16.6/24.

Scenario 1

Tasks

  1. Configure R1, R3, R5 and R6 in area 0 with their respective interfaces, as shown on the topology (configure loopbacks of R5 and R6 in area 0).
  2. Configure R2 and R5 in area 1 with their respective interfaces, as shown on the topology.
  3. Configure R4 and R6 in area 2 with their respective interfaces, as shown on the topology.
  4. Make sure that the routers where the PCs are connected do not attempt to establish any OSPF adjacency on that subnet.

Verification

  1. Test connectivity between the PCs; for instance, ping all other PCs from PC1.

Hints

  1. Use the command “router ospf 1” to start the OSPF process on each router.
  2. Use the command “network x.x.x.x y.y.y.y area <z>” to configure an interface under a specific area.
  3. Use the command “passive-interface” to make sure that no OSPF adjacency will be established on that interface.

Scenario 2

Tasks

  1. Configure the router-id of each router to x.x.x.100. For instance, the R1’s router-id should be 1.1.1.100. OSPF process might need to be restarted.
  2. Configure plain text authentication between R2 and R5 with the key cisco.
  3. Configure MD5 authentication between R4 and R6 with the key cisco.
  4. Change the OSPF hello and dead interval timers between R1 and R3 to 5 seconds and 20 seconds.
  5. Make sure that, when R5 sends traffic to R6, R5doesn’t send it through the direct link between them.

Verification

  1. Use the “show ip ospf” command to check the router-id.
  2. Use the “show ip ospf interface” command to check the authentication type on the interface where authentication was changed.
  3. Use the “show ip ospf interface” command to check the new timers on the interfaces where they were changed.
  4. Use the “show ip route” on R5 and confirm that the next hop for PC4 is either through R1 or R3. The traceroute from PC2 to PC4 shouldn’t look like this:

    PC>tracert 10.10.40.100

    Tracing route to 10.10.40.100 over a maximum of 30 hops:

    1 0 ms 0 ms 0 ms 10.10.20.1
    2 0 ms 0 ms 0 ms 10.10.25.5
    3 1 ms 0 ms 0 ms 10.10.56.6 >>> direct link between R5 and R6
    4 0 ms 0 ms 0 ms 10.10.46.4
    5 1 ms 0 ms 1 ms 10.10.40.100

    Trace complete.

    PC>

Hints

  1. Use the command “router-id x.x.x.100” under OSPF protocol configuration.
  2. Use the command “clear ip ospf process” to activate the new router-id.
  3. Use the commands “ip ospf authentication’ and “ip ospf authentication-key cisco” to configure plain text authentication.
  4. Use the commands “ip ospf authentication message-digest” and “ip ospf message-digest-key <key_number> md5 cisco” to configure MD5 authentication.
  5. Use the “ip ospf cost” command to increase the cost of Serial0/0/0 on R5 for a destination advertised by R6 bigger than the cost advertised by R1 and R3.

I expect that these exercises will give you more understanding of how OSPF works and you will feel how is it to configure various features of OSPF that are supported on Cisco Packet Tracer.

However you shouldn’t stop with what is described in these two scenarios. Try to see what other OSPF knobs you can configure and what they do.