1 Introduction1.1 What is OSPF?Open Shortest Path First (OSPF) is a classless link-state routing protocol developed in 1987 by the Internet Engineering Task Force (IETF) as a replacement to the distance vector routing protocol RIP. It uses a metric named cost, which is calculated using the bandwidth on all links of the determined path. It is built for scalability and it uses the concept of areas for this purpose. 1.2 Advantages
1.3 Disadvantages
2 Pieces of OSPF2.1 OSPF TablesOSPF makes use of three tables to do its work:
2.2 OSPF Packet TypesOSPF uses five types of Link-State Packets (LSPs):
2.3 The Link-State Update (LSU) PacketThe LSU packet, used for sending rounting information updates contains one or multiple Link-State Advertisements.
This information can be used when troubleshooting OSPF. Knowing what types of LSA's are expected to be on each router allows the administrator to gather valuable information by checking each router's database. 3 The Hello ProtocolThe Hello Protocol uses the first type of OSPF packet to do the following:
3.1 Neighbor EstablishmentEach router that is configured to run OSPF will send a Hello Packet on each OSPF-enabled interface periodically (10s on P2P, BMA networks and 20s on NBMA networks). This packet includes the router ID, area ID and list of neighbors. The Protocol has the following states:
Once they are in the Full state, the routers run Dijkstra's Shortest Path algorithm with themselves as root of the Shortest Path Tree (SPT) in order to find the best path. 3.2 DR/BDR ElectionOSPF elects a Designated Router (DR) and Backup Designated Router (BDR) on BMA and NBMA networks. In such a network, the routers share a segment and will establish Full relationships with all routers in that segment. The result is a full mesh of neighbor relationships and a very high amount of update packets, which in turn consume processor cycles and bandwidth. This problem is addressed by electing a DR and a BDR. Instead of being sent to all routers, updates on the segment will be sent only to the DR and BDR and the DR will decide whether the update causes any change. The DR will send it to the other neighbors only if necessary, thus eliminating a large amount of traffic. The role of the BDR is to gather information and be ready to replace the DR in case the DR fails. Each router establishes a Full relationship with the DR and BDR, but stops at a 2-Way relationship with all other routers in the segment. Updates destinated to the DR and BDR are sent on multicast address 224.0.0.6, while updates sent to other neighbors are sent on multicast address 224.0.0.5. The election process is based on two pieces of information:
4 ConfigurationThe configuration example is on a separate page: Basic OSPF Configuration |
Open Shortest Path First
page revision: 7, last edited: 15 Feb 2013 18:25