cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1781
Views
0
Helpful
5
Replies

OSPF Neighbor Adjacency

skazeem96
Level 1
Level 1

I have a question In OSPF Neighbor Adjacency. Can anybody help me to understand.

Below is my scenario with 2 Routers and each router configured with 3 loopback interface and two Fast Ethernet interfaces are up.
(Router A – loopback networks: 10.1.1.1/8, 11.1.1.1/8, 12.1.1.1/8 and Fast Ethernet 0/1 99.99.99.1/24 and Fast Ethernet 0/0 100.100.100.1/24).

(100.100.100.1)                 (100.100.100.2)
Router A                                Router B

-----------Down state--------------------
----------init state-------------------------
----------two-way state------------------
----------Exstart state----------------------

After master Slave negotiation, Router A considered as Slave and send below  DBD packet with a summary of the LSDB which contain LSA-type 1 (Router-LSA)

Wireshark capture:

Ethernet II, Src: c4:01:0a:84:00:00 (c4:01:0a:84:00:00), Dst: c4:02:03:f4:00:00 (c4:02:03:f4:00:00)
Internet Protocol Version 4, Src: 100.100.100.1, Dst: 100.100.100.2
Open Shortest Path First
OSPF Header
OSPF DB Description
Interface MTU: 1500
Options: 0x52 (O, (L) LLS Data block, (E) External Routing)
DB Description: 0x02 ((M) More)
…. 0… = (R) OOBResync: Not set
…. .0.. = (I) Init: Not set
…. ..1. = (M) More: Set
…. …0 = (MS) Master: No
DD Sequence: 242
LSA-type 1 (Router-LSA), len 72
.000 0000 0011 0101 = LS Age (seconds): 53
0… …. …. …. = Do Not Age Flag: 0
Options: 0x22 ((DC) Demand Circuits, (E) External Routing)
LS Type: Router-LSA (1)
Link State ID: 12.1.1.1
Advertising Router: 12.1.1.1
Sequence Number: 0x80000001
Checksum: 0x2157
Length: 72
OSPF LLS Data Block

My question:

1) When Router B receives this DBD packet from Router A, how Router B understand that Router A connected networks ( 10.1.1.1/8, 11.1.1.1/8, 12.1.1.1/8,99.99.99.1/24,100.100.100.1/24) ? this network information is not shown in the LSA-type 1 (Router-LSA).Now How Router B will find out that what networks they don’t know about and what networks they know about?

2)Router A is sending Sequence Number: 0x80000001 and now what Sequence Number Router B will have to compare with Sequence Number received from Router A ?

5 Replies 5

Rolf Fischer
Level 9
Level 9

Hello,

1) When Router B receives this DBD packet from Router A, how Router B understand that Router A connected networks ( 10.1.1.1/8, 11.1.1.1/8, 12.1.1.1/8,99.99.99.1/24,100.100.100.1/24) ? this network information is not shown in the LSA-type 1 (Router-LSA).Now How Router B will find out that what networks they don’t know about and what networks they know about?

---------------------------------------------------------------------------------------------

DB Description: 0x02 ((M) More)
…. 0… = (R) OOBResync: Not set
…. .0.. = (I) Init: Not set
…. ..1. = (M) More: Set
…. …0 = (MS) Master: No

At this very point, Router B cannot yet; the synchronization process has just started and you'll need to have a look at the subsequent packets as well. I've attached a capture of a database-sync on a broadcast segment. You can find the content ("links") of the Router-LSAs in the Linkstate-Update packets - DBDs are just descriptions, as the name implies.

A few quotes from RFC 2328, you can find all the details there:

(10.8.) The sending of Database Description packets depends on the neighbor's state.
In state ExStart the router sends empty Database Description packets,
with the initialize (I), more (M) and master (MS) bits set.

(7.2.) Each Database Description contains an indication that there are more packets to follow
--- the M-bit.
The Database Exchange Process is over when a router has received
and sent Database Description Packets with the M-bit off.

2)Router A is sending Sequence Number: 0x80000001 and now what Sequence Number Router B will have to compare with Sequence Number received from Router A ?

At this point Router B has nothing to compare with, see 12.1.6 in RFC 2328. In a redundant scenario, it could have received another copy of this LSA from another neighbor. It would compare the sequence numbers of both (identical) LSAs then.

HTH
Rolf

Thanks for the quick response to my question.

I need some more clarification to my question no 1.  have attached packet capture.

Packet number 2:

Router -A  sending DBD with master bit set. (MS=1)

Packet number 3:

Router -B  sending DBD with master bit set.(MS=1)

Packet number 4:

Router -A  negotiated and considered it is slave(MS=0) and sending LSA type 1  ( summary info)

Packet number 6:

Router -B  Also sending LSA type 1  ( summary info).

Packet number 7:

Router -A  sending M=0 . this is the last packet.

Packet number 8:

Router -B  sending M=0 . this is the last packet.

Packet number 9:

Router -A  sending LSR (Link State Request). 

To send a Link State Request, Router-A must know how many networks Router-B is connected and among them how many networks I (Router-A) have known.

Whichever networks Router-A don't know, that networks only Router-A will request in LSR.

My question is by seeing which packet, Router-A, and Router-B will know about their connected networks.

for Example: router -A connected networks:( 10.1.1.1/8, 11.1.1.1/8, 12.1.1.1/8,99.99.99.1/24,100.100.100.1/24)

To send a Link State Request, Router-A must know how many networks Router-B is connected and among them how many networks I (Router-A) have known.

Not really. Router-A has learned about Router-B's Router-LSA by examining the DBDs received from Router-B (Packet #6). This DBDs contained the OSPF header of Router-B's Router-LSA. The fields "LS-Type", "LS-ID" and "Advertising Router" are sufficient to uniquely identify a LSA. Router-A now sends a LS Request for this LSA (Packet #9) which contains those 3 fields. At this point it is not important how many links a LSA describes. This information (the actual content of the LSA) comes subsequently with the LS Update (Packet #12).

This procedure may seem complicated but it is more efficient than always sending the entire database regardless of wheather the neighbors need it or not.

Thanks for clarifying me. I understand now. I will be in touch if i get any questions regarding OSPF, BGP and any other protocols.

OSPF Has Seven States

  • Down: It is the initial state for the neighbour. It is seen when a working adjacency to a neighbor is down.
  • Init: A neighbor is placed into the init state if a valid hello packet has been received from it but the list of seen routers in this hello packet does not contain the receiving Router's RID.
  • 2-Way: A neighbor is placed into the 2-Way state if a valid Hello Packet has been received from it and the list of seen routers in this hello packet includes the receiving router's RID.
  • Ex-Start: A neighbor is moved into the ExStart state if the bidirectional visibility has been confirmed and it is decided that this router shall become fully adjacent to it.
  • Exchange: A neighbor is moved to Exchange State after the Master/Slave Relationship has been established.
  • Loading: A neighbor is moved to Loading State after it has advertised the complete list of LSAs and this router needs to download some of the LSAs from the neighbor.
  • Full: A neighbor is moved to the Full State when all required LSAs have been downloaded from the neighbor.  
Review Cisco Networking products for a $25 gift card