当前位置:网站首页>OSPF theory
OSPF theory
2022-07-18 20:27:00 【I'm not Picasso】
List of articles
One .OSPF theory

One 、OSPF Is the most commonly used IGP Internal gateway protocol , yes CCNA The only dynamic protocol based on link state introduced in .
IS-IS yes CCIE Dynamic protocol based on link state introduced in . Campus network , Advanced distance vector (EIGRP), Distance vector (RIP).
o:open SPF(SHORTEST PATH FIRST) It's its algorithm , Shortest path first , Just look at COST value , and COST The value is based on the bandwidth , The higher the bandwidth ,COST The smaller the value. , The higher the priority of this path .
Why COST Instead of using bandwidth to calculate the shortest path ?
Because the bandwidth of a link can only reflect the minimum link state , The entire link will be minimized 10 Limit , If you use bandwidth , It cannot reflect the overall state of the link .
and COST It is to accumulate the bandwidth of each link (10^8/ Interface bandwidth ) Of , It can reflect the comprehensive state of the link , So use COST, Not bandwidth , To calculate the shortest path . The smaller the shortest path, the better .
GP Routing Protocol , It can only be used in the same autonomous system . The routing protocols of different autonomous systems should use BGP(CCIE)
CIDR: No classification ;
VLSM: Variable subnet mask ;
OSPF Through Code Prioritize :
O: Routing entries in the region (CCNA)
O IA Routing entries between regions ( Expanding knowledge )
O E Route redistributed route entries ( Expanding knowledge )
O N Routing entries for special areas .
Fast convergence : The routing information can be recalculated soon
Trigger update : Only when the routing information changes , Only changed route entries will be updated ( Incremental updating )
Multicast update (224.0.0.5DR other and 224.0.0.6(DR and BDR))
The picture on the left tells us OSPF General operating principle :
1 First, each routing device is configured OSPF after , Will send to the neighbor router LSA( Link status notification packet )
LSA: That is, all link information related to the current router , That is, which links the router can reach , Send to neighbor router , The information contained mainly includes my network type 、COST Value and so on . Routers send messages to each other LSA, such as R1 issue R2,R2 direct Copy One for R3, Send it, send it ,COPY Come on copy Go to , Eventually all routers R1、R2、R3 Will receive the same amount LSA, Will all LSA Together, it forms LSADATABASE( Link state database ), In principle, if you send each other LSA, The final LSDB It's the same . To ensure that everyone is the same ,LSDB There is a synchronization mechanism , Of every router LSDB every other 30 Flooding will occur every minute , This ensures that my neighbor router and my LSDB It's consistent , But if twice 30 Within minutes , Some one LSA The message was not sent back , Then the entry is aging ( dead ), Next , According to the... Of each link in the link state database COST Information , Use SPF The algorithm calculates me ( The current router reaches other routers ) Best path (COST The path with the lowest value ), Put this shortest path into the routing table .
summary : Everyone sends messages to each other LSA, formation LSDB, When LSDB After synchronizing in the region , Reuse SPF Algorithm , Get the shortest path , Form a routing table for each router .
R1 To R4 There are two paths to choose , But in the final routing table, only R1-R2-R4 This path , The reason is the COST The value is 30, and R1-R3-R4 Of COST The value is 40, choose COST The shortest path is the one with the smallest value , Put it in R1 In the routing table .
The area is OSPF The main embodiment of hierarchy , yes OSPF At the heart of , When the network is large , We should divide the network into different levels , That is, the trunk area ( The area number is 0) And non trunk areas ( Not 0, Area 1, Area 2…… There is no priority distinction between ) All non 0 Areas are routed through area boundary routers (ABR) Attached to the area 0 On , Only in the trunk area 0 Only routers on can communicate ,C、D、E Three routers are ABR.
stay OSPF The boundary of the middle area is on the router , and IS-IS The boundary of is on the link .
C、D、E Three routers are ABR, The area boundary router is in the middle of the two areas , such as C The router belongs to the area 0 And the area 1, It is the connection point of two areas .A、B It's the backbone router ,F、G、H It is the router in the area .

Router A Also connect an external routing area ( This area is not running OSPF, For example, running other protocols RIPv2 or EIGRP etc. ), Router A Also known as autonomous system router (ASBR)
What are the benefits of zoning ?
Everyone is in the same area , It's a single area OSPF, There must be an area 0, So we generally refer to single region 0, This is also CCNA Key points of the course .
But if everyone is in the area 0 inside , It doesn't matter if the network is small , What problems will there be when the network is big ? Such as the 10 Routers , Every router has 100 strip LSA, that 10 There are 1000 strip LSA, Finally, everyone should synchronize , Every router is 1000 strip LSA, Calculate with 1000 To carry out , In this way, both the cost and efficiency will be adversely affected . It can be separated from a router ,
The routers in the left and right areas only need to calculate 500 strip LSA, The middle router summarizes the left and right routers LSA formation LSDB, Computation 1000 strip LSA, Thus, the number of routers on the left and right sides is reduced LSDB.
Reduce routing entries
It can summarize routes between regions and outside , Thus reducing routing entries .
Limit topology changes to a specific range

Changes in the region will not affect other regions , such OSPF The jitter will become smaller . Area 1 As long as the router C Just know .
All the non 0 If the area wants to communicate, it must be hung in the area 0 On , If in the area 1 Attach to an area 4, Area 1 And the area 4 There is no communication between , Area 4 And the area 0、1、2、3 Can't communicate .

Two . Regional examples

Two conditions lead to the area not being attached to the area 0, One is the region 0 The router port of is exhausted , The other is the area 4 Departure area 0 Too far away , Hang in the area 1 At this time, a virtual link can be built (VL) Implementation area 4 And region 0 Communication for .
There is another way to build virtual links (VL) The demand situation is the region 1 And region 15 Build a backup virtual link between , Prevention area 1 When it falls , You can use the backup virtual link .
Area 0 There can only be one in the network , Play the function of anti ring , Area 1、2、3 The ring road is by the area 0 Tested , Just because of the area 0 Is the only one. , Will not lead to a loop , Area 0 It is responsible for the transmission between areas and plays an anti ring function .
边栏推荐
- LeetCode第82场双周赛
- 12. Monotonic stack - solve the problems of rainwater connection and the largest rectangle in the histogram
- 1. Self made script language - Chapter 1 Notes
- 【学浪下载教程】04学浪下载之设置注册表,防止中文乱码
- 私域论坛圈子社区小程序开发
- 3. Terminate thread
- Realize all weekly buttons of a year
- 接口测试—校验参数合法性/容错性测试
- Network disk + download method of the first nuscenes dataset in the whole network
- 6. Thread cancellation
猜你喜欢
随机推荐
Eureka Series : High-Speed Web Download Client
单源最短路径
NC20583 [SDOI2016]齿轮
[LeetCode]剑指 Offer 39. 数组中出现次数超过一半的数字
全网首发 nuScenes数据集网盘 + 下载方法
go的命令行库--cobra使用
PSIM simulation model construction of buck circuit (II) (use of transfer function module)
Recently discovered the animation library Lottie
【剑指 Offer II 041. 滑动窗口的平均值】
Horizon 8 测试环境部署(7): App Volumes 部署
World Tour Finals 2019 D - Distinct Boxes 题解
Mental poker revised learning notes
Eventbus is used temporarily
OSPF理论
graph theory
【机器视觉】Canny边缘检测MATLAB源码阅读
Liu tiemeng's introduction to C language - detailed explanation of entrustment
【uniapp-checkbox】修改uniapp-checkbox复选框的样式
MySQL中 8 种常见的 SQL 错误用法
Tree structure in Mina









