OPEN SHORTEST PATH FIRST (OSPF) – AN IGP PROTOCOL

KEYWORDS: OSPF , CCNA, CCNP , LSA, LSDB , Dijkstra , MPLS, DBD

 

Do you recall  Dijkstra’s algorithm, shortest path first algorithm in your engineering and CCNA preparation . Its time to know its one of the  interesting application .

OSPF is an interior gateway protocol that helps to facilitate the routing information in for the form of LSA (Link state Advertisement) within a single routing domain. It gathers LSA from available routers and constructs a topology map of the network.The same topology map is shared between all the devices with an Area .  OSPF was designed to support (VLSM) or (CIDR) addressing models.

OSPF senses changes in the state of the link , such as link failures, quickly and converges on a new loop-free routing structure. It uses the Dijkstra’s algorithm to find the shortest path tree for each route.

The link-state information is maintained on each router as a link-state database (LSDB) which is a tree-image of the entire network topology. Identical copies of the LSDB are periodically updated through flooding on all OSPF routers.

The best routes are selected by the OSPF by discovering the paths with the lowest cost to a destination. The route cost includes the cost which is configured on interface on which the Link State Advertisement is received by the OSPF and the cost configured on the outbound links operating between the destination network and the router.

A close look inside a OSPF packet suggests the field that constitutes the OSPF packet .

 

 

The fields on the OSPF header are as follows:

  • Version number – Version for IPv4 .I.E 2
  • Type –There are different types of ospsf packets (Hello, DBD, LSR, LSU, LSack)
  • Packet Length – length of the OSPF packet
  • Router ID – Router ID of source Router
  • Area ID – The OSPF area in which the packets originated
  • Check sum – Used in error detection.
  • Authentication Type – Describes either no authentication, cleartext passwords, or encrypted Message Digest 5 (MD5) for router authentication.
  • Authentication – Used with authentication type.
  • Data – Contains different information, depending on the OSPF packet type:
    • Hello – A list of known neighbors.
    • DBD – Summary of the LSDB, which includes all known router IDs and their last sequence number, among a number of other fields.
    • LSR - Contains the type of LSU needed and the router ID of the router that has the needed LSU
    • LSU – Contains the full LSA entries. Multiple LSA entries can fit in one OSPF update packet.
    • LSack – Empty.

 

 

How to Configure OSPF on Cisco Router?

Following commands should be entered in Router configuration mode on Cisco router to enable OSPF,

Router(config)# router ospf 1 (this command enables OSPF on router where 1 is the process ID)

Router(config-router)# network 10.1.1.1 0.0.0.255 area 0 (network specified in this command on which OSPF has to be enabled)

Router(config-router)# network 10.2.1.1 0.0.0.255 area 0 (network specified in this command on which OSPF has to be enabled)

OSPF Neighbor states in case of Adjacency

In order to determine the neighbor state of OSPF, you have to run the following command,

Rotuer# Show ip ospf neighbor

OSPF Multicast Address

OSPF routers sends and listens OSPF message on following multicast address .

  • 224.0.0.5 –all OSPF routers Multicast Address
  • 224.0.0.6 –the DR and BDR multicast Address

 

OSPF Challenges and Troueblshooting

Most of the engineers find it difficult to troubleshoot the OSPF if the goes down or is not coming up . Although from Practical expereince it is not difficult if you know how OSPF works and what happens of each stage.

 

 

OSPF Neighbor Adjacency States

  1. Down State An OSPF intial process before any exchange of information starts .The exchange process begins when router sending a hello out each interface that is configured for OSPF. The hello packet is sent out multicast address 224.0.0.5.
  2. Init State  An ospf speaking router receives a packet from another OSPF router . These routers will add the originating router to their list of neighbors. This state is the init state.
  3. Two-way State  When the originating router obtains the hello back from the neighbors as well, it notices that its ownRouter ID is included in the list of neighbors. At this point a two-way state is reached. They now have two way communication.
  4. On a broadcast link type, such as an Ethernet LAN and multi-access medium, a DR and BDR must be elected. The DR will form a bi-directional adjacency with each routers on the LAN link.
  • If a new router joins the broadcast network in which a DR and BDR already exist, it will get to the two-way state with all the routers, including the DR and BDR, and those that are DROTHER. The new router will form a bidirectional adjacency with only the DR and BDR.
  1. Every 10 seconds, the routers exchange hello packets to ensure there is still communication established.

 

  • The routers proceeds in the exstart state once the DR and BDR are elected. After that they exchange LSAs and populate the LSDBs.
  • Loading Stateif the router finds that the DBD contains a more updated information, it sends an LSR to the other router. The process of sending the LSR is called the loading state.
  • The routers are considered synchronized and in full state once all LSRs have been received and updated.

 

From troubleshooting perspective you can run the command “ Sh ip ospf nei “ . it will show the the neighbor states and their status.

 

Wish you a happy learning !!!

 

For more updates on the Data Center world,visit Data Center Talk.

 

 

Share on TwitterSubmit to StumbleUpon

What is MPLS and its Challenges

From some years customers are changing their legacy FR , ATM , X.25 , LL with Ethernet MPLS Point to Point and multipurpose circuits and MPLS IP VPN . Companies preference of WAN is decided by many factors like Applications , the number of sites , the amount of control on routing decisions , Capacity and one of most important factor is $$$ . Stats  from Telephotography Global Enterprise Networks Research Service propose that one of the main factor influencing an organization’s international network choice may simply be availability.

Biggest challenge to Deploying Right Strategies

One of the biggest challenges are deploying the right strategies and expertise to build , maintain and run an MPLS network . Ethernet VPN Circuits are cost effective than MPLS IP VPN circuits for capacity requirements above 100 Mbps. There is always a need for quick proactive and reactive approach whenever there is a problem in the MPLS network .

It is a good time to know how MPLS works and the troubleshooting . Its all mechanics and not magic , so we need to be good at logic and understanding . Lets help you out over here.

Mpls Ways of Working

Multiprotocol Label Switching (MPLS) mechanism is used in communication networks which deploys short labels instead of longest prefix match for switching network traffic, thus reducing switching delays. MPLS can be considered as layer 2.5 protocol of the standard OSI network model i.e., it operates below the IP layer and on top of the link layer. MPLS enables the transfer IP data over the non IP MPLS networks. Routers at the edges of the MPLS core are called Label Edge Router (LER) and the routers inside the MPLS network are called Label Switch Router (LSR). LERs are, ingress/egress (ingress refers to entrance into Label Switch Path (LSP) and egress refers to exit from the LSP) routers, responsible for attaching the labels to the packets entering the MPLS network and remove the label from the exiting packets. LSRs are the routers which do the traffic forwarding on the basis of label instead of logical 32 bit address.

MPLS, FR , ATM , X.25 , LL with Ethernet MPLS Point, multipurpose circuits, MPLS IP VPN, Data Center Auditing, data center, data center power, data center software, Data Center, power calculation, cooling system, fewer generator, Green Data Center, datacenter, data center services, data center management, about data centers, internet data centers, datacenter services, datacenter solutions Business continuity

In the following example R1 is ingress, R3 and R4 are egress LERs and R2 is LSR. In MPLS every router will share with its neighbor the label which has to be attached for a particular IP prefix. Following are the tables of the four routers shown in the figure. Routers R3 and R4 tell R2 that it has to attach a label of 27 for the traffic destined to reach 10.1.1 network and 33 for the traffic destined to reach 10.3.3 network. The “Interface” entry of the label in the forwarding tables shows the interface on which router will transmit the data. Likewise R2 also tells R1 to either append the label of 8 for 10.1.1 network bound traffic or the label of 9 for 10.3.3 network bound traffic. We notice that there is additional entry of “Remote Label” in the forwarding table of R2. Out of the two remote labels (27 & 33) one will be appended to the outgoing traffic depending upon the destination. Like wise R2 also advertises to R1 the labels (“Remote Label” entry in forwarding table of R1) which it should append to outgoing traffic depending upon the destination.

On R2

Label

Prefix

Interface

Remote Label

8

10.1.1

1

27

9

10.3.3

0

33

On R1

Prefix

Interface

Remote Label

10.1.1

0

8

10.3.3

0

9

On R3

Label

Prefix

Interface

27

10.1.1

0

On R4

Label

Prefix

Interface

33

10.3.3

0

 

So next time you face some issues in the forwarding be sure to check labels running in your Network .

You can also keep up to date with current trends and technology by visiting Data Center Talk where we keep you informed on important changes as they occur.

 

Share on TwitterSubmit to StumbleUpon