How to Configure OSPF Routing Protocol Using Packet Tracer?

Configure OSPF Routing in Packet Tracer to learn OSPF Routing easy

Another post related to CCNA Certification and this time learn how to configure OSPF routing? The configuration of OSPF routing protocol is easy as RIP Routing. The Open Shortest Path First (OSPF) is a routing protocol for wide area networks and enterprise network. OSPF is perhaps the most widely used interior gateway protocol (IGP) in large enterprise networks. The IS-IS is another link-state dynamic routing protocol, which is more common in large service provider networks. The most widely used exterior gateway protocol is the Border Gateway Protocol (BGP), the principal routing protocol between autonomous systems on the Internet.

OSPF Routing Lab Configuration

Download the lab from this post or create your own OSPF Routing Lab and try to learn OSPF Routing configuration using this step by step guide.

Router 1: Do the basic configuration of your routers, switches and computers. Set the IP address for each interface the same as a screenshot. The diagram is classless IP addresses and sub-netted to many networks. So it means you must familiar with IP sub-netting and VLSM.

Configure OSPF Routing Packet Tracer - Technig
Configure OSPF Routing Packet Tracer – Technig
Router 2: Do the following configuration for Router 2.

Configure OSPF Routing
Configure OSPF Routing

Router 3: Now try to set IP address for Router 3 interfaces also.

Router Commands
Router Commands
Good, the basic configuration has competed and now start configure OSPF routing protocol on this network.

How to Configure OSPF Routing Protocol?

The Lab is ready for routing, download and configures OSPF routing with the following step by step guide. In the router R1 configure OSFP routing with Router OSPF command.

Configure OSPF Routing R1
Configure OSPF Routing R1
The router OSPF command enables OSPF routing on the router, and the 1 before OSFP is the process ID of the OSFP Protocol. You can set different process id from “1-65535” for each router.

The network command with network ID “network” is the network identifier, and the “″ is the wildcard mask of network. Wildcard mask determines which interfaces to advertise because OSPF advertises interfaces, not networks.

Now go to Router R3 and configure with the following commands.

Don? So do the following for router R2.

OK, OSPF routing configuration has been finished successfully, now test your network whether they can ping with each other or not. In my Lab they work perfect, you can download and see the result. Configure OSPF Routing Protocol – Complete Lab.

Related Search: 

OSPF configuration step by step.
how to configure OSPF between two routers.
how to configure OSPF on Cisco router packet tracer.
OSPF configuration in packet tracer.
OSPF basic configuration.
simple OSPF configuration example.
OSPF routing protocol configuration pdf.
how to configure router in packet tracer.
how to configure OSPF step by step.

You might also like
  1. Chris says

    Just a suggestion, but I connected another serial between R2 and R3 using and added those networks to OSPF. This allowed me to shut down a serial interface on any of the serial links and witness OSPF topology update accordingly to take another path, then watch again as I no shut the interface. This might be a good thing to add to the lab?

    1. Shais
      Shais says

      Hi Chris, thanks for suggestion and I’m glad you found the article helpful.
      It’s a simple lab to configure OSPF on Cisco routers for new students. Everyone can add and change the lab whatever they want.

  2. Eph says

    Thanks for this great help, I’m very satisfied just finding this.

    1. Shais
      Shais says

      Your welcome my friend, I’m glad you find the article helpful.

  3. SteM says

    I think there is a “mistake” in your configuration. In fact, you do not advertise internet by this command :
    R1(config)#router ospf 1
    R1(config-router)#network area 0

    Here, you include internet on your area 0.
    I think the right configuration to do here, is to do a default static route on R1 and share it to the others by ospf like that :

    router ospf 1
    passive-interface Serial1/3 #do not send Hello packets on this interface
    network area 0
    network area 0
    default-information originate #send default route to others routers in the area
    ip route Serial1/3


  4. hussain says

    sir thanks, this configuration was very helpful. sir, i have a problem in my project so please help me …below is the name of my project.

    Configuration And Comparison of IPv6 Routing Protocols (RIPng,OSPFv3,BGPv4)Using Packet Tracer Simulator
    and analyzing on OPNET.

    kindly give my your email for further help…thanks

  5. Joy says

    Hi! I really wanted to learn more but I can’t open the packet tracer file. what version did you used? Thank you…

    1. Shais
      Shais says


      You can use the student edition of Packet Tracer.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.