当前位置:网站首页>网络设备硬核技术内幕 路由器篇 4 贾宝玉梦游太虚幻境(下)
网络设备硬核技术内幕 路由器篇 4 贾宝玉梦游太虚幻境(下)
2022-07-27 14:06:00 【用户8289326】
上回说到,十二金钗得知了和其他邻居之间的距离,如下图所示:
那么,通过RIP路由协议计算出的最短路径,在加入各节点之间距离的因素后,还是最短路径吗?
让我们先看一个最简化的问题,只看黛玉、湘云、元春和宝钗四个节点:
图中,湘云/宝钗/元春到黛玉的距离(链路开销)分别为2,7,8。她们分别向自己周边的金钗通告这一信息:(LSA通告)
“宝钗,我是湘云,我到黛玉的链路开销为2。”
宝钗收到该信息后,将2加上自己与湘云之间的链路开销5,得到7,并将这一信息记在心底:通过湘云(下一跳),到达黛玉的开销为7。(LSA数据库建立)
很快,每位金钗都生成了自己的LSA数据库:
金钗们各自根据自己LSA数据库,对去黛玉的路径做出了最优的选择,如图所示:
这时,元春发现,通过湘云去黛玉处开销为3,比直连黛玉的开销8要小。本着总开销最小原则,元春选择了经过湘云的路径去黛玉处。
同时,元春向周围(除了湘云以外),也会通告更新的LSA:通过自己到黛玉处,开销为3。
宝钗收到该条信息以后,发现了通往黛玉最快的路径……
以此类推,整网各节点可以迭代计算出了通往黛玉的最佳路由:
很容易看出,宝玉可以通过迎春、李纨、湘云到达黛玉,是最近的路径。
由于以上的算法得到的路径最短,因此,这种路由协议叫做OSPF (Open Shortest Path First)。
我们发现,通过OSPF路由协议得到的最优路径,与RIP路由协议得到的最优路径有一些区别:
RIP得到的最优路径为3跳,而OSPF需要经过4跳。但是,OSPF所经过的路径总开销最小。
OSPF采用的这种算法,是数学家Dijkstra发明的,因此也叫Dijkstra算法。
有了Dijkstra算法,宝玉便可以与黛玉团聚,一起共读《西厢记》了。
宝玉在黛玉耳边说:“你就是那个多愁多病身,我就是那个倾国倾城貌……”
黛玉:“娘炮不要脸,你要和蔡某坤PK吗?”
宝玉惊醒,原来自己是李逍遥,刚才这一切是个梦,身边是婶婶把自己拍醒……
今天的问题:如果有恶意攻击者把攻击设备连入网络并发送OSPF LSA,发布应当通往其他IP地址的路由,干扰网络中路由器运作,怎么样避免这种攻击手段得逞?
昨天遗留问题答案:
宝玉通过迎春和惜春都可以在3跳到达黛玉,那么会选择哪条路径呢?
由于RIP支持等价路径的负载均衡,路由器将会按一定的算法,将数据包均衡地发送到两条链路。
边栏推荐
- How to deploy open source Siyuan privately
- mysql保存数据提示:Out of range value for column错误
- 【云享读书会第13期】视频文件的封装格式
- An example of building 3D effects on the web based on three.js
- See "sense of security" in uncertainty Volvo asked in 2022
- Construction of knowledge map of financial securities and discovery of related stocks from the perspective of knowledge relevance
- Nefu119 combinatorial prime [basic theorem of arithmetic]
- Import the virtual machine officially made by Kali Linux into Oracle VirtualBox
- 代码覆盖率统计神器-jacoco工具实战
- Photo album based on gec6818 development board
猜你喜欢

See "sense of security" in uncertainty Volvo asked in 2022

Graphic SQL of giant image

What if win11 wallpaper turns black? The solution of win11 wallpaper blackening

Redis

【WORK】关于技术架构
![[work] about technical architecture](/img/24/f3402c04157ce9a8846580f017f472.png)
[work] about technical architecture

Chinese character style transfer --- antagonistic discriminative domain adaptation (L1)

Navicate reports an error access violation at address 00000000

Construction of knowledge map of financial securities and discovery of related stocks from the perspective of knowledge relevance

Ten thousand words detailed Google play online application standard package format AAB
随机推荐
Txt replace line breaks with spaces or cancel line breaks
2022年中国网络视频市场年度综合分析
代码覆盖率统计神器-jacoco工具实战
【STM32】EXTI
腾讯二面:@Bean 与 @Component 用在同一个类上,会怎么样?
Confirm the time accuracy of the power supply setting voltage through the i/o function of vn1630/vn7640
Skywalking distributed system application performance monitoring tool - medium
How to do well in enterprise system vulnerability assessment
Differences among CPU, GPU and NPU
@Bean 与 @Component 用在同一个类上,会发生什么?
Web页面table表格,实现快速筛选
Airport cloud business sign analysis
Toward fast, flexible, and robust low light image enhancement cvpr2022
电子制造行业的数字化转型突破点在哪?精益制造是关键
获取Unity打开摄像头第一帧有画面的数据
lc marathon 7.26
Redis
JS epidemic at home, learning can't stop, 7000 word long text to help you thoroughly understand the prototype and prototype chain
Navicate reports an error access violation at address 00000000
[intensive reading of papers] grounded language image pre training (glip)