OSPF Packet Details

OSPF Packet Details
OSPF 的五種包類型:
Type
Description
Functionality
1
Hello
To discover neighbors and form DR/BDR relationship and exchange neighbor capabilities.
 
2
Database description
To elect master/slave for the database exchange process and to exchange the LSA headers and select the first sequence number for database exchange.
3
Link-state request
To request a specific LSA that is seen during the DBD exchange process.
4
Link-state update
To send the entire LSA to the neighbor who requested the particular LSA through the link request packet. This packet is also used in flooding.
5
Link-state acknowledge
To acknowledge the receipt of the link-state update packet.
 
 
Router ID— This field contains the 4-byte IP address. The router ID is used to uni-quely identifythe router throughout the autonomous system. For a Cisco box, this field contains the highest IP address on the box. If loopbacks are configured, the highest loopback becomes the router ID.
   After the router ID is chosen, it will not change unless the router is restarted, the inter-face that        is selected as a router ID is shut down, or the IP address has been removed or replaced on that  interface.
在這一項中包含了四個字節的ip 地址。路由ID在一自治系統中作爲路由器的唯一標識
對於思科來說,這一項是它的最高ip地址。如果環回口被配置了,那麼將使用最高環回口的ip地址作爲路由ID。
在路由ID形成後,它將不改變除非一下情況:路由器被重啓,被選作爲路由ID的端口down掉了,或者是它的ip地址改變了!
AuType— This field contains the type code for the authentication:
    - 0 means that there is a null authentication.
    - 1 means that the authentication type is plain text.
    - 2 means that the authentication type is MD5.
認證類型——這一項包含認證類型代碼:
-0 代表不是用認證
-1 代表使用簡單文本認證
-2 代表使用MD5認證
Hello Packets
Hello packets are the first type of packets in OSPF. Figure 8-2 illustrates the Hello packet format. Hello packets are used to form a neighbor relationship between two routers. In environments that include broadcast/nonbroadcast media, Hello packets are used to elect the designated (DR) and backup designated (BDR) routers. On broadcast media, the destination address of the Hello packets is 224.0.0.5. On nonbroadcast media, the destination address is unicast.
 
 
Hello包是ospf的第一類型的包。Hello包被用來在兩個路由器間形成鄰居關係。在廣播和非廣播媒介環境中,hello包被用來選舉DR和BDR。在廣播媒介中,hello包使用目標地址224.0..0.5。在非廣播媒介中,使用單播地址。
Hello Interval— Represents the number of seconds between two Hello packets. This interval must be the same for the two routers that are trying to form an adjacency. The Hello interval is 10 seconds on broadcast and point-to-point media, and 30 seconds on all other media.
Hello 間隔——代表了兩個hello包之間的時間間隔。這個間隔在兩天準備建立鄰接關係的路由器上必須相同。在點到點媒介中hello間隔爲10秒,在其它媒介中hello間隔爲30秒。
Rtr Pri— Used for a router's priority. By default, this value is set to 1. This field plays an important role in electing the DR and the BDR. A higher priority increases the chances that the router will become the DR. A priority of 0 means that this router will not take part in DR election.
路由器優先級——作爲路由器的優先級,默認情況下,設置爲1。這一項在在選舉DR和BDR是扮演了重要的角色。高優先級提高了路由器作爲DR的可能性。優先級爲0意味這此路由器不參加DR的選舉。
Router Dead Interval— Represents the number, in seconds, before a neighbor is declared dead. By default, the dead interval is four times the Hello interval.
路由器死亡間隔——代表了宣告鄰居路由器被宣告死亡前等待的時間。默認情況下,死亡間隔是hello間隔的四倍。
Designated Router— Lists the IP address of the designated router. If there is no DR, this field has a value of 0.0.0.0. The DR is elected through the Hello protocol. The router with the highest priority becomes the DR. If the priorities are equal, the router with the highest router ID becomes the DR. The purpose of the DR is to reduce the amount of flooding on multiaccess media. The DR uses multicasting to reduce the amount of flooding. All routers flood their link-state database to the DR, and the DR then floods that information back to other routers on that segment. No DRs/BDRs exist on point-to-point or point-to-multipoint segments.
指定路由器——登記了指定路由器的ip地址。如果沒有DR,則這一項的值爲0.0.0.0.DR的選舉通過hello協議完成。優先級高的成爲DR。如果優先級相等,則有更高路器ID的成爲DR。DR用來減少多訪問媒介的流量。DR使用多播來減少流量。所有的路由器發送他們的鏈路狀態數據庫給DR,讓後DR再將信息發送給其它的路由器。沒有DRs/BDRs存在點到點和點到多點中。
Backup Designated Router— Identifies the BDR and lists the interface IP address of the BDR. If no BDR exists, this field has a value of 0.0.0.0. The BDR is also elected through the Hello protocol. The purpose of the BDR is to serve as the backup of the DR, for a smoother transition in case the DR dies. BDR remains passive during flooding.
備用指定路由——識別BDR和登記BDR的ip地址。如果美譽BDR存在,則這項填0.0.0.0。BDR也是通過hello協議選舉出來。BDR是用來作爲DR的備用的,當DR死亡是作一個平穩的過度。正常時候BDR保持消極狀態。
Database Description Packets
The second type of OSPF packet, the database description (DBD) packet, is used mostly during the database exchange. The first DBD packet is used to elect the master and slave relationship and to set the initial sequence number elected by the master. The router with the highest router ID becomes the master and initiates the database synchronization. The master sends the sequence number, and the slave acknowledges it. After the master and the slave are elected, the database synchronization starts; in this process, the headers of all the LSAs are exchanged with neighbors. Figure 8-3 illustrates the DBD packet format.
 
OSPF包的第二個類型,DBD包,在數據庫改變是被使用。第一個DBD包被用來選擇主從關係且有主來設這隻初始序列號。高路由器ID的路由器成爲主且着手數據庫同步。著錄有發送序列號,從確認它。在主從被選取之後,數據庫同步開始;在這個過程中,所有的LSA頭都被交換在鄰居間。
DBD Sequence Number— This field contains a unique value set by the master. This sequence number is used during database exchange. Only a master can increment the sequence number.
DBD序列號——在這一項中包含主設置的獨一無二的值。序列號在數據庫交換時使用。只有主能夠增加序列號。
Link-State Request Packets
The Type 3 OSPF packet, a link-state request packet, is sent if part of the database is missing or out-of-date. The link-state request packet is used to retrieve that precise piece of database information that is missing. Link-state packets are also used after the DBD exchange is finished to request the LSAs that have been seen during the DBD exchange. Figure 8-4 illustrates the link-state request packet format.
 
 
OSPF第三個類型的包,鏈路狀態請求包,如果數據庫的一部分丟失或者超期則將被髮送。鏈路請求包被用來檢索丟失的數據庫精確的信息
Link-State Update Packets
OSPF packet Type 4, the link-state update packet, implements flooding. Several LSAs are included in a single packet. Link-state update packets are also sent in response to link-state request packets. Flooded LSAs are acknowledged in the LSA acknowledgment packet. If an LSA is not acknowledged, it is retransmitted every retransmit interval (5 seconds, by default). Figure 8-5 illustrates the link-state update packet format.
 
 
OSPF第四種類型的包,鏈路狀態更新包,實現泛洪。許多的LSA被包含在一個鏈路狀態更新包中迴應鏈路狀態請求包。發出的LSA要受到確認包。如果LSA沒有被確認,它將在每個傳輸間隔後重傳(默認5秒)。
Link-State Acknowledgment Packet
The last type of OSPF packet, the link-state acknowledgment packet, is used to acknow-ledge each LSA. This packet is sent in response to link-state update packets. Multiple LSAs can be acknowledged in a single link-state acknowledgment packet. This packet is respon-sible for the reliable delivery of link-state update packets. Figure 8-6 illustrates the link-state acknowledgment packet format
.
OSPF的最後一個包,鏈路狀態確認包,被用來確認LSA。這個包被髮送用來回應鏈路狀態更新包。多個LSA能夠用一個鏈路狀態確認包確認。這個包被用來可靠的傳輸鏈路狀態更新包。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章