Scroll To Top

How to Configure OSPF Routing Protocol Using Packet Tracer?

Posted in Articles, CCNA2 years ago • Written by Shais5 Comments

Another post related to CCNA Certification, and this time learn how to configure OSPF routing? 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.

Basic Router Commands

Router 1: Do the basic configuration of your routers, switches and computers. Set the IP address for each interfaces the same as 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.

Basic Router Commands

Basic Router Commands

R1>enable
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#interface serial 1/3
R1(config-if)#ip address 20.10.10.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#
R1(config)#interface serial 1/1
R1(config-if)#ip address 10.10.10.1 255.255.255.252
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#
R1(config)#interface serial 1/0
R1(config-if)#ip address 10.10.10.5 255.255.255.252
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown

Router 2: Do the following configuration for Router 2.

Configure OSPF Routing

Configure OSPF Routing

R2(config)#interface serial 1/0
R2(config-if)#ip address 10.10.10.6 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip address 192.168.10.1 255.255.255.0
R2(config-if)#no shutdown

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

Router Commands

Router Commands

Router#enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R3
R3(config)#interface serial 1/0
R3(config-if)#ip address 10.10.10.2 255.255.255.252
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface fastEthernet 0/0
R3(config-if)#ip address 192.168.1.1 255.255.255.0
R3(config-if)#no shutdown

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 configure 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

R1>enable
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router ospf 1
R1(config-router)#network 20.10.10.0 0.0.0.3 area 0
R1(config-router)#network 10.10.10.0 0.0.0.3 area 0
R1(config-router)#network 10.10.10.4 0.0.0.3 area 0
R1(config-router)#

The router OSPF command is enable 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 20.10.10.0” is the network identifier, and the “ 0.0.0.3″ is the wildcard mask of 20.10.10.0 network. Wildcard mask determine which interfaces to advertise, because OSPF advertise interfaces, not networks.

 

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

R3>enable
R3#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#router ospf 1
R3(config-router)#network 192.168.1.0 0.0.0.255 area 0
R3(config-router)#network 10.10.10.0 0.0.0.3 area 0

Don? So do the following for router R2.

R2>enable
R2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router ospf 1
R2(config-router)#network 192.168.10.0 0.0.0.255 area 0
R2(config-router)#network 10.10.10.4 0.0.0.3 area 0

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 works 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.


TAGS: , ,
About this Author
Shais

I'm a network and Information Security instructor. Here is my online pictorial notebook. I would like to write and share my experience through this website for computer enthusiasts and technology geeks.

Like us on Facebook
on Facebook
Shais

Follow me on Twitter
Follow @technigs on Twitter
Shais
Add me on Google+
on Google+
Shais

5 Comments so far. Feel free to join this conversation.

  1. ChrisDecember 7, 2015 at 11:16 am - Reply

    Just a suggestion, but I connected another serial between R2 and R3 using 10.10.10.8/30 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?

    • Shais
      ShaisDecember 9, 2015 at 2:20 am - Reply

      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. EphFebruary 24, 2016 at 5:22 pm - Reply

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

    • Shais
      ShaisFebruary 24, 2016 at 6:49 pm - Reply

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

  3. SteMJuly 26, 2017 at 10:18 pm - Reply

    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 20.10.10.0 0.0.0.3 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 10.10.10.4 0.0.0.3 area 0
    network 10.10.10.0 0.0.0.3 area 0
    default-information originate #send default route to others routers in the area
    !
    ip route 0.0.0.0 0.0.0.0 Serial1/3

    🙂

Leave A Response