Before learning how to establish a neighbor relationship with OSPF, let's review the process of establishing a neighbor relationship with RIP. After router A running the RIP Protocol is started, it sends A request packet to the neighbor router B. After receiving the packet, the neighbor responds to A confirmation packet. Then, router A sends all the messages that he knows to router B, and periodically sends messages to his neighbors every 30 seconds. So what are the drawbacks of such a seemingly simple process? First, the RIP Protocol periodically sends packets every 30 seconds to ensure that the route table can be updated after a router fails. Therefore, the packet sent cyclically every 30 seconds contains a large amount of routing information, which is actually a waste. If the network does not change, these packets have no practical significance. OSPF separates the maintenance route information packet and the updated route packet. As shown in:
After RT1 is started, a Hello message is sent. The Hello message contains the address of DR and whether neighbors are found. In this figure, Neighbors Seen = 0 indicates no Neighbors have been found. After receiving the Hello packet sent by RT1, RT2 also sends a Hello packet to RT1. This packet tells RT1 that DR is RT2 and that RT1 has discovered that RT1 is its neighbor. After RT1 receives a Response Message sent back from RT2, this status is called a neighbor relationship. After establishing a neighbor relationship, RT1 starts to send LSA to the network. But in fact, after the network is connected, most of the routes in each router are the same. At this time, if RT1 still sends all the LSAs that it knows to RT2, it will also cause waste.
Therefore, before RT1 sends an LSA to RT2, it will tell RT2 that the routes are needed and those are not needed by itself. As mentioned above, a Head is added before the LSA packet when the OSPF packet is sent. The Head contains the LSA identifier to distinguish each LSA. Therefore, RT1 only needs to send the Head to RT2, which greatly reduces the amount of information sent. When RT2 receives all the Head of the Lsa, It will compare it with the Head in its local LSA. If there is a difference, it will send the request packet to RT1 and only send the Head packet ).
However, the LSA packet is an IP-based packet, which is characterized by unreliable best-effort forwarding. Therefore, LSA must recommend a mechanism to ensure that the other party can receive messages sent by itself accurately. Therefore, LSA has established a mechanism similar to TCP validation and timeout retransmission to ensure accurate transmission and receipt of packets. As shown in the figure, RT1 sends a DD packet to RT2. The DD packet sent for the first time does not contain any LSA information. I represents the first packet sent by RT1 to RT2, M indicates that there are more messages in the end, while MS tells RT2 that it is the master sender, and who has the MS size determines the sending order of QPS ), only MS can add a serial number when sending a message. In this case, we can find that RT2 has become MS. When the field M in the sent packet is 0, you can confirm that the packet has been sent. At this time, RT1 will send the LS requese packet to rt2. After RT2 receives the LS request packet, it sends the LS Update packet. RT1 sends the LS ack validation packet most. Through this series of packets, each vro can form an identical LSDB.
- Routing Technology and Application: Key Points of ASON Standardization
- Storage Network Routing Technology