Pages

Friday, December 28, 2012

OSPF - LSAs!!














The OSPF version we use today is version 2. The packet type identifies the actual OSPF message type that is carried in the packet data area at the bottom. The OSPF packet length describes the number of bytes  of the OSPF packet including the OSPF header. Router and Area IDs identify the originator of this packet. If a packet is sent over the virtual link , the Area ID will be 0.0.0.0, because virtual links are considered part of the backbone area. The checksum is calculates over the entire packet including the header.
Three authentication types had been defined.
0 = No authentication
1 = Simple clear text password authentication
2 = MD5 checksum
If the authentication Type =1 , then a 64 bit clear text password is carried in the authentication fields. If the Authentication Type =2 , then the authentication fileds contain a key –ID , the length of the message digest, and a nondecresing cryptographic sequence number to prevent replay attacks . The actual message digest would be appended at the end of the packet.
The efficiency of routing updates also depends on the maximum transfer unit (MTU) defined . Cisco defined a MTU of 1500 bytes for OSPF.



The network mask must match the mask on the receiving interface , ensuring that they share a segment and network.
The Options filed is also used by other message types. If the Router Priority is set to zero this router cannot become DR or BDR.
Note that the fields “DR” and “BDR” only contain the interface IP address of the DR or BDR on that network, not the router ID!!
If these numbers are unknown or not necessary (other network type) then these fields are set to 0.0.0.0

It is important to know that neighbors must have configured identical hello and dead intervals



The DD sequence number is set by the master to some unique value in the first DD packet. This number will be incremented in subsequent packets.



Note that the Link State Request Packet uniquely identifies the LSA by Type , ID, and advertising router fields of its header. It does not include the sequence number , checksum, and age, because the requester is not  interested in a specific instance of the LSA but in the most recent instance .





All LSAs have the LSA header at the beginning. The LSA header is also used in DBD and LSAck packets.
The Age is incremented by InfTansDelay  seconds at each router interface this LSA exists. The Age is also incremented in seconds as it resides in a link state database.
The Options field describes optional capabilities supported at that topological portion described by this LSA.
The LSA Type describes which information is carried in the LSA body. Here the structural differences between Router LSAs, Network LSAs, etc are identified.
The Link State ID is used differently by the LSA types. Basically this field contains some information identifying the topological portion described by this LSA. For example a Router ID or an interface address is used here. The following slides will explain this field for each LSA type.
The Router ID identifies the originating router of this LSA .
The Sequence Number helps routers to identify the most recent instance of this LSA.

The Checksum is so called 8 bit Fletcher checksum , providing more protection than traditional checksum methods such as TCP. The first eight bits contain the 1’s complement sum of all octects, while the second eight bits contain a high-order sum of running sums.


Router LSAs are generated by all OSPF routers and must describe all links of the originating router!
The V-bit (virtual link endpoint) is set to one if the originating router is a virtual link endpoint and this area is a transit area. The E-bit (External) is set if the originating router is an ASBR . The B-bit (Border ) is set if the originating router is an ASBR.
The Link ID and Link Data depend on the Link Type field which describes the general type of connection the link provides.
Link Type 1 is a point –to-point link , the link ID describes the Neighbor Router ID and the Link data field contains the IP address of the originating router’s interface to the network.
Link Type 2 is a link to a transit network , the Link ID describes the interface address of the DR and the Link data field contains the IP address of the originating router’s interface to the network.
Link Type 3 is a  link to stub network, the Link ID describes the IP network number or subnet address and the Link data field contains the network’s IP address or subnet mask.
Link Type 4 is a virtual link , the Link ID describes the neighboring  router’s Router ID and the Link Data contains the MIB-II ifIndex value for the originating router’s interface.
Number of TOS specifies the number of TOS metrics listed for this link. For each TOS an additional line is appended to this link state section.  Generally , TOS is not used today anymore and the Number of TOS field is set to all zero.
Metric is the cost of the interface that established this link.



Network LSAs are originated by DRs and describe the multi-access network and all routers attached to it , including the DR.



Network Summary LSA is originated by an ABR and advertises networks external to an area.



A ASBR summary LSA is originated by an AR and advertises ASBRs external to an area.




http://packetlife.net/blog/2008/jun/24/ospf-area-types/
 http://cisco.iphelp.ru/faq/5/ch08lev1sec2.html

2 comments:

  1. Hi fellas,
    Thank you so much for this wonderful article really!
    If someone want to read more about that LSAS I think this is the right place for you!

    ReplyDelete