OSPF (Part 3)

Day 28

Loopback Interfaces

A loopback interface is a virtual interface which is always in up/up state (unless manually shut down). It is not dependent on a physical interface and provides a consistent IP address on a router which is used to reach or identify the router.

OSPF Network Types

The OSPF network type refers to the connection type between OSPF neighbours. There are three of them:

  1. Broadcast: enabled by default on Ethernet and FDDI (Fiber Distributed Data Interfaces) interfaces.

  2. Point-to-Point: enabled by default on serial interfaces using the PPP (Point-to-Point Protocol) and HDLC (High-Level Data Link Control) interfaces.

  3. Non-broadcast: enabled by default on Frame Relay and X.25 interfaces

Broadcast

A DR (designated router) and BDR (backup designated router) must be elected on each subnet. Other routers become DROther.

The DR/BDR election order of priority:

  1. Highest OSPF interface priority

  2. Highest router ID

The first place becomes a DR, and the second - BDR. The default OSPF interface priority is 1 on all interfaces. To change it, enter the interface config mode and use the command ip ospf priority followed by the number. The range is from 0 (zero) to 255. If set to 0, the router can't become the DR/BDR for the subnet. Once DR/BDR are selected, they keep their role until OSPF is reset, the interface fails/is shut down, etc. The BDR becomes the DR if the current DR is removed even if it doesn't have the highest priority. DROthers don't form a full adjacency with other DROthers, they remain in a 2-way state. In broadcast network type, routers only form a full adjacency with the DR and BDR of the segment. So, DROthers don't exchange LSAs with each other. Messages to the DR/BDR are multicast 224.0.0.6.

Point-to-Point

A DR and BDR are not elected. The two routers form a full adjacency with each other. One side of a serial connection functions as DCE (Data Communications Equipment) and the other - DTE (Data Terminal Equipment). To identify which side is DCE/DTE, the command show controllers followed by the interface number is used. The DCE side needs to specify the clock rate (speed) of the connection. It is configured from the interface config mode using the command clock rate followed by the value in bps. The default Layer 2 encapsulation on a serial interface is HDLC. It can be changed to PPP from the interface config mode using the command encapsulation ppp. The encapsulation protocol must match on both ends.

To manually configure the network type on an interface, use the command ip ospf network followed by the network type.

OSPF Neighbor Requirements

  • Area numbers must match

  • Interfaces must be in the same subnet

  • OSPF processes must not be shut down

  • OSPF router IDs must be unique

  • Hello and Dead timers must match

  • Authentication settings must match

  • IP MTU settings must match

  • OSPF network type must match

OSPF LSA Types

There are 11 types of LSA but only 3 are mainly used:

  1. Type 1 (Router LSA):

    • generated by every OSPF router

    • identifies the router using the router ID

    • lists networks attached to the router's OSPF-activated interfaces

  2. Type 2 (Network LSA):

    • generated by the DR of each multi-access network

    • lists the routers which are connected to the multi-access network

  3. Type 5 (AS-External LSA):

    • generated by ASBRs to describe routes to destinations outside of the AS

Last updated