Configuring a single-area OSPF for a network topology of three Cisco routers and five networks

The Open shortest Path First (Ospf) is one of the best internal routing protocols deployed by network engineers on enterprise networks. Apart from being an industry standard, it keeps all possible routes to a destination, making it the internal routing protocol with the fastest convergence time. The link state routing protocol is supported across different vendors platforms. In this demonstration, I will share with us on how to implement single-area OSPF on a network topology involving three routers with two WAN links and three local area networks between them.

Network Topology:

A network topology of three routers with five connected networks in area zero

Facts about OSPF

  1. It has a default administrative distance of 110
  2. It supports classless addressing and variable-length subnetmask (VLSM)
  3. It is a link state routing protocol
  4. It supports manual route summarization
  5. It keeps all available routes to a network
  6. It converges quickly
  7. Its uses cost to select the shortest path to a destination network.

Implementation

I will start from Router 1. On this router, I will set the hostname, assign IP addresses to interface s0/3/0 and interface f0/0, and configure OSPF in area 0. See the commands below:

Router 1

Router>en

Router#conf t

Router(config)#hostname Router1

Router1(config)#int s0/3/0

Router1(config-if)#ip add 192.168.4.1 255.255.255.252

Router1(config-if)#no shut

Router1(config-if)#int f0/0

Router1(config-if)#ip add 192.168.1.1 255.255.255.0

Router1(config-if)#no shut

Router1(config-if)#exit

Router1(config)#router ospf 1

Router1(config-router)#network 192.168.1.0 0.0.0.255 area 0

Router1(config-router)#network 192.168.4.0 0.0.0.3 area 0

Router1(config-router)#no shut

 

You may also like: Cisco CCNA: Implementing EIGRP with VLSM and manual summarization.

Next, I will configure Router2. On this router, I will assign IP addresses to the two serial interfaces as well as the f0/0 interface, configure hostname for the router and configure OSPF in area 0 for the three networks. The two serial interfaces on router2 are DCE and as such, will be clocked. See commands below.

Router 2

Router>en

Router#conf t

Router(config)#hostname Router2

Router2(config)#int s0/3/0

Router2(config-if)#ip add 192.168.4.2 255.255.255.252

Router2(config-if)#clock rate 64000

Router2(config-if)#no shut

Router2(config-if)#ip add 192.168.5.2 255.255.255.252

Router2(config-if)#clock rate 64000

Router2(config-if)#no shut

Router2(config-if)#int f0/0

Router2(config-if)#ip add 192.168.2.1 255.255.255.0

Router2(config-if)#no shut

Router2(config-if)#exit

Router2(config)#router ospf 1

Router2(config-router)#network 192.168.2.0 0.0.0.255 area 0

Router2(config-router)#network 192.168.4.0 0.0.0.3 area 0

Router2(config-router)#network 192.168.5.0 0.0.0.3 area 0

Router2(config-router)#no shut

One Router3, the configuration will be similar to that of Router1 save for the networks. See commands below:

Router 3

Router>en

Router#conf t

Router(config)#hostname Router3

Router3(config)#int s0/3/0

Router3(config-if)#ip add 192.168.5.1 255.255.255.252

Router3(config-if)#no shut

Router3(config-if)#int f0/0

Router3(config-if)#ip add 192.168.3.1 255.255.255.0

Router3(config-if)#no shut

Router3(config-if)#exit

Router3(config)#router ospf 1

Router3(config-router)#network 192.168.3.0 0.0.0.255 area 0

Router3(config-router)#network 192.168.5.0 0.0.0.3 area 0

Router3(config-router)#no shut

 

Verification

To verify my configuration, I will use the command show ip route on router2 to see the routes that have been learned via OSPF. See output below:

 

Image showing routes learned via OSPF

Since Router2 has no direct connections to networks 192.168.1.0/24 and 192.168.3.0/24, the output above shows that these routes have been learned via OSPF and are now reachable from Router2. At this point, pings between network hosts on the LAN should be successful.

Thanks guys for reading this post. If you would like to have the packet racer file of this LAB, kindly drop your email in the comment box below and I will be glad to email it to you. Don’t forget to follow me across my social media handles.

Spread the love

6 thoughts on “Configuring a single-area OSPF for a network topology of three Cisco routers and five networks”

  1. I have checked your site and i have found some duplicate content, that’s why you don’t rank high
    in google, but there is a tool that can help you to create 100% unique content,
    search for; boorfe’s tips unlimited content

    Reply

Leave a Comment