Open Shortest Path First (OSPF) in Networking Case _ 1 _ Basic Configuration

Click here to view my video on youtube for below mentioned case study with real routers

Ospf1

Open Shortest Path First:

OSPF is an OPen source Link State Routing Protocol that Makes its metric as Cost which is equal to 10^8 / bandwidth.

  • OSPF is a Area Based and process based Routing Protocol.
  • It is based on Dijikstra Link State Routing Algorithm
  • IT does not send updates often like RIP
  • The Complete convergence time is 30 minutes
  • It has HEllo timer and dead timer which is 4 times the Hello timer
  • It’s protocol number is 89
  • Ospf maintains link state database (lSA)
  • there are 7 types of lsa
  • The OSPF’s important Aspect is that BACKBONE AREA is 0
  • Multicast Address:
    • 224.0.0.5
    • 224.0.0.6
  • Hello Interval:
    • default of 10 seconds
  • Dead interval
    • four times the Hello interval
  • Administrative Distance Value is 110
  • Packets in OSPF
    • hello packets
    • Dead Packets
    • update packets
    • LSAs
    • Request
    • acknowledgement
  • Tables inOSPF
    • Routing Table- Basic table for routes
    • Topology table – The common database for OSPF routers
    • Neighbor Table- Table which shows the neighbor information
  • Router-ID
    • This is actually, the  name of the particular router in OSPF which makes more important in OSPF network
    • It will be assigned automatically and even we can make it manual by
    • router-id a.b.c.d
    • Conditions
      • 1-highest Router loopback interface
      • 2-Highest active physical interface IP address
      • sh ip protocols will verify
    • Router id is used in DR and BDR election and also in neighbor establishment
  • Type of Routers in OSPF
    • DR (Designated Router)
    • BDR (Back up Designated Router)
    • ABR (Area Border Router)
      • The router which connects AREA 0 with another area.
    • ASBR (Autonomous System Boundary Router)
      • The Router which connects to the external system or other routing Protocols or other ISP
    • Internal Router
  • Note : The concept of Dr and Bdr election will be explained in my next blog

alltypes

  • Type of OSPF networks :

  • Point-point network type
  • Broadcast network type
  • non broadcast network type
  • point to multipoint network Type

networktype

  • States in OSPF

  • Down  – No information (hellos) has been received from     neighbor.
  • Attempt   – Manually configured neighbors in an NBMA
  • Init   – Router has received a hello packet from its      neighbor
  • 2-Way   – Bi-directional communication
  • Exstart   – DR and BDR are election
  • Exchange   – Router exchange database  description (DBD)
  • Loading   – Exchange of link state information
  • Full   – Routers are fully adjacent with each other

Trouble shooting Commands of OSPF :

ospfcommands

Configurations :

OSPF Configurations

Ospf1

R1R1(config-router)#Router Ospf 1

R1(config-router)#network 172.16.101.0 0.0.0.255 area 0
R1#show ip protocols
*** IP Routing is NSF aware ***

Routing Protocol is “ospf 1”
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 172.16.101.1
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
172.16.101.0 0.0.0.255 area 0
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 110)

Changing the Router Id manually

R1(config)#router ospf 1
R1(config-router)#rout
R1(config-router)#router-id 0.0.0.1
R1(config-router)#exit
R1#show ip protocols
*** IP Routing is NSF aware ***

Routing Protocol is “ospf 1”
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 0.0.0.1
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
172.16.101.0 0.0.0.255 area 0
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 110)

Debugging Ospf
R1#debug ip ospf adj
OSPF adjacency events debugging is on
R1#terminal monitor

R1#show ip route ospf
Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route, H – NHRP, l – LISP
+ – replicated route, % – next hop override

Gateway of last resort is not set

172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks
O 172.16.102.1/32 [110/65] via 172.16.26.2, 00:00:28, Serial0/0/0

Another Way of enabling OSpf by Interface

R1(config-if)#ip ospf 1 ar
R1(config-if)#ip ospf 1 area 0

Router 2 :

R2(config)#router ospf 1
R2(config-router)#network 172.16.26.0 0.0.0.255 area 0

R2#show ip route ospf
Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route, + – replicated route

Gateway of last resort is not set

172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks
O 172.16.101.1/32 [110/782] via 172.16.26.1, 00:01:21, Serial0/0/0
R2#sho
R2#show ip prot
R2#show ip protocols
*** IP Routing is NSF aware ***

Routing Protocol is “ospf 1”
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 172.16.102.1
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
172.16.26.0 0.0.0.255 area 0
Routing Information Sources:
Gateway Distance Last Update
0.0.0.1 110 00:01:42
Distance: (default is 110)

 

All about Networking

Welcome to The Human Network

All about Networking

Discover

A daily selection of the best content published on WordPress, collected for you by humans who love to read.

Longreads

The best longform stories on the web

The WordPress.com Blog

The latest news on WordPress.com and the WordPress community.

Create your website at WordPress.com
Get started
%d bloggers like this: