OSPF Day - working process, the data packet, state machine, Basic Configuration

Protocol OSPF: Open Shortest Path First protocol
is currently the most widely used IGP protocol; Classless link state routing protocol;
biggest drawback OSPF protocol: a tremendous amount of convergence based on the topology update;
so OSPF protocol designer in the design process, many mechanisms used to reduce the amount of update deployment structure -------
a deployment structure:
pass the topological region dividing 1. ---- single region, for each router does not reach all the local computing section HowNet the shortest path;
inter-regional transmission ----- route entry information after completion of the calculation
2. reasonable IP address planning ---- a region may be aggregated into a preferred network;
3. special Stub region ---- , the nssa;
4.30 min cycle update.
Two .OSPF packets ---- five kinds:
1.Hello package was found, establish periodic keep alive neighbor, adjacency
2.DBD package - local directory database (summary) database description packets
3.LSR package - Chain Road status query based on information unknown DBD packet query
4.LSU package - confirm the link status for the peer LSR reply, carrying all kinds of LSA
5.LSack package - confirmation link state acknowledgment packets to ensure the reliability of
OSPF cross-layer packet header encapsulated in a three-layer
three .OSPF state machine:
1.Down: Once a transceiver is hello, proceeds to the next state
2.init initialized: the received hello packet with a local route-id, enter the next state
3.two-way two-way communication: flag establish neighbor relations;
Conditional match: match fails to keep the neighbor relationship, only periodic hello packets to keep alive
a successful match to the next state machine
4.exstart pre-start: hello similar use of DBD master-slave relationship elections, route-id value mainly large ; preferential access to the next state;
5.exchange prospective exchange: using real DBD packets shared database directory;
6.loading load: use the LSR / LSU / LSack unknown LSA to get the information;
7.full forward: the establishment of adjacency symbols of.
.OSPF four working process:
After the completion of the startup configuration, the multicast router starts (224.0.0.5) of the transceiver ospf hello packets; if the received hello packet local presence route-id, neighbor relationship is established, generating a neighbor table;
then based on all the neighbors in the neighbor table to match the conditions, the match failed to maintain neighbor relations, hello packet cycle can only keep alive; match between the winners can establish adjacency; between neighbors using DBD database directory comparison; after use LSR unknown query LSA information in the directory, using the peer LSA LSU to carry transfer, ultimately required for acceptance acknowledgment LSack;
when all the devices locally collected in the region, to generate the LSDB ---- link state database tables;
locally based LSDB start SPF algorithm to calculate the shortest path to all positions of the segments, then load it to the routing table;
convergence completion, only periodic keep-alive packets Hello all neighbors and abutting relationship; 30min each cycle to send and receive packets DBD error correction.

Structural mutations:
1, the new segment - the new network equipment directly connected DBD to inform all the neighbors, neighbors LSR / LSU / LSACK convergence
2, disconnected segments - Disconnect the new network device to use DBD inform all neighbors, neighbors LSR / LSU / LSACK convergence
3, unable to communicate ---- dead time and the maximum age to address
the presence of hello packets between normal neighbors, if the dead time is still not over pack hello, disconnect neighbor relations, deleted learning from the neighbors to all the information.
If the neighbor relationship is still normal, but every 30min period not performed normally, each lsa behind the aging time there is a default maximum of 3609s; remove the LSA information can reach the maximum age;

Noun:
LSA: link state advertisement; LSA presence of different types under different conditions, for carrying the topology or routing LSDB: link state database; collection of all the LSA
OSPF LSA flooding the convergence behavior -OSPF
the OSPF LSDB synchronization

Five, OSPF basic configuration:
[R1]. 1 OSPF router-id 1.1.1.1 required when starting the process defined number has local significance only; Also disposed ROUTER-ID;
hand - loopback IP address of the maximum value - the maximum number of physical interface
IP address announcement:
[R2]. 1 OSPF-Router ID 2.2.2.2
[-R2-OSPF. 1] Area 0
[OSPF-R2-0.0.0.0. 1-Area-] Network 12.1.1.2 0.0.0.0
[. 1-R2-OSPF 0.0.0.0--area] Network 0.0.0.255 2.2.2.0
[OSPF-R2-0.0.0.0. 1-Area-] Q
[-R2-OSPF. 1] Area. 1
[. 1-R2-OSPF-Area-0.0.0.1] 23.1.1.1 0.0.0.0 Network
OSPF zoning rules:
1, star structure - all non-backbone areas must connect to the backbone area, or can not be shared inter-area routes
2, ABR- area border router work simultaneously in multiple inter-regional; ABR must be legal to work in the backbone area, or can not be routed sharing between regions;

After starting configuration, between routers use hello packets to establish neighbor relations transceiver, generate the neighbor table:
[r2] Run the display ospf neighbor list to view the peer //

After the neighbor relationship is established between the neighbors to match conditions; matching successfully established adjacencies, after LSDB synchronization is completed, the locally generated LSDB- database table;
[r2] Run the display ospf the LSDB // Check the directory database; there is information on various types of internal need specific view

After LSDB synchronization is completed, local SFP-based algorithm to calculate the shortest path to all but HowNet segments, then load it to the routing table;
[r3] display ip routing-table routing table //
[r3] display ip routing-table View all local protocol ospf // learned by OSPF routing protocol
[r1] display ospf routing // Check local working directly connected OSPF, and local learned by OSPF routing
3.3.3.3/32 2 Inter-area 12.1.1.2 2.2.2.2 0.0.0.0
type Inter-area representative of labeled routing entry generated by the other regions;
the OSPF cost value = cost metric value = reference bandwidth / interface bandwidth default reference bandwidth 100M;
the OSPF preferably the default path cost of the whole and a minimum;
if the interface bandwidth is greater than the reference bandwidth, cost is 1; may result in poor routing, it is recommended to change the default reference bandwidth;
[R1] OSPF 1 [R1-OSPF-1] reference bandwidth-1000 Important: once modify the entire network all the equipment required for the modification agreement;

Published 18 original articles · won praise 7 · views 550

Guess you like

Origin blog.csdn.net/weixin_44029504/article/details/101117262