Basic knowledge of OSPF routing protocol point

Overview of
Open Shortest Path First (Open Shortest Path First, OSPF) is a dynamic routing protocol is widely used as a link-state routing protocol, the route change fast convergence and no routing loops, supports variable length subnet mask code (VLSM) and aggregation level zoning advantages. The OSPF protocol used in the network, most of the route calculated by the OSPF protocol and self-generating, without the network administrator manually configured, when the network topology changes, the protocol can be automatically calculated, the route correction, which greatly facilitates network management. But not to if you use a specific network environment, do not do careful planning, using the results of the OSPF protocol will be greatly reduced, or even lead to failure. 

OSPF protocol is a link state protocol. Each router is responsible for discovering, maintaining relationships with neighbors, and a list of known neighbors and link cost LSU (Link State Update) packets describing, through reliable flooding the autonomous system with other routers in the AS (Autonomous System) periodic interaction, learn the network topology of the whole AS; AS and other injection routes through autonomous system border router, thereby obtaining the routing information of the entire Internet. Or when the link status changes, LSA regenerated every specific time, through the router LSA flooding mechanism advertised new, updated in real time in order to achieve route

First, the types of routes into 
   

       
                                       
DR specify the reason is

When the multi-access network changes, DR is responsible for updating all other routers.
BDR backup designated router

BDR monitors the DR of the state and take over its role in the current DR fails.
ABR Area Border Router
ABR connects the backbone region and a non-backbone area, may be a physical connection between it and the backbone area, may be a logical connection.
ASBR autonomous system boundary router

Is used to other ASBR router routing protocol routes learned by redistribution routing method is injected into the router of OSPF domain.
Second, the five regions
1 backbone area (Area0)

2. Non-backbone areas - according to the type of road have to learn to distinguish

(1) Standard region

(2) the distal region (Stub)

(3) complete tip (Totally stubbby)

(4) Non-stubby area (the NSSA)

Three, five packet types
 
                                                 
hello packet
is sent (directly connected network segment) period, the packet has a router ID, holding time 40s, router priority, neighbor information, area ID, DR, BDR, password, stub area flag; (that is, sent to see the other side hung up no)
database description packets (DBD)
the package is actually a summary of the LSA, is used for comparison (like a book's table of contents)
link state request packet (LSR)
were found after comparing DBD DBD in their own little lsa, will send the package (two books directory is not the same, much less to be)
a link status update package (LSU)
after receiving LSR to send itself to the router lsa less, (himself many directories to him, so that he and I, like many small to be)
link-state acknowledgment packet (LSAck)
sends a confirmation after receiving the LSA, (I received! thanks!)
four, OSPF link state
composition of the link state database
(1) is created for each router interface to the database by each of the corresponding neighboring node interface speed and composition

(2) link-state database for each entry called LSA (Link State Advertisement), there are six common type of LSA

2. The link state advertisement (LSA) type
 
Type1 router LSA (all routes) emitted by the routers in the area
(declared network state information) emitted by the Type2 LSA network within the DR region
Type3 LSA Network Summary of the ABR issued, other regions link advertisement summary (summary exchange)
Type4 ASBR summary LSA ABR issued for an ASBR information (informing ASBR position)
the Type5 the AS external LSA ABR sent for external routes advertised (diplomatic)
Type6 the NSSA external LSA NSSA region , the ASBR emitted within the region for external connection routing
V. establishing OSPF adjacencies (seven states)
the first stage is used to start 1.OSPF hello packets establish bidirectional communication process

2.OSPF start of the second phase is to establish full adjacency

Down
in Down state, OSPF process has not exchanged information with any neighbor. OSPF is waiting to enter the Init state.
Init OSPF routers at fixed time intervals (default 10s) packet types 1 (Hello) transmission, in order to establish a special relationship with neighboring routers.
2-Way
Each OSPF router uses the group trying to establish a bi-state or two-way communication with all neighboring routers in the same IP network. Hello packet containing sender known OSPF neighbor list. When the router sees its own Hello packets appear in a neighboring router, it enters the two-way state.
ExStart
Each OSPF router uses the group trying to establish a bi-state or two-way communication with all neighboring routers in the same IP network. Hello packet containing sender known OSPF neighbor list. When the router sees its own Hello packets appear in a neighboring router, it enters the two-way state.
Exchange
in the exchange state, the neighbor router packet transmitted their link state information to each other using the DBD of type 2, i.e. routers describe their link state databases each other. The router information they learn its existing link-state database for comparison and confirms that each individual DBD packet, if any router which receives the link information is not in the database, the request to its neighbor about the router complete and current information of the link. Complete routing information is exchanged in the "Loading (Load)" state.
Loading 
in the exchange state, the neighbor router packet transmitted their link state information to each other using the DBD of type 2, i.e. routers describe their link state databases each other. The router information they learn its existing link-state database for comparison and confirms that each individual DBD packet, if any router which receives the link information is not in the database, the request to its neighbor about the router complete and current information of the link. Complete routing information is exchanged in the "Loading (Load)" state.
Full
after the end of the load state, the router into the next whole state. Each router maintains a list of adjacent routers, it is called adjacent database.

Six, OSPF process work
Basic knowledge of OSPF routing protocol point

Seven, and Interior Gateway Protocol Exterior Gateway Protocol
(1) autonomous system (AS)

(2) Interior Gateway Protocol (IGP), for example: RIP, OSPF, ISIS etc.

(3) External Gateway Protocol (EGP), for example: BGP, etc.

Eight, OSPF basic concept
1.OSPF region
(1) to accommodate a large network, OSPF plurality of divided regions in the AS

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

2. The area ID
(. 1) area ID may be represented as a decimal number

(2) may be expressed as an IP

Backbone area Area 0
Room (1) is responsible for routing information dissemination area

ID 4.Router
the IP addresses in (1) OSPF router uniquely identifies the area

5.Router ID selection rule
(1) select the loopback interface router IP address of the highest values (recommended)

(2) If no loopback interface, select the IP address of the house in the highest port (not recommended)

(3) can also be specified using the Router ID router-id command

6.DR and BDR election method of
automatic election:

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

Manual elections:

(1) 0-255 priority range, the larger the value, the higher the priority, default 1

(2) the same priority, then the need to compare Router ID

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

7.DR and BDR election process of
(1) the priority of the router can affect an election process, but it can not be forced to replace the existing DR or BDR router

8.OSPF multicast address
(1) 224.0.0.5

(2)224.0.0.6

9.OSPF metric the COST
(. 1) the COST = 10. 8 ^ / BW consideration (smaller is better)

(2) the shortest path is based on the cost assigned to the interface (cost) calculated

     
10.OSPF packet

(1) carried in the IP packet, a protocol ID 89

11.OSPF network type
(1) point

(2) multi-access broadcast network

(3) non-broadcast multiple access network

(4) multipoint

Nine, OSPF configuration commands
                 
start OSPF routing process rout ospf process-id
interface specifies OSPF protocol runs and regional network addresss invers-mask where the area area-ad
check the routing table (direct / study) show ip route
to see only OSPF learning to route show ip route ospf
view the OSPF protocol configuration information show ip protocol
to see how OSPF is configured and ABR information show ip ospf
view information on LSA data show ip ospf database in the LSDB
view on the interface OSPF configuration information

show ip ospf interface
view OSPF neighbors and adjacent to each show ip ospf neighbor
detail information of OSPF neighbors (including DR / BDR) show ip ospf neighbor detail
view router "adjacent" whole process debug ip ospf adj
view each OSPF packets debug ip ospf packet information
emptying the routing table clear ip route
reverse mask example:

Ten, OSPF three traffic
(1) within the traffic

Exchanging packets constituting traffic between routers within a single region

(2) inter-domain traffic (ABR)

Exchanging packets constituting traffic router between different regions

(3) External traffic (ASBR)

Exchanging packets constituting traffic between the routers in the region of the outer DSPF another autonomous system or domain router OSPFR

Eleven, OSPF application environments
1. Consider OSPF uses the following aspects
(1) network size

(2) Network Topology

(3) Other special requirements

(4) requires the router itself

2.OSPF features
(1) can be adapted to large-scale network

(2) routing change fast 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

XII reasons to generate multiple OSPF areas

(1) improve network scalability

(2) rapid convergence

Thirteen, OSPF router types
OSPF routers in the AS according to the position and to be divided into the following four categories:

  1. An internal router (Internal Routers)
    All interfaces of these routers belong to the same OSPF area.

  2. Area Border Router ABR (Area Border Routers)
    These routers can belong to more than two areas, one of which must be the backbone area. ABR is used to connect the backbone region and a non-backbone area between it and the backbone region can either be physical connections or may be a logical connection.

  3. Backbone routers (Backbone Routers)
    These routers have at least one interface to the backbone area. Therefore, all of the ABR and internal routers in Area0 are backbone routers.

  4. Autonomous system boundary router ASBR (AS Boundary Routers)
    router to exchange routing information with another AS is called ASBR. ASBR does not necessarily located on the border of AS, it can be an internal router, or an ABR. If an OSPF router imports external routes, an ASBR.

Fourth, choose a router for routing entries
1. Router only the best route to add entries to the routing table

2. Select the route entry basis

(1) from the line

(2) measure

3. Load balancing routing entries

XV peripheral area and completely peripheral region
1. The region satisfying the following conditions

(1) only as a default route to export their area

(2) through the region can not serve as a virtual link region

(3) Stub areas without autonomous system border router ASBR

(4) than the backbone area Area 0

2. peripheral region

(1) no notice LSA4,5,7

3. Fully peripheral region

(1) In addition to the default route advertised LSA3, no announcement LSA3,4,5,7

Sixteen, re-routing the distribution
1. Distribution appreciated that re-routing
(1) a single IP routing protocol is the preferred embodiment of the routing management network IP

(2) Cisco IOS capable of executing a plurality of routing protocols, each routing protocol and the routing protocols and services belong to the same autonomous system

(3) Cisco IOS features to use route redistribution to exchange routing information created by different protocols

2. Routing Consider weight distribution
(1) measure

(2) from the conduit

3. redistributed into the OSPF domain path type
(1) is a type of the external path (Type 1 external path, E1)

(2) the external path of type 2 (Type 2 external path, E1)

4. A router has two external route to the destination network 10.1.2.0 to
(1) E1 Type

ABD-cost path is 25 (20 + 5) - Priority

ACD-cost path is 48 (18 + 30)

(2) E2 type

Cost paths ABD is 20

Cost path ACD is 18-- priority

The redistribution routing configuration
(1) Syntax:

redistribute protocol 【metric metric-value】【metric-type type-value】【subnets】

(2) Example

router rip

  redistribute ospf 1 metric 10

router ospf 1

  redistribute metric 200 subnets

 Seventeen, NSSA region
1.NSSA region is 0OSPF RFC Addendum
(1) defines a special type of LSA 7

(2) provide advantages similar to the stub area and totally stibby area of

(3) may comprise ASBR

2.OSPF link-state advertisements
(1) LSA7 (NSSA External LSA , NSSA external LSA)

3.NSSA redistribution routing type region
(1) N1, N2

(2) After the NSSA ABR convert E1, E2

4. Configuration command NSSA area
(1) Syntax

area area-id nssa 【no-summmary】

 XVIII Summary
1. Common six LSA
LSA1, LSA2, LSA3, LSA4, LSA5, LSA7

2.OSPF path type

The region of the path, the path outside the region, an external path of the type 1 and type 2 outer path

Nineteen, OSPF summary address

1. The effect of
(1) conserves resources by reducing the number of LSA flooding

(2) You can save resources by masking some network instability details

(3) reduce routing entries in the routing table

2. Inter-area route summarization configuration
(1) grammar

area area-id range ip address mask

3. External route summarization configuration
(1) grammar

summary-address ip adress mask

Twenty, OSPF virtual link
1. Virtual Link
(1) refers to a link connected to the backbone through a non-backbone area region

2. The purpose of the virtual link
(1) via a non-backbone to backbone region a region to region

(2) is connected to a backbone segment through a region of non-backbone area

3. The virtual link configuration rule and characteristics of
(1) must be arranged in a virtual link between two routers ABR

(2) is not a transfer region distal region

Stability (3) virtual link depends on the stability of a region through which

(4) a virtual link help provide redundancy Logitech

4. The virtual link configuration command
(1) Syntax

area area-id vritual-link router-id

Guess you like

Origin blog.51cto.com/14449530/2439031