5 packet capture analysis, 6 types, and 7 states of ospf protocol
- 1. 5 types of messages, packet capture analysis (key dry goods)
-
-
-
-
-
- Hello message: discover neighbors and establish and maintain neighbor relationships
- DataBase Description (DBD for short) message: Check whether the LSDBs of all routers are synchronized
- Link-State Request (LSR for short) message: request a specific link state record from another router
- Link-State Update (LSU for short link response message) message: Send the requested link state record
- Link-State Acknowledgment (LSA for short) message: Acknowledge other types of packets
- to sum up:
-
-
-
-
- Two, 7 states
- Three, the 6 types of LSA
1. 5 types of messages, packet capture analysis (key dry goods)
Hello message: discover neighbors and establish and maintain neighbor relationships
DataBase Description (DBD for short) message: Check whether the LSDBs of all routers are synchronized
Link-State Request (LSR for short) message: request a specific link state record from another router
Link-State Update (LSU for short link response message) message: Send the requested link state record
Link-State Acknowledgment (LSA for short) message: Acknowledge other types of packets
to sum up:
Two, 7 states
Down state:
When Down:
- No OSPF neighbors announced
- It has timed out without receiving the Hello packet within 40S.
- OSPF has been announced, the OSPF Hello sent by the peer is received, and the next state is Init.
Init status:
How to enter the next state:
OSPF has been announced, the OSPF Hello packet sent by the peer includes the router-id (active neighbor) of the machine, and it enters the next state 2-way state
2-way status:
- The role of 2-way: election of DR and BDR
- How to elect DR and BDR
1. The higher the
priority , the better. The default priority is 1, and the range is from 0 to 255. 0 means not participating in DR election.
2. The larger the Router-id, the better
3. Manually specify
4. The larger the IP address with the largest logical port, the better
5. The larger the IP address with the largest physical port, the better - How to enter the next state:
When DR and BDR are elected, enter the next state Exstart state.
Exstart status:
The function is to elect the master router and the slave router, comparing the master with the larger Router-id.
After successful election, enter the next state Exchange state
Exchange status:
Function to transmit DBD packets to each other, compare routing entries that you don’t have, and check for deficiencies.
Loading status:
Function to send LSR and LSU, learn link routing entries from each other, and complete the convergence of the routing table. Send LSA message to confirm the completion and enter the next state Full state.
Full state:
After this state, only hello messages will be sent without special circumstances. Other messages will be sent if there is a routing update or routing flaps in the Full state.
Three, the 6 types of LSA
1类:Router-LSA(Type1)
The LSA generated by each router in the OSPF routing domain is the basis of LSA advertisement. The LSA packet lists the
IP addresses and masks of all ports participating in the OSPF process of this router and the metric value of the interface. This LSA It will only spread in the area where the sending router is located, which means that its scope of action is this area
Type 2: Network-LSA (Type2)
This type of LSA will only be generated when the network topology is multi-access. In this type of LSA packet, the mask of the multi-access is listed, and the Router-id method is used to describe how many units are in this physical network segment. The router keeps in touch with the DR
3类:Network-summary-LSA(Type3)
Type 3 LSA is issued by BDR. The main reason for the existence of this type of LSA is that Type 1 and Type 2 can only be transmitted within the domain and cannot cross regions. In this type of data packet, the network segment, mask, and outbound interface are listed. The metric value of the target network segment, so Type 3 LSA is equivalent to packaging Type 1 and Type 2 LSAs and transmitting them to other areas through ABR
Type 4: ASBR-summary-LSA (Type4)
This type of LSA has no very special meaning. The router-id method is used in the data packet to locate the ABR in the area where the ASBR and ASBR are located, so that other routers can find the location of the ABR.
5类:AS-external-LSA(Type5)
From an ASBR, to describe AS external route advertised in all the region
domains
Type 7: NSSA LSA (Type7)
It is generated by the ASBR and describes the route to the outside of the AS, which is only propagated in the NSSA area.
Summary of LSA types
Type 1: All OSPF routers are generated, and only propagated in the area.
Type 2: DR is generated and only propagated in the area.
Type 3: ABR is generated and propagated in two adjacent areas.
Type 4: ABR is generated, and ASBR is not. Propagation of other areas in the same area, used to indicate ASBR
Type 5: ASBR generated, propagated to the entire OSPF protocol area, used to describe routing information of another protocol domain
Type 7: ASBR generated in the NSSA area, used to advertise to the NSSA area External routing