Some OSPF summary

OSPF

OSPF (Open Shortest Path First, Open Shortest Path First) is the IETF (Internet Engineering Task Force, Internet Engineering Task Force) developed by a link-state interior gateway protocol. Currently used for IPv4 OSPF Version 2.
OSPF features
OSPF has the following features:
Wide scope: Supports networks of various sizes, up to hundreds of routers.
Fast convergence: sent after the network topology changes immediately update packet, so that the change is synchronized in the system.
Loop-free: Since the OSPF routing calculation with the shortest path algorithm to the collected link states, the algorithm itself ensures that no loops are generated.
Zoning: allows the network is divided into areas for management. Reducing router LSDB reduces the burden of CPU and memory consumption; reducing inter-area routing information transmission reduces the network bandwidth.
Equivalent routes: Supports multiple equal-cost routes to the same destination.
Routing hierarchy: Four types of routes, prioritizes are: intra-area routes, inter-area routes, the external route, external route.
Support Authentication: Support the interface-based packet authentication to ensure the security of packet exchange and route calculation.
Multicast transmission: transmitting packets to a multicast address on some types of links, to reduce interference with other devices.
Basic Concepts of OSPF

  1. AS (Autonomous System)
    a group of routers using the same routing protocol to exchange routing information, abbreviated as AS.
  2. OSPF routing calculation process of
    calculating the OSPF protocol routing process may be described as follows:
    Each OSPF router generates LSA (Link State Advertisement, LSA) based on the network topology around itself, and the packets transmitted to the network by updating the LSA the other OSPF routers.
    Each OSPF router collects other router advertisement of LSA, LSA put all together to compose a LSDB (Link State Database, the link state database). LSA is a description of the network topology around router, LSDB is a description of the entire autonomous system network topology.
    OSPF router will convert LSDB to a weighted directed graph, which actually reflects the entire network topology. All the routers are identical to FIG.
    Each router to FIG calculate itself as the root of a shortest path tree using the SPF algorithm, which tree shows the routes to the nodes in the autonomous system.
  3. Router ID of
    a router if you want to run OSPF protocol, then there must be RID (Router ID, the router ID). RID is a 32-bit unsigned integer that can uniquely identifies a router in one autonomous system.
    RID can be configured manually or automatically generated; If no RID command is automatically generated in the following order a RID:
    If the current device is configured Loopback interface, to select all Loopback interface highest IP address as the RID;
    if the current Loopback interface is not configured, it will select all of the configured IP address on the link and the maximum effective value of the IP address of the interface as an RID.
  4. OSPF protocol packets
    OSPF uses five types of packets:
    the Hello packet: Periodically sent to find and maintain OSPF neighbor relationships. It contains the values of some timers, DR (Designated Router, designated router), BDR (Backup Designated Router, Backup Designated Router) and known neighbors.
    DD (Database Description, database description packet): describes the local LSDB digest of each LSA in the two routers for data synchronization.
    LSR (Link State Request, link state request) messages: request to the other LSA desired. After two routers exchanging the DD packets, that the peer routers which the local LSDB LSA missing, then the LSR LSA needs to send a request message to the other required. Including a summary LSA needed.
    LSU (Link State Update, link state update) packet: LSA they need to send to the other party.
    LSAck (Link State Acknowledgment, link state acknowledgment) packet: used to acknowledge the received LSA. We need to make sure the content is the LSA Header (a packet can confirm multiple LSA).
  5. Type of the LSA
    in OSPF link state information are described in the LSA package released out of LSA used have the following types:
    Router LSA (Type1): produced by each router, the router's link state described and overhead spread in the area only.
    Network LSA (Type2): is produced by DR, the link state of the local description of all routers in the propagation area only.
    Network Summary LSA (Type3): produced by ABR (Area Border Router, area border router), a segment of the route within the area described and advertised to other areas.
    ASBR Summary LSA (Type4): is produced by the ABR, describes the route to ASBR (Autonomous System Boundary Router, ASBR) is advertised to the relevant region.
    AS External LSA (Type5): from an ASBR, described route to the outside AS (Autonomous System, AS), advertised in all regions (except Stub and NSSA area).
    NSSA External LSA (Type7): in the region generated by an ASBR NSSA (Not-So-Stubby Area ), describe routes to AS outside spread only in the NSSA.
    Opaque LSA: A proposed type of LSA, the LSA from the back of the head followed standard and application specific information may be used by the OSPF protocol, or by some application distributed throughout the OSPF routing domain. Opaque LSA divided into Type 9, Type10, Type11 three types, flooding regions; wherein, Type Opaque LSA 9 only in flooding the local link, Opaque LSA Type 10 only in the local area flooding scope, type LSA 11 may be flooded range in an autonomous system.
  6. Neighbors and abutting
    In OSPF neighbors (the Neighbor) and abutment (the adjacency) are two different concepts.
    After OSPF router starts, it sends Hello packets through OSPF interface. OSPF router received the packet checks parameters defined in the Hello packet, if the two sides agreed they become neighbors.
    The two sides form a neighbor relationship is not necessarily able to form an adjacency, which depends on network type. Only when both the successful exchange of DD packets, LSA exchange and achieve LSDB synchronization, before the formation of adjacency in the true sense.

4 OSPF network types
OSPF network link layer protocol type into four types:
Broadcast: If the link layer protocol is Ethernet, FDDI, OSPF defaults network type Broadcast. In this type of network, protocol packets usually in multicast mode (224.0.0.5 and 224.0.0.6).
NBMA (Non-Broadcast Multi-Access , Non-Broadcast Multiple Access): When the link layer protocol is a frame relay, ATM, or X.25, OSPF defaults the network type to NBMA. In this type of network, protocol packets are unicast.
P2MP (Point-to-MultiPoint, multipoint): no link layer protocol will be considered P2MP default type. Multipoint must be forcibly changed from other network types. The common practice is as NBMA network. In this type of network, in multicast mode (224.0.0.5) send packets.
P2P (Point-to-Point, Point to Point): When the link layer protocol is PPP, HDLC, OSPF defaults network type as P2P. In this type of network, in multicast mode (224.0.0.5) send packets.
NBMA network configuration guidelines
NBMA network is non-broadcast and multi-accessible network, typical ATM and Frame Relay networks.
For the type of network interface requires some special configuration to NBMA networks. Unable to find neighbors, the form must manually by broadcasting Hello packets specify neighbors router's IP address, and whether or not there is a neighboring router for DR election right.
NBMA network must be fully connected, i.e., the network must have any two routers in a virtual link. If there is no direct link between the portions reachable routers, the interface should be configured to P2MP type. If only one peer router can also be configured to interface type in the type of P2P NBMA network.
Differences between NBMA and P2MP networks:
NBMA network is fully meshed, non-broadcast multi access. The P2MP networks are not required to be fully connected.
Necessary to elect DR and BDR on NBMA networks, while DR and BDR on P2MP networks.
NBMA is the default network type, while P2MP is a conversion from other network forcibly changed. The most common practice is to change NBMA network P2MP network.
NBMA network are unicast packets, you need to manually configure the neighbor. P2MP networks are multicast packets.


DR/BDR

1. DR / BDR profile
in broadcast or NBMA network exchange routing information between any two routers. If there are n routers in the network, it is necessary to establish (n-1) / 2 n adjacencies. This makes route changes on any router will result in multiple transmissions, which waste bandwidth. To solve this problem, OSPF Designated Router protocol defines DR (Designated Router), all the routers only send information to the DR, which is sent to the network link state.
If the DR fails for some faults, the network must be reelected DR, and then synchronize with the new DR. It takes a long time, during this time, the route calculation is incorrect. In order to speed up this process, OSPF proposed the concept of BDR (Backup Designated Router, Backup Designated Router) is.
In fact, BDR is a backup for DR in the DR also elected BDR, BDR and all the routers on the segment also establishes adjacencies and exchange routing information. When the DR fails, BDR will become the new DR. Since no re-election, and the adjacencies have already been established, so the process is very short. Then of course still need to re-elect a new BDR, it requires a relatively long time, but it will not affect the calculation of the route.
Will not establish adjacencies between the DR and outside the BDR routers (referred to as DR Other), is no longer any exchange of routing information. This reduces the number of adjacencies among the routers on broadcast and NBMA networks.

2. DR / BDR election process
DR and BDR are all from the same network segment of the router that has the selected eligible under the priority of the router, Router ID by HELLO messages elected, only priorities higher than 0.
When DR / BDR election Each router writes the elected DR Hello packets, sent to each router running OSPF protocol on the segment. When two routers on the network declare themselves DR, router priority wins. If the priorities are equal, the Router ID wins. If the priority of a router is 0, it will not be elected as a DR or BDR.
Note that:
only in broadcast or NBMA interfaces elections DR, DR election is not required on a point to point or multipoint type of interface.
DR is a certain segment, is the sense of router interface is. A router on the interface may be a DR, other interfaces is possible in a BDR, only or DR Other.
Routers can affect a priority selection process, but when the DR / BDR has completed selection, even with a higher priority router becomes active, it will not replace the segment has been selected DR / BDR becomes the new DR / BDR.
DR may not be the highest priority of the router router interface; Similarly, BDR is not necessarily the router with the second highest priority of the router interface.

Guess you like

Origin blog.51cto.com/14220780/2415227