The protocol number for OSPF is 89, and when OSPF packet multicasting occurs, their TTL is set to 1,
1. Packet header
All OSPF packets are started by a 24-byte eight-bit group header
650) this.width=650; "Style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat Center;border : 1px solid #ddd; "src="/e/u261/themes/default/images/spacer.gif "alt=" Spacer.gif "/>
650) this.width=650; "Style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat Center;border : 1px solid #ddd; "src="/e/u261/themes/default/images/spacer.gif "alt=" Spacer.gif "/>
Versions version
The version number of OSPF, and the version number of OSPF is 2.
Types type
Packet type following the head
650) this.width=650; "Style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat Center;border : 1px solid #ddd; "src="/e/u261/themes/default/images/spacer.gif "alt=" Spacer.gif "/>
Packet Lengths Packet length
The length of the OSPF packet, including the length of the packet header, in eight-bit group bytes
Router ID Router ID
The ID of the originating router
Area ID
The region of the router where the originating packet originated
Checksum checksum
Standard IP checksum for the entire packet (including the header)
Authentication Type (Autype)
The authentication mode being used
650) this.width=650; "Style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat Center;border : 1px solid #ddd; "src="/e/u261/themes/default/images/spacer.gif "alt=" Spacer.gif "/>
Certified Authentication
Autype = 0 Do not check this field, can contain any content
Autype = 1 contains a maximum of 64-bit password
Autype = 2 contains a key ID, certified data length, no reduced encryption sequence number
Key ID Key ID
Represents the authentication algorithm and the security key used to create the message digest
Encrypt serial number
Numbers that do not decrease to prevent replay attacks
2.Hello Data Packet
To form an adjacency, the parameters that the Hello packet carries must be consistent with its neighbors
650) this.width=650; "Style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat Center;border : 1px solid #ddd; "src="/e/u261/themes/default/images/spacer.gif "alt=" Spacer.gif "/>
netmask netmask Network Mask
The network mask that sends the packet interface, if the mask and the network mask that receives the packet interface do not match, the packet is discarded.
Hello time interval Hello Interval
The time interval between the delivery of Hello packets on an interface, which is a periodic period of time, measured in seconds
Optional option
To ensure compatibility issues between neighbors
Router Precedence Router Priority
Used for the election of Dr and BDR, with a priority of 0, not participating in the election
Router Invalid time interval Router Dead Interval
The length of the Hello packet that the originating router will wait to emit from the neighbor router before declaring that the route is invalid
Specify the Router Dr
If there is no Dr (not selected or the network type does not require DR), this field is set to 0.0.0.0
Back up the specified router BDR
If there is no DBR, this field is set to 0.0.0.0
Neighbor Neighbor
If the originating router has received a Hello packet from some of its routers in the last router Deadinterval time from the network, then the ID of all the neighbors will be listed in this field.
3. Database Description Packet
A primary purpose of a database description packet is to describe some or all of the LSA information in the originating router database, so that the receiving router can determine if the LSA is receiving a matching LSA in its database, which can be done only by listing the LSA's head.
650) this.width=650; "Style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat Center;border : 1px solid #ddd; "src="/e/u261/themes/default/images/spacer.gif "alt=" Spacer.gif "/>
Interface MTU Interface MTU
The size of the maximum IP packet that the originating router interface can send in case the packet is not fragmented, measured in eight-bit group bytes.
Optional option
Included in the database description packet, so that the router can choose not to forward some LSA to the neighbor router that does not have the necessary support capabilities
Message the first 5 bits of the next eight-bit group byte are not used and are set to 00000b
*i bit, initial bit initial bit
When sending a series of databases describing the first packet in a packet, the bit is set to 1, and subsequent database description packets will set the bit to 0,i-bit to 0
*m bit, post-succession more bit
This bit is set to 1 when the packet sent is not the last packet in a series of database description packets
*ms bit, master-slave bit master/slave bit
During database synchronization, this bit is set to 1, the router that indicates that the database describes the packet is a primary router, and the router is set to 0,ms-bit = 0
* Database Description serial numbers DD sequence number
During database synchronization, to ensure that the router receives a complete sequence of database description packets
*lsa Head LSA Header
4. Link State Request Packet
650) this.width=650; "Style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat Center;border : 1px solid #ddd; "src="/e/u261/themes/default/images/spacer.gif "alt=" Spacer.gif "/>
Link status Type link state type
Link state type number, which is used to denote the type of an LSA
Link status ID link state ID
Advertise Router Advertising Router
Router ID of the router advertised by the originating LSA
5. Link-State Update packets
650) this.width=650; "Style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat Center;border : 1px solid #ddd; "src="/e/u261/themes/default/images/spacer.gif "alt=" Spacer.gif "/>
OSPF packets are not allowed to leave the network from which they originated, a link-state packet can carry one or more LSA, but these LSA are only routed to the direct-attached neighbor of the router originating them, and the neighbor router receiving the LSA will be responsible for re-encapsulating the associated LSA in the new LS update packet. Thus further flooding spread to its own neighbour
LSA Quantity Number of LSA
The number of LSA contained in this packet
Link State advertisement LSA
6. Link Status Acknowledgement packet
For the LSA to reliably flood the spread
650) this.width=650; "Style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat Center;border : 1px solid #ddd; "src="/e/u261/themes/default/images/spacer.gif "alt=" Spacer.gif "/>
This article is from the "River Lakes Night Rain ten Years Light" blog, please make sure to keep this source http://2548426.blog.51cto.com/2538426/1771414
8.1.7 OSPF packet format