1.4.a Adjacencies

OSPF discovers and maintains neighbor relationships by using Hello packets.  These are sent at regular intervals on interfaces participating in the OSPF routing process. Hello packets are sent to the multicast address 224.0.0.5 (IPv6 FF02::5). 

The two timers used are:

  • Hello interval: this defines how often we send the hello packet.
  • Dead interval:  this defines how long we should wait for hello packets before we declare the neighbor dead.

The hello and dead interval values can be different depending on the OSPF network type. On Ethernet interfaces you will see a 10 second hello interval and a 40 second dead interval.

Hello packets contain the following information: 

Router ID A unique 32-bit ID (Not an address) within an OSPF domain. 
Authentication Options A field that allows secure communications between OSPF routers to prevent malicious activity.  Options can be ‘none’, ‘clear text’, or ‘MD5’. 
Area ID The OSPF area that the OSPF interface belongs to. A 32-bit number that can be written in dotted-decimal format or decimal. 
Interface Address Mask The network mask for the primary IP address for the interface out of which, the hello was sent. 
Interface Priority The router interface priority for DR elections 
Hello Interval The time in seconds at which hello packets are sent out of the interface. 
Dead Interval The time in seconds that a router waits to hear a hello from a neighboring router before declaring that router as down.  (Usually 4 x the hello interval). 
DR and BDR Designated router and backup designated router.  The IP address of each for that network link. 
Active Neighbor A list of OSPF neighbors seen on the network segment.  A router must have received a hello form the neighbor within the dead interval. 

Each OSPF process maintains a table for adjacent OSPF neighbors and the state of each router. 
The 8 States are described in this table: 

Down The initial state of any router running OSPF.  The router has not yet received any OSPF hello packets 
Attempt This state is only relevant to NBMA networks that do not support broadcast, therefore requiring neighbor relationships to be explicitly configured. This state means that the router has not received any information recently, but the router is still attempting communication. 
Init This state indicates that a hello packet has been received from another router, but bidirectional communication has not yet been established. 
2-Way Bi-directional communication has been established.  If a DR or BDR is needed, the election will occur during this state. 
ExStart The first state where an adjacency is formed.  ExStart identifies which router will be the master or slave for the LSDB synch. 
Exchange Routers exchange link-states using DBD packets. 
Loading LSR packets are sent to the neighbor asking for recent LSAs that have been discovered, but not exchanged while in Exchange state. 
Full Neighbors are fully adjacent and LSDBs are synched. 

Hello packet (Multicast to find the neighbor)

Once the neighbor is found Unicast is used to synchronize the topology

Attention: If you have any transport issue (unicast or multicast) the neighbourship will not form

Configuration

IPv4

router ospf 1
 network 150.1.0.0 0.0.255.255 area 0
 network 155.1.0.0 0.0.255.255 area 0

IPv6

ipv6 router ospf 10
 router-id x.x.x.x <-- Can use IPv4 Address as ID
!
interface GigabitEthernet0/1
 ipv6 enable
 ipv6 address 2001:155:1:108::8/64
 ipv6 ospf 10 area 0

Verification

IPv4

R8#sh ip ospf neighbor 
Neighbor ID     Pri   State           Dead Time   Address         Interface
150.1.10.10       1   FULL/DR         00:00:33    155.1.108.10    GigabitEthernet0/1

IPv6

R10#sh ipv6 ospf neighbor  
            OSPFv3 Router with ID (150.1.10.10) (Process ID 10)
Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
150.1.8.8         1   FULL/BDR        00:00:34    3               GigabitEthernet0/0

R8#sh ipv6 route
...
LC  2001:150:8:8::8/128 [0/0]
     via Loopback0, receive
O   2001:150:10:10::10/128 [110/1]
     via FE80::EAD:1BFF:FE33:0, GigabitEthernet0/1
...

OSPF Database

R8#sh ip ospf database 
            OSPF Router with ID (150.1.8.8) (Process ID 1)
		Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
150.1.8.8       150.1.8.8       61          0x80000005 0x001154 4
150.1.10.10     150.1.10.10     56          0x80000004 0x00F14C 3

		Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
155.1.108.10    150.1.10.10     70          0x80000001 0x000C1C

DR/BDR Roles 

On multi-access networks such as Ethernet or Frame-Relay, adjacencies occur between more than just two routers.  Due to the way LSA flooding works, OSPF has the potential to become very unwieldy, very quickly.  OSPF however, overcomes this potential short coming, by creating a pseudonode or Virtual router to manage the adjacency state with all other routers on that broadcast network segment.  This pseudonode, known as the DR (Designated Router), reduces the number of adjacencies by being the only router that any other router on that segment wants to talk to. 

The DR is responsible for flooding updates to all the other OSPF routers on that particular segment as updates occur.  If the DR were to fail, this would obviously trigger a major topology change event causing recalculations of routes and possible temporary loss of routes on the network.  Luckily though, there is a BDR (Backup Designated Router) that takes over the role of DR, then an election will take place to elect a new BDR. 

To send routing information to a DR or BDR the multicast address of 224.0.0.6 is used. DR sends routing updates to the multicast address of 224.0.0.5. If DR fails, BDR takes over its role of redistributing routing information.

Every router on a network segment will establish a full neighbor relationship with the DR and BDR. Non-DR and non-BDR routers will establish a two way neighbor relationship between themselves.

DR / BDR Election

DR / BDR chosen through election process

  • Election based on interface priority and Router-ID
    • Priority
      • 0 – 255
      • Higher better
      • 0 = never
    • Router-ID
      • Highest loopback / interface IP
      • Can be statically set
      • Higher better
  • Uses WAIT timer to stop pre-emption of current DR/BDR

Designated Router (DR)

  • Forms adjacency with all routers on the link
  • Listens for LSUs (224.0.0.6)
  • Re-floods LSUs back to the segment (224.0.0.5)
  • Does not modify next-hop value

Backup Designated Router (BDR)

  • Used for redundancy of DR
  • Does not re-flood LSUs

DROthers

  • All other routers on link
  • I.e. not the DR or BDR
  • Form FULL adjacency with DR & BDR
  • Stop at 2-Way adjacency with each other

Comments

So empty here ... leave a comment!

Leave a Reply

Sidebar