OSPF summary (1)

1. Features
of OSPF 1. OSPF is a classless link state routing protocol, which is encapsulated into three layers across layers, with protocol number 89;
2. Multicast address: 224.0.0.5 (BDR multicast address) and 224.0.0.6 ( DR multicast address);
3. Based on topological work, the amount of updates is large-structured deployment is required-area division, address division;
4. The convergence speed is extremely fast, but the large-scale network configuration is very complicated.
5. OSPF metric: the metric value of all outgoing interfaces from source to destination, inversely proportional to interface bandwidth (10^8/bandwidth)

2. Five types of OSPF data packets
1. Hello: discover, establish, and keep alive neighbor relationship, the hello time is 10s;
2. DBD: database description package, check whether the database of the router is synchronized;
3. LSR: link status Request packet, request specific LSA to other roles;
4. LSU: link state update packet, flooding LSA; responsible for encapsulating the LSA information requested by LSR into LSU;
5. LSACK: link state confirmation, router must LSACK confirmation is performed for each received LSA, but one LSACK can be used to confirm multiple LSAs.

3. The state machine of
OSPF OSPF has the following states when it is established:
1. Down: Once the local sends a hello packet, it will enter the next state;
2. Init initialization: the local RID in the hello packet received locally enters the next state. Status;
3. Two-way communication: a sign of neighbor relationship establishment;
condition matching: point-to-point network directly enters the next state; MA network will conduct DR/BDR election (40s), non-DR/BDR shall not enter the next state Status;
4. Exstart pre-start: use DBD similar to hello to conduct master-slave relationship election, RID is the main one, and the master first enters the next state;
5. Exchange quasi-exchange: Use real DBD package for database directory sharing, which requires ack;
6. Loading: Use LSR/LSU/LSack to obtain unknown LSA information;
7. Full forwarding: a sign that the adjacency relationship is established.

Fourth, the working principle of
OSPF After the ospf configuration is completed, the local hello packet is used to establish a neighbor relationship, and a neighbor table is generated; then the condition is matched, and the matching loser keeps the neighbor relationship, and only the hello period is kept alive;
if the condition is matched successfully, DBD/ LSR/LSU/LSACK obtains unknown LSA information. After all the LSAs in the network are collected, the LSDB link state database table is generated;
then the SPF algorithm is used to calculate the best local route to the unknown network segment (the sum of the cost values ​​is the smallest Path) and load it into the routing table.
In fact, after the LSDB is generated, the SPF algorithm will be launched twice:
the SPF algorithm is activated for the first time to generate an optimal path tree with itself as the root; the
SPF algorithm is activated for the second time to calculate the optimal path to an unknown network segment, and load To the routing table.

Five, the three tables of OSPF
1. Neighbor table: lists all neighbor routers that have established adjacency relationships for each router.
2. Link state database (topology table): lists the information of other routers in the network, thus showing all Network topology
3. Routing table: lists the best path to each connected network calculated by SPF algorithm

6. OSPF interface network type
1. Point-to-point: DA 224.0.0.5 (multicast update even if nei ghbor is set), a pair of routers form an adjacency. Without DR, each sub-interface belongs to a different IP subnet.
2. Point-to-multipoint: DA: 224. 0.0. 5 (multicast update even if neighbor is set), no DR, same IP subnet. Ptp and ptmp cannot form neighbors (hello-interval 30 dead -interval 120 in PTMP)
3. Point-to-multipoint non-broadcast: DA: Unicast, no DR, same IP subnet.
4. NBMA: DA: Unicast, select DR (DR and BDR must be directly connected to all other routers), same as IP subnet. Full or partial interconnection.
5. Broadcast: Election DR, all routers send information to 224.0.0.6 (DR monitors this address), and then DR sends information to 224.0.0.5, DR establishes adjacency with all routers, and all routers reach the 2way state (even if neighbor is set Also multicast updates). The same IP subnet, fully interconnected or partially interconnected.
6. Feature summary:
Point families do not need to elect DR and BDR for
multiple access. Both DR and BDR
non-broadcast are required to be elected. Neighbors must be manually specified. Non-broadcasts are unicast
. The cost specified after the neighbor command is updated only in non-broadcast mode.

7. OSPF metric value
1. COST (1-65535): The sum of the cost from the sender to the destination in the outbound direction. Ip ospf cost
2. Cisco calculates the measurement method as: 10^8/bandwidth (cannot be a number less than 1, and both are 1) For example: 10^8/1544Kbit=64 Modify the reference bandwidth: 8 times if the interface bandwidth is greater than 10 Fang, then all are 1.
3. The default reference bandwidth is 100M, which is 10 to the 8th power.
4. Modify the reference bandwidth on the outgoing interface and the incoming interface of the next hop route.
Note: The reference bandwidth should be modified on all 0SPF routers. Otherwise, the bandwidth calculation is inconsistent

Guess you like

Origin blog.51cto.com/13596342/2545537