Configuring OSPF on a Cisco router

This recipe describes configuring OSPF (Open Shortest Path First) in a Cisco router. OSPF was created to provide a more scalable dynamic routing solution than RIP. OSPF utilizes less bandwidth because, once established, it only sends routing table updates when there are changes.


router(config)#router ospf 1
router(config-router)#network 10.130.0.0 0.0.255.255 area 130

The command turns on the OSPF routing protocol with a process id of 1. The network line must be added to tell the router which networks will be participating in OSPF. This command can be expanded to include stub areas and not so stubby areas. That is how Cisco refers to it. You can run multiple processes of OSPF using different process ids.

Related commands:
show ip ospf neighbor
show ip ospf interface

The Conversation

Follow the reactions below and share your own thoughts.

9 Responses to “Configuring OSPF on a Cisco router”

  1. January 17, 2009 at 3:33 pm, PATRICK said:

    configuring a router is not easy. who is gonna help me out?

    Reply

  2. January 17, 2009 at 3:38 pm, Anonymous said:

    i like configuring routers

    Reply

  3. September 26, 2009 at 7:32 am, Anonymous said:

    i want konw how to configure router with diffrent protocol ?please give some tips to understand quickly pls

    Reply

  4. July 15, 2010 at 1:10 pm, Muhammedlceesay said:

    how can i configure ospf i need a feedback

    Reply

    • July 20, 2010 at 3:12 am, Pavithren Pakianathan said:

      If you have one interface connected to your wan @ 10.10.10.1 subnet mask 255.255.255.252 and the other connected to your lan @ 192.168.15.1 subnet mask 255.255.255.0 then enter the following commands:
      router ospf 1network 192.168.15.1 0.0.0.255 area 0network 10.10.10.1 0.0.0.3 area 0follow this format:router ospf “process_id”network “ip_address” “wildcard_mask” area “area_no”
      –>process id is locally significant is is used to differentiate between OSPF processes running on the same router and they do not need to match between different routers.
      –>for the wildcard mask just subtract subnet mask from 255.255.255.255.

      Reply

      • July 20, 2010 at 4:47 pm, Muhammedlceesay said:

        like if i want to configure 5 routers in the same network so how can i configure ospf to work between 5 routers simualtenaously to work together and able to ping each other please i need a feedback.

        Reply

      • September 22, 2010 at 7:39 am, Gabriel Ohain Clement said:

        u are a good instrutor

        Reply

  5. August 19, 2010 at 10:02 am, Iamhuman said:

    sudda bokka

    Reply

  6. December 29, 2011 at 12:17 am, mohsen moaddel said:

    how to configure ospf in wan ?

    Reply

Leave a Reply

You may also like-

OSPF Authentication on Cisco RoutersConfigure OSPF authentication to prevent unauthorized routing updates. In this example, Router A and Router B are connected with a WAN link. The WAN ...