Dynamic routing protocol OSPF basic theory

OSPF Overview

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) period, to 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

·

OSPF (Open Shortest Path First)
based interior gateway protocol link state information (IGP protocol)
based on the IP protocol, protocol number: 89
SPF algorithm: OSPF area, all routers LSA will receive from his neighbor's router, these LSA stored in the LSDB, the optimal path is calculated for each place, and then the optimum path stored in the global routing table. In the calculation of the process, it has eliminated the loop

·

OSPF Features

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

·

A, OSPF routes into type

Types of description
DR When the multi-access network changes, DR is responsible for updating all other routers
BDR BDR monitors the DR of the state and take over its role in the current DR fails
APR 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
ASBR Is used to other ASBR router routing protocol routes learned through routing method redistribution injected into the OSPF domain router

·

Two, OSPF five regions

1, the backbone (Area0)
2, non-backbone area - according to the type of road has to learn to distinguish between
(1) the standard region
(2) peripheral area
(3) complete a tip
(4) distal region impure

·

Three, OSPF packet types

Packet Type Packet effect
Hello package Periodically sent to find, establish and maintain neighbor relationship
Database description packets (the DBD) It is used to describe the local link database summary information
Link state request packets (LSR) Detailed information for the neighbor solicitation required LSA
Link state update packets (LSU) With detailed information with each other to restore the requested LSA
Link state acknowledgment packets (LSAck) Acknowledge receipt of the LSU, each LSA needs to be confirmed separately

·

Four, OSPF network type

Network Type hello time Dead Time Neighbor and adjacency
broadcast 10s 40s Automatically establishes neighbor, elections DR / BDR
F2f 10s 40s Automatically create a neighbor without elections DR / BDR
P2MP 30s 120s Manual refers to the neighbors, no elections DR / BDR
NBMA 30s 120s Manual refers to the neighbors, elections DR / BDR

·

Five, OSPF adjacency building process

status process
Down (inactive) Int hello to receive the activation state
Init (initial state) Receiving hello message, he did not find his R-id
2-Way (bidirectional communication state) The received hello packets, the active neighbor field and read their own R-ID
ExStart (initial state information exchange) First DBD interactive message, master-slave relationship is determined, a large R-ID of the master
exchange (exchange of information state) Interactive DBD packets carrying LSA header information
loading (loading state information) When receiving the local packet DBD M bit is 0, the state enters the
full (full abutment condition) Establish full adjacency state between routers, LSDB synchronization is complete

Six, OSPF link state

1、链路状态数据库的组成
(1)每个路由器都创建了由每个接口、对应的相邻节点和接口速度组成的数据库
(2)链路状态数据库中的每个条目称为LSA(链路状态通告),常见的有六种LSA类型
2、链路状态通告(LSA)类型
Type1 :路由器LSA 由区域内的路由器发出的(所有路由)
Type2: 网络LSA 由区域内的DR发出的(宣告网络状态信息)
Type3 :网络汇总LSA ABR发出的,其他区域的汇总链路通告(汇总交换)
Type4 :ASBR汇总LSA ABR发出的,用于通告ASBR信息(告知ASBR位置)
Type5: AS外部LSA ABR发出的,用于通告外部路由(外交官)
Type6: NSSA外部LSA NSSA区域内的ASBR发出的,用于本区域连接的外部路由
·

七、OSPF工作过程

OSPF动态路由协议基础理论

·

八、OSPF的度量值

COST=10^8/BW

最短路劲是基于接口指定时代(cost)计算的

接口类型 代价(108/BW)
Fast Ethernet 1
Ethernet 10
56K 1785

九、OSPF的配置命令

描述 命令
启动OSPF路由进程 rout ospf process-id
指定OSPF协议运行的接口和所在的区域 network address invers-mask area area-ad
查看路由表信息(直连/学习) show ip route
只查看OSPF学习到的路由 show ip route ospf
查看OSPF协议配置信息 show ip protocol
查看OSPF是如何配置的以及ABR信息 show ip ospf
查看LSDB内的所有LSA数据信息 show ip ospf database
查看接口上OSPF配置信息 show ip ospf interface
查看OSPF邻居和邻接的状态 show ip ospf neighbor
查看OSPF邻居的详细信息(包括DR/BDR) show ip ospf neighbor detail

Guess you like

Origin blog.51cto.com/14307755/2439020