OSPF dynamic routing protocol of theoretical papers (on)

The basic principle of the OSPF routing protocol

To solve the bottleneck RIP hop count - 15

Overview OSPF routing protocol (knowledge Platform)

Routes into types: DR, BDR, ABR, ASBR

Five regions: the backbone area, the standard area, peripheral area, stubby area, non-stubby area

Five packet types: Hello, DBD, LSR, LSU (comprising a plurality of LSA), LSACK

Six kinds of LSA: Type1, Type2, Type3, Type4, Type5, Type7

Seven states: Down, Init, 2-Way, Exstart, Exchange, Loading, Full


One, Gateway Protocol

1. Interior Gateway Protocol (IGP): RIP, OSPF (port division), ISIS (routers division), etc.

2. Exterior Gateway Protocol (EGP): BGP

Two, OSPF is a link-state routing protocol (Open Shortest Path First protocol) - forwarding information base its link status

  1. Neighbor List
  2. Link state database
  3. Routing Table

Process: establish adjacencies - Link State Database - Algorithm (the Dijkstra algorithm) to calculate the shortest path to the number of - generating a routing table

Autonomous system (the AS): the same as Example region routing protocol process: region are used OSPF 1

Third, the backbone area and the standard area OSPF area

To accommodate a large network, OSPF plurality of divided areas AS (Autonomous System) within

Each OSPF router maintains a complete link-state information in your area

  1. The backbone (core)
  2. Standard area (non-backbone area) - around the backbone is connected

Area ID

Region ID can be expressed as a decimal number (generally configured to simulate decimal numbers Cisco)

IP can also be expressed as a

The figure is ospf protocol different regions in an autonomous system (AS) is, and the same process ospf protocol in the system wherein the backbone region AREA0

Other non-backbone area.

OSPF dynamic routing protocol of theoretical papers (on)

Router ID (important)

IP addresses that uniquely identifies the OSPF area router

Router-id selection rule (Note selected selected according to actual situation)

  1. Select the highest loopback interface router IP address (more router case) on the (virtual interface);
  2. If no loopback interface, select the physical ports in the highest IP address (not recommended, if it is hung over);
  3. You can also use router-id command specifies (recommended situation few routers)

As long as there is no router is down and there is a loopback interface does not hang on the entry into force


Four, DR and BDR

DR is the main route, routing the BDR is prepared, and the rest are other routes

  1. Designated router DR (the boss): responsible for updating the information of all OSPF routers.
  2. Backup designated router BDR (second child): responsible for monitoring the status of the backup DR, and to take over its role in the current DR fails.
  3. Other routers: only the DR and BDR adjacency relationship

DR and BDR election method

1. Automatic DR and BDR election

The network router with the highest Router ID is elected as the DR, the second largest will be elected as BDR

2. manually select DR and BDR

  1. Priority range is 0 to 255. The larger the value, the higher the priority, the default is 1;

  2. If the priority is the same, the need to compare Router ID;

  3. If the router priority is set to 0, it will not participate in the election of DR and BDR

note! Router priority can affect an election process, but it can not be forced to replace the existing DR or BDR router

In fact, this means that in fact people have been quicker to set the DR and BDR because there is order in the configuration, unless the router downtime or other problems will be genuine elections

OSPF multicast address

224.0.0.5 (DR and BDR is responsible for monitoring the information 224.0.0.6) and 224.0.0.6 (other monitor their own network information view they have no changes)

OSPF metric of COST (overhead)

Value COST = 10 ^ 8 / BW BW (bandwidth) is better, the lower the cost

Five, OSPF packets (5 packets)

ospf packet is carried in the IP packets, using protocol number 89, of the type shown in the following table:

OSPF packet types description
Hello It used to discover and maintain neighbor relationship and to elect the DR and BDR
Database description packets For transmitting the summary information to the neighbor link state database synchronization
Link state request packets After the router receives transmitted DBD contains new information, request for more detailed information
LSU package After receiving LSR sending link-state advertisement (LSA), a packet may have a plurality of LSU LSA
Link state acknowledgment packets Acknowledges having received LSU, each LSA points need to be confirmed

Sixth, establish OSPF adjacencies (7 states)

  1. The first stage is to start using OSPF Hello packets to establish two-way communication process

  2. OSPF start of the second stage is the process of establishing adjacency relationships

    Here is the complete process set forth:

    After the interface is down state receives Hello packet - activate the init state (only receive hello packet, the packet can not be transmitted hello) - route loaded into the system after the 2-way init state from the state (the state may be received hello packet You may also send hello packet, i.e., two maximum complete elected router ID, but does not determine the route from the master, i.e., the BDR and DR);

    exstart state determining state will have LSAck packet --loading (busiest LSR, LSU (multiple LSA), LSACK) after the DR and BDR identity --exchange state interaction DBD packet received simultaneously form state routing table --FULl stable and starts to forward data packets - similar convergence of RIP

Seven, OSPF network types

Divided into four types: point-to-multipoint, broadcast multiple access, non-broadcast multiple access

Eight, OSPF features

  1. Can accommodate large-scale network
  2. Route changes faster convergence
  3. No routing loop
  4. Support for variable length subnet mask VLSM
  5. Support zoning
  6. Support protocol packets sent to a multicast address

Compare nine, OSPF and RIP's

OSPF RIP v1 RIP v2
Link-state routing protocol Distance vector routing protocol Distance vector routing protocol
No hop limit Limit does not exceed 15 Limit does not exceed 15
Support VLSM (Variable Length Subnet) Does not support VLSM Support VLSM (Variable Length Subnet)
Fast convergence Slow convergence Slow convergence
Multicast transmission link state update Periodically update the routing table broadcast Multicast routing table is updated periodically

Guess you like

Origin blog.51cto.com/14557673/2446363