• No results found

Adjacency Formation

In document OSPF Deep Dive (Page 31-36)

This section examines the how OSPF neighbors form adjacencies.

 OSPF creates adjacency for the purpose of exchanging routing information

 Neighbors discover each other by periodically sending Hello packets out all of it's interfaces

o Hello protocol ensures that each router can send and receive packets from each other -- bidirectional communication

 OSPF will not allow packets to be forwarded over a unidirectional link o Ensures that neighboring routers agree in intervals for Hellos and declaring each

other unreachable

o Checks that there are no duplicate Router IDs

o Used to detect and negotiate certain types of extensions o Hellos work differently on different types of networks

 On broadcast networks routers periodicly mutlicast Hello Packets to AllSPFRouters

 Contains the routers view of the current Designated Router, Backup Designated Router and the list of routers whose Hello packets have been seen

 The Router Priority field is used for electing the DR and BDR

 Hellos are sent every 10 seconds by default on Junos

 On non-broadcast multiple-access networks (NBMA) it may be necessary to unicast hello's to all neighbors IP addresses

 No dynamic discovery of neighbors possible, must configure all neighbors manually

 The Router Priority field is used for electing the DR and BDR

 Junos sends hellos every 120 seconds by default until active neigbhors are discovered

 Routers will typically ignore or discard OSPF hellos that belong to a different area or the authentication does not match

 Point-to-Point networks do not elect a DR. Hellos are multicast to the router on the other side of the link

 Hellos are sent every 10 seconds by default on Junos

 Once two OSPF speakers have seen each other on a network they will attempt to synchronize their link state databases

o Routers form a master/slave relationship for the initial synchronization

 Master is the router with the higher Router ID

 Master controls the database synchronization process

o The "quickest" router to respond sends and empty DD packet with the first DD packet and sets the initial sequence number

 The receiving router examines the Router ID in the empty DD packet and compares it to it's own

 If the receiving router's Router ID is lower than the sending router's RID, it knows that it is the slave for the Database synchronization and responds with a DD packet listing all of it's LSAs

 If the receiving router Router ID is higher that the send router's RID, it knows it is the master asserts itself by sending back and empty DD with it's own initial sequence number

 Master manages the entire DD exchange

Finite State Machine for OSPF Adjacencies

OSPF Moves Through Several States before two neighbors become fully adjacent

DOWN

Router has not seen hellos from the neighbor since the last Dead interval.

ATTEMPT

Only on NBMA networks where neighbors have been manually configured. Indicates that the router is attempting to get a response from a neighbor.

INIT

Router has seen a hello packet from a neighbor but has not yet seen it's own Router ID in the neighbor list

2-WAY

Router has seen a hello packet from a neighbor (or DR/BDR for broadcast networks) that has it's own Router ID in the neighbor field of the hello. On broadcast networks, routers will remain in this state for adjacencies other than with the DR and BDR. A router knows it has bidirectional communication with a neighbor at this point.

EXSTART

Router is initializing initial sequence numbers for database exchange an maintenance. For broadcast networks without a DR or BDR, the election takes place at this state.

EXCHANGE

Router's exchange Database Descriptors (DBDs) that list each router's LSAs. Rotuers figure out which LSAs they are missing, or have an outdated copy.

LOADING

Routers are actively exchanging LSAs that were identified during the EXCHANGE phase.

FULL

Routers are fully adjacent

Designated Routers

o DR concept is a way to solve the n*(n-1)/2 adjacency problem on multi-access networks

 Every router needs n-1 adjacencies:

 Total number of adjacencies needed would be n*(n-1)/2.

Adjacencies are shown in green across the multiaccess network in yellow.

 Huge number of link state updates and acknowlegements sent over the network as every router keeps in sync with every other router on the subnet

 Lots of duplicate routing information

 Electing a router to act on behalf of the network cuts down on the number of adjacencies each router must maintain - The Designated Router

 Also eliminates duplicate routing information

 Also elect a backup Designated Router to provide for faster convergence should the Designated Router fail

 All routers on the network only need to form adjacencies with the two DRs on the network

 Cuts down on the total number of adjacencies

 Can really cut down on the numbers of LSAs that need to be generated

 Only the DR generates a LSA for the shared network segment

 R1 is elected the DR, and R2 is elected the BDR.

Adjacencies are shown in orange to the DR, and in blue to the BDR

 Caveot: This can be counterproductive on broadcast networks with small numbers of neighbors in numbers of adjacencies

 Every multi-access network has a designated router.

 DR originates all advertisements for the network (Type 2 LSA - Network LSA)

 Contains a list of all routers attached to the network

 Becomes adjacent to all other routers on the network

 Plays the central role in the database synchronization process with all routers on the network

 DR is elected by the Hello Protocol

 Configurable on a per interface basis

 8 bit field with 0 being the lowest priority, and 255 being the highst

 A DR with a priority of 0 is ineligible to become a DR

 Junos default is 128

 DR election is non-deterministic

 DR election commences if no DR or BDR exist on a network (DR and BDR fields are 0.0.0.0)

 Router with the highest Router Priority in the hello packet assumes the DR role

 Router with the second highest Router Priority assumes the BDR role

 In the case of equal priorities, the router with the higher Router ID wins for both DR and BDR elections

 No automatic DR premption

 A DR is a DR until it dies (drops of the network)

 DR maintains adjacencies to every other router on the multi-access network

 DR multicasts Link State Updates to the AllSPFRouters address rather than sending separate packets over every adjacency

 DR has more state to keep, so should be one of the more stable and powerful routers on the network

 BDR is elected to make the transition to a new DR smoother on the network

 BDR is also adjacent to all other routers on the network

 BDR doesn't do much until the DR dies, at which time it assumes it's new role as the DR for the networks

 Since the BDR already has adjacencies to all the other routers on the network, the transition time is reduced from having to have a whole new election to find another DR

 Once a BDR assumes the DR role, a new election is held to determine a new DR

In document OSPF Deep Dive (Page 31-36)

Related documents