cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2190
Views
5
Helpful
1
Replies

What is the purpose of Master & Slave in EXSTART state of OSPF adjacency?

Ravi Pande
Level 1
Level 1

I read they need master slave for initial sequence number. So is there any other reason behind Master slave or that is the only reason?

1 Accepted Solution

Accepted Solutions

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello,

as per RFC2328 that defines OSPFv2 for IPv4 during the exstart state in the OSPF per neighbor state machine (finite state machine) a Master is elected and the other device is a Slave.

This is just to decide the initial sequence number. The highest router-id wins the master/slave so in normal conditions is the current DR the Master.

OSPFv2 is a routing protocol for IPv4 but its own encapsulation is IP protocol 89.

Once elected the master sends LSA headers grouped in packets to the Slave

The Slave can acknowlege correct reception of previous LSA headers.

So the goal is to to synchronize the databases between the DR and the possibly new router.

Emulating what TCP does we could say:

>>OSPF uses a window with size one packet the packet is sent at MTU with DF bit set and TTL=1

the slave can Ack each LSA update sent by the master by sending the seq-number of last successfully received LSA update.

But also the slave can have something new to tell to the DR.

Both routers end the loading phase with a selected list of LSA headers that is a subset of received LSAs and use LSA request to ask for the whole content of each new or more update LSAs it learned in the exstart state.

When database are synchronized because each router has received the missing info the two databases of R1 and R2 are in full state and R1 and R2 are considerered to be fully adjacent.

 

In LAN with multiple routers to save on all this activity a Designated and a Backup Designated routers are elected and listern to 224.0.0..6 All OSPF DR in local subnet.

All other devices listen to 224.0.0.5 All  OSPF routers in local subnets.

 To be noted DRs and BDRs listen to 224.0.0.5 too.

In modern networks we use Ethernet variants for example an LACP bundle of 4 x 10 GE member links

 

To be noted in old networks with 50 devices in the same LAN 20 years ago the DR was the device with the highest uptime that could be a Sun Solaris or HP workstation with OSPF daemon active.

the command

ip ospf priority  in interface mode

can be used to avoid to have router to be elected DR in many LAN segments.

All this happens within a single OSPF area.

 

OSPF is link state within a single area.

 

Communication between areas require the use of the backbone area 0.0.0.0 or simply 0 all devices acting as bridges between area 0 and other areas are called ABR = Area Border Router.

 

All user traffic and all routing information from area X to area Y have to go via the respective ABRs routers

so we can say

 

R4 ------ R2 -------- area 0.0.0.0.0 R1 ---------------- R3 ---R5

 area1                              area 0.0.0.0                                       area 99

 

so R4 is internal to Area 1

R2 is ABR (0,1)

R1 is a backbone router internal to area 0

R3 is ABR (0,99)

R5 is internal to area 99.

 

ABRs mantain a different LS DB for each area they have a leg into.

 

In my humble opinion the usage of areas is highly recommended regardless of the number of routes.

 

The reasons are the following:

- control of internal routes  OSPF iintra area OSPF inter - area can only happen at area border

- external routes should be minimized as they cannot have fine control as they propagate everywhere.

_ NSSA area types are to be preferred over stubby areas

- BUT NSSA require the ABR(s) to be configured to inject a default route into the NSSA area, stubby areas ABR nodes should inject a default route into the    stubby area to cover the fact that all external routes LSA type 5 are blocked 

 

it is better to use passsive-interface + other commands instead of redistrubuted connected as the second method produces external LSA type 5 routes

 

Hope to help

Giuseppe Larosa

                                                             

 

 

 

View solution in original post

1 Reply 1

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello,

as per RFC2328 that defines OSPFv2 for IPv4 during the exstart state in the OSPF per neighbor state machine (finite state machine) a Master is elected and the other device is a Slave.

This is just to decide the initial sequence number. The highest router-id wins the master/slave so in normal conditions is the current DR the Master.

OSPFv2 is a routing protocol for IPv4 but its own encapsulation is IP protocol 89.

Once elected the master sends LSA headers grouped in packets to the Slave

The Slave can acknowlege correct reception of previous LSA headers.

So the goal is to to synchronize the databases between the DR and the possibly new router.

Emulating what TCP does we could say:

>>OSPF uses a window with size one packet the packet is sent at MTU with DF bit set and TTL=1

the slave can Ack each LSA update sent by the master by sending the seq-number of last successfully received LSA update.

But also the slave can have something new to tell to the DR.

Both routers end the loading phase with a selected list of LSA headers that is a subset of received LSAs and use LSA request to ask for the whole content of each new or more update LSAs it learned in the exstart state.

When database are synchronized because each router has received the missing info the two databases of R1 and R2 are in full state and R1 and R2 are considerered to be fully adjacent.

 

In LAN with multiple routers to save on all this activity a Designated and a Backup Designated routers are elected and listern to 224.0.0..6 All OSPF DR in local subnet.

All other devices listen to 224.0.0.5 All  OSPF routers in local subnets.

 To be noted DRs and BDRs listen to 224.0.0.5 too.

In modern networks we use Ethernet variants for example an LACP bundle of 4 x 10 GE member links

 

To be noted in old networks with 50 devices in the same LAN 20 years ago the DR was the device with the highest uptime that could be a Sun Solaris or HP workstation with OSPF daemon active.

the command

ip ospf priority  in interface mode

can be used to avoid to have router to be elected DR in many LAN segments.

All this happens within a single OSPF area.

 

OSPF is link state within a single area.

 

Communication between areas require the use of the backbone area 0.0.0.0 or simply 0 all devices acting as bridges between area 0 and other areas are called ABR = Area Border Router.

 

All user traffic and all routing information from area X to area Y have to go via the respective ABRs routers

so we can say

 

R4 ------ R2 -------- area 0.0.0.0.0 R1 ---------------- R3 ---R5

 area1                              area 0.0.0.0                                       area 99

 

so R4 is internal to Area 1

R2 is ABR (0,1)

R1 is a backbone router internal to area 0

R3 is ABR (0,99)

R5 is internal to area 99.

 

ABRs mantain a different LS DB for each area they have a leg into.

 

In my humble opinion the usage of areas is highly recommended regardless of the number of routes.

 

The reasons are the following:

- control of internal routes  OSPF iintra area OSPF inter - area can only happen at area border

- external routes should be minimized as they cannot have fine control as they propagate everywhere.

_ NSSA area types are to be preferred over stubby areas

- BUT NSSA require the ABR(s) to be configured to inject a default route into the NSSA area, stubby areas ABR nodes should inject a default route into the    stubby area to cover the fact that all external routes LSA type 5 are blocked 

 

it is better to use passsive-interface + other commands instead of redistrubuted connected as the second method produces external LSA type 5 routes

 

Hope to help

Giuseppe Larosa

                                                             

 

 

 

Review Cisco Networking for a $25 gift card