What is OSPF and Configuring OSPF in a Single Area

 What is OSPF and Configuring OSPF in a Single Area

What is OSPF

In OSPF (Open Shortest Path First) a wildcard mask is used. A wildcard mask is a sequence of numbers that look similar to the subnet mask that streamlines the routing packet within proprietary network subnets. But they are not the same; both represent a 32-bit number. However, performing the magic logic bit 0 of the wildcard masks tell the router that those corresponding bits in the address must be compared as well as bit 1 of the wildcard masks tell the router that those bit don’t need to be compared.


OSPF is implemented by a wide variety of network vendors, including Cisco. It is an open standard routing protocol. If there are multiple non-Cisco routers then you can’t use EIGRP, if it is in large networks, then your only options are OSPF and something called route redistribution. OSPF was developed as a replacement for RIP (Routing Information Protocol) and it is also a Link-state routing protocol. Fast convergence and scalability of the OSPF is a major advantage over RIP to larger network implementations. The working of OSPF is based on the Dijkstra algorithm. First, the shortest path tree is constructed and then with the resulting best paths, the routing table is populated. The convergence in OSPF is not quickly as EIGRP, and it supports equal-cost, multiple routes to the same destination. OSPF support Both IPv6 and IP routed protocols like EIGRP.

The features of OSPF are:

v An autonomous system number and area number are used.
v Minimizes the traffic of routing updates.
v Allows scalability.
v It also supports VLSM / CIDR.
v Hop-count is unlimited.
v Open Standard so, it allows multi-vendor deployment.

Configuration OSPF in a Single Area
OSPF in a Single Area
Configuration OSPF in a Single Area

Configuring the Router R1 Interfaces

Router> enable

Router# configure terminal

Enter configuration commands, one per line. End with CNTL / Z.

Router (config) # hostname R1

R1 (config) # interface serial 0/0/0

R1 (config-if) # ip address 11.0.0.1 255.0.0.0

R1 (config-if) #encapsulation hdlc

R1 (config-if) #clock rate 64000

R1 (config-if) #keepalive 10

R1 (config-if) #no shutdown

R1 (config-if) #exit

R1 (config) # interface serial 0/0/1

R1 (config-if) # ip address 13.0.0.1 255.0.0.0

R1 (config-if) #encapsulation hdlc

R1 (config-if) #clock rate 64000

R1 (config-if) #keepalive 10

R1 (config-if) #no shutdown

R1 (config-if) #exit

R1 (config) # interface fastethernet0/0

OR

R1 (config) # int fa0/0

R1 (config-if) # ip address 10.0.0.50 255.0.0.0

R1 (config-if) #no shutdown

Interface Status
Interface Status up

R1 (config-if) #end

R1#

Configuring the Router R2 Interfaces

Router> enable

Router# configure terminal

Enter configuration commands, one per line. End with CNTL / Z.

Router (config) # hostname R2

R2 (config) # interface serial 0/0/0

R2 (config-if) # ip address 11.0.0.2  255.0.0.0

R2 (config-if) #encapsulation hdlc

R2 (config-if) #keepalive 10

R2 (config-if) #no shutdown   

Interface Status
Interface Status up

R2 (config-if) #exit

R2 (config) # interface serial 0/0/1

R2 (config-if) # ip address 15.0.0.1  255.0.0.0

R2 (config-if) #encapsulation hdlc

R2 (config-if) #clock rate 64000

R2 (config-if) #keepalive 10

R2 (config-if) #no shutdown

R2 (config-if) #exit

R2 (config) # interface fastethernet0/0

OR

R2 (config) # int fa0/0

R2 (config-if) # ip address 12.0.0.50  255.0.0.0

R2 (config-if) #no shutdown

Interface Status
Interface Status up

R2 (config-if) #end

R2#

Configuring the Router R3 Interfaces

Router> enable

Router# configure terminal

Enter configuration commands, one per line. End with CNTL / Z.

Router (config) # hostname R3

R3 (config) # interface serial 0/0/0

R3 (config-if) # ip address 15.0.0.2  255.0.0.0

R3 (config-if) #encapsulation hdlc

R3 (config-if) #keepalive 10

R3 (config-if) #no shutdown

Interface Status
Interface Status up

R3 (config-if) #exit

R3 (config) # interface serial 0/0/1

R3 (config-if) # ip address 13.0.0.2  255.0.0.0

R3 (config-if) #encapsulation hdlc

R3 (config-if) #keepalive 10

R3 (config-if) #no shutdown  

Interface Status
Interface Status up

R3 (config-if) #exit

R3 (config) # int fa0/0

R3 (config-if) # ip address 14.0.0.50 255.0.0.0

R3 (config-if) #no shutdown   

Interface Status
Interface Status up

R3 (config-if) #exit

R3#


Router R1, R2, and R3 Routing Table

Router R1

R1# show ip route

IP Route
IP Route Status

R1#

Note: By default, in the router R1 routing table the three associated interfaces and directly connected networks are listed.

Router R2

R2# show ip route

IP Route
IP Route Status

R2#

Note: By default, in the router R2 routing table the three associated interfaces and directly connected networks are listed.

Router R3

R3# show ip route

IP Route
IP Route Status

R3#

Note: By default, in the router R3 routing table the three associated interfaces and directly connected networks are listed.

Ping Verification on Router R1, R2, and R3

Router R1

R1#ping 11.0.0.2

Ping Verification
Successful Ping Verification

R1#ping 13.0.0.2

Ping Verification
Successful Ping Verification

R1#ping 12.0.0.50

Ping Verification
Unsuccessful Ping Verification

R1#ping 14.0.0.50

Ping Verification
Unsuccessful Ping Verification

Note: The ping was not successful because the network 12.0.0.0 and 14.0.0.0 is not listed in the router R1 routing table. Using the OSPF the network 12.0.0.0 and 14.0.0.0 needs to be put in the R1 routing table.


Router R2

R2#ping 11.0.0.1

Ping Verification
Successful Ping Verification

R2#ping 15.0.0.2

Ping Verification
Successful Ping Verification

R2#ping 10.0.0.50

Ping Verification
Unsuccessful Ping Verification

R2#ping 14.0.0.50

Ping Verification
Unsuccessful Ping Verification

Note: The ping was not successful because the network 10.0.0.0 and 14.0.0.0 is not listed in the router R2 routing table. Using the OSPF the network 10.0.0.0 and 14.0.0.0 needs to be put in the R2 routing table.


Router R3

R3#ping 13.0.0.1

Ping Verification
Successful Ping Verification

R3#ping 15.0.0.1

Ping Verification
Successful Ping Verification

R3#ping 10.0.0.50

Ping Verification
Unsuccessful Ping Verification

R3#ping 12.0.0.50

Ping Verification
Successful Ping Verification

Note: The ping was not successful because the network 10.0.0.0 and 12.0.0.0 is not listed in the router R3 routing table. Using the OSPF the network 10.0.0.0 and 12.0.0.0 needs to be put in the R3 routing table.


Configuring OSPF on Router R1, R2, and R3

Router R1

R1#configure terminal

R1 (config) # router ospf?

<1-65535> Process ID

R1 (config) # router ospf 12

R1 (config-router) #network 10.0.0.0 0.255.255.255 area 1

R1 (config-router) #network 11.0.0.0 0.255.255.255 area 1

R1 (config-router) #network 13.0.0.0 0.255.255.255 area 1

R1 (config-router) #end

R1#

OSPF Process ID
OSPF Process ID

Router R2

R2#configure terminal

R2 (config) # router ospf 12

R2 (config-router) #network 12.0.0.0 0.255.255.255 area 1

R2 (config-router) #network 11.0.0.0 0.255.255.255 area 1

OSPF Neighborship
OSPF Neighborship

R2 (config-router) #network 15.0.0.0 0.255.255.255 area 1

R2 (config-router) #end

R2#

Router R3

R3#configure terminal

R3 (config) # router ospf 12

R3 (config-router) #network 13.0.0.0 0.255.255.255 area 1

OSPF Neighborship
OSPF Neighborship

R3 (config-router) #network 14.0.0.0 0.255.255.255 area 1

R3 (config-router) #network 15.0.0.0 0.255.255.255 area 1

OSPF Neighborship
OSPF Neighborship

R3 (config-router) #end

R3#

Note: An area of OSPF is a grouping of routers and contiguous networks, and in the same area all routers share the common area ID. Because at a time a router can be a member of more than one area and on the router, the area ID is associated with specific interfaces. Some interfaces belong to area 1 and the remaining interfaces can belong to any area like area 0.

All the routers have the same topology table within the same area. OSPF areas play a vital role in establishing a hierarchical network organization like something that enhances the OSPF scalability.

Router R1, R2, and R3 Routing Table

Router R1

R1#show ip route

IP Route
IP Route Status

R1#

Router R2

R2#show ip route

IP Route
IP Route Status

R2#

Router R3

R3#show ip route

IP Route
IP Route Status

R3#

Note: Metric value is 65. The administrative distance is 110 and the word “O” represents the OSPF.


Ping Verification on Router R1, R2, and R3

Router R1

R1#ping 12.0.0.50

Ping Verification
Successful Ping Verification

R1#ping 14.0.0.50

Ping Verification
Successful Ping Verification

Router R2

R2#ping 10.0.0.50

Ping Verification
Successful Ping Verification

R2#ping 14.0.0.50

Ping Verification
Successful Ping Verification

Router R3

R3#ping 10.0.0.50

Ping Verification
Successful Ping Verification

R3#ping 12.0.0.50

Ping Verification
Successful Ping Verification


OSPF Summary

R1#show ip ospf interface serial 0/0/0

OSPF Summary
OSPF Summary Status

R1#show ip ospf neighbor

OSPF Neighbor
OSPF Neighbor Status

R1#show ip protocols

IP Protocol
IP Protocol Status

The comparison between OSPF and other traditional distance-vector routing protocols is:

OSPF vs RIP
OSPF vs RIP

Search Tags

  1. What is a single-area OSPF
  2. How to Configure OSPF in a Single Area
  3. OSPF configuration in packet tracer
  4. What Is OSPF and How It is Configured

If you want to configure OSPF in multi-area with Practical Lab visit:👇

How To Configure OSPF in Multi-area


Get Packet Tracer Lab

Post a Comment

0 Comments