Sunday 9 October 2011

Introduction to OSPF

Today i will introduce my blog reader to explain how to calculate ospf cost and ospf fundamental.
OSPF is Open shortest path first routing protocol which is widely used in routing . It is no rule for proprietary of only vendor. All most all vendor like cisco, extreme, and juniper router can able to load and run OSPF routing protocol. Basically in ospf, there is one backbone area called area 0 which can connect all routers including other Area Border Router (ABR) or Autonomous System Border Router.(ASBR).

Today i just explain how to get from Router R1 to reach Router R3 loopback interface and how to get ospf cost from R1 -- > R3. Here is diagram.



















Let me help to configure same as below command on each router interface.

R1 Configuration
============
!
interface Loopback0
 ip address 1.1.1.1 255.0.0.0
 ip ospf 1 area 0
!
interface Serial0/0
 ip address 192.168.12.1 255.255.255.252
 ip ospf 1 area 0
!
end


R2 Configuration
=============
 interface Loopback0
 ip address 2.2.2.2 255.0.0.0
 ip ospf 1 area 0
!
interface Serial0/0
 ip address 192.168.12.2 255.255.255.252
 ip ospf 1 area 0
!
interface FastEthernet1/0
 ip address 192.168.23.2 255.255.255.0
 ip ospf 1 area 0
 no shutdown
!
 end

R3 Configuration
=============
!
interface Loopback0
 ip address 3.3.3.3 255.0.0.0
 ip ospf 1 area 0
!
interface FastEthernet0/0
 ip address 192.168.23.3 255.255.255.0
 ip ospf 1 area 0
!
end

====================================================
After finish configuring on each router. OSPF process will start and you can check by using
show ip ospf neighbor command on each router. Here is R2 is forming OSPF neighborship with
R3 (3.3.3.3) and R1 (192.168.12.1).











We can calculate OSPF costs on each interface by using below costs:
  1. Fastethernet : 1 
  2. Serail : 64 
  3. Loopback : 1
























Here can see route 1.1.1.1 [110/66] means that
110 is OSPF administrative distance.
66 means ospf costs from R3 to R1.
I will show how to calculate to get 66 number.  Based on OSPF costs above mentions,
we can calculate here:

All Total Cost = R1 Serial Interface to R2 + R2 ethernet link to R3 + R3 Loopback interface cost
                       =                 64                     +                     1               +                    1
                       =                                                                66


Hope reader can enjoy routing :)

No comments:

Post a Comment