首页 > 其他分享 >OSPF GR(第14个实验)

OSPF GR(第14个实验)

时间:2023-12-27 17:33:15浏览次数:43  
标签:1.1 ttl 56 bytes 192.168 ms 14 OSPF GR

1、GR的作用

技术保证了设备再重启过程中转发层面能过继续知道数据转发,同时控制层面邻居关系的重建以及路由计算等动作不会影像转发层面的功能,从而避免了路由震荡引发的业务中断,保证了关键业务的数据转发,提高了整个网络的可靠性。

2、GR增加了Type9 Opaque LSA

OSPF GR(第14个实验)_Grace

关键参数(TLV类型 Type length value)

1)Grace Period TLV:type=1,长度为4字节,表示邻居设备进入GR helper处理流程的最长保持时间。如果超过这段时间GR Restarter还没有完成GR处理流程,则周边邻居不再担任GR helper角色【必须携带】

2)Graceful Restart Reason TLV:type=2,长度为1字节,告知邻居设备GR Restarter的重启原因【必须携带】 

  • value =0,表示原因未知
  • value=1,表示软件重启
  • value=2,表示软件重新加载(升级)
  • value=3,表示GR Restarter进行主备倒换

3)IP Interface address TLV:Type=3,长度为4字节,用来告知发送Grace LSA的接口的ip地址,在网络上需要用该IP地址来唯一标识一台重启设备

3、GR工作工程

OSPF GR(第14个实验)_ci_02

1)第一步:Grace-LSA包含的主要参数,Grace Period TLV(重启的周期1-1800s)、Graceful Restart Reason TLV(重启的原因)、IP Interface address TLV(谁要重启)

2)第二步:GR Helper回复GR Restarter LSACK,告诉对方我能支持你平滑重启

3)第三步:设备主备倒换完成,备板正常up后,发送Grace-LSAs(联系发5次),进入优雅模式,二者之间保持FIB(数据转发层面)

4)当优雅重启完成后,GR Helper将协商Graceful Restart,同步lsdb

5)正常退出优雅重启,Graceful Restart向GR Helper发送一条命令“flush Grace-LSAs”,设置age=3600s(LSA的死亡周期)

4、Grace Restarter实例

OSPF GR(第14个实验)_Grace_03

5、核心配置

1)同一个网络中的三层设备都需要配置grace restarter

2)ospf 进程下配置

使能LSA-9

命令:opaque-capability enable

配置grace restarter的周期

graceful-restart period 180//单位时S

6、详细配置

R1:

<r1>display current-configuration  

[V200R003C00]

#

sysname r1

#

snmp-agent local-engineid 800007DB03000000000000

snmp-agent  

#

clock timezone China-Standard-Time minus 08:00:00

#

portal local-server load portalpage.zip

#

drop illegal-mac alarm

#

set cpu-usage threshold 80 restore 75

#

aaa  

authentication-scheme default

authorization-scheme default

accounting-scheme default

domain default  

domain default_admin  

local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$

local-user admin service-type http

#

firewall zone Local

priority 15

#

interface GigabitEthernet0/0/0

ip address 10.1.1.1 255.255.255.0  

#

interface GigabitEthernet0/0/1

#

interface GigabitEthernet0/0/2

#

interface NULL0

#

interface LoopBack0

ip address 1.1.1.1 255.255.255.255  

#

ospf 100 router-id 1.1.1.1  

opaque-capability enable

graceful-restart period 180  

area 0.0.0.0  

 network 10.1.1.0 0.0.0.255  

#

user-interface con 0

authentication-mode password

idle-timeout 0 0

user-interface vty 0 4

user-interface vty 16 20

#

wlan ac

#

return

<r1>

R2:

<r2>display current-configuration  

[V200R003C00]

#

sysname r2

#

snmp-agent local-engineid 800007DB03000000000000

snmp-agent  

#

clock timezone China-Standard-Time minus 08:00:00

#

portal local-server load portalpage.zip

#

drop illegal-mac alarm

#

set cpu-usage threshold 80 restore 75

#

aaa  

authentication-scheme default

authorization-scheme default

accounting-scheme default

domain default  

domain default_admin  

local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$

local-user admin service-type http

#

firewall zone Local

priority 15

#

interface GigabitEthernet0/0/0

ip address 10.1.1.2 255.255.255.0  

#

interface GigabitEthernet0/0/1

ip address 20.1.1.1 255.255.255.0  

#

interface GigabitEthernet0/0/2

#

interface NULL0

#

interface LoopBack0

ip address 2.2.2.2 255.255.255.255  

#

ospf 100 router-id 2.2.2.2  

opaque-capability enable

graceful-restart period 180  

area 0.0.0.0  

 network 10.1.1.0 0.0.0.255  

area 0.0.0.1  

 network 20.1.1.0 0.0.0.255  

#

user-interface con 0

authentication-mode password

idle-timeout 0 0

user-interface vty 0 4

user-interface vty 16 20

#

wlan ac

#

return

<r2>

R3:

<r3>display current-configuration  

[V200R003C00]

#

sysname r3

#

snmp-agent local-engineid 800007DB03000000000000

snmp-agent  

#

clock timezone China-Standard-Time minus 08:00:00

#

portal local-server load portalpage.zip

#

drop illegal-mac alarm

#

set cpu-usage threshold 80 restore 75

#

aaa  

authentication-scheme default

authorization-scheme default

accounting-scheme default

domain default  

domain default_admin  

local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$

local-user admin service-type http

#

firewall zone Local

priority 15

#

interface GigabitEthernet0/0/0

ip address 20.1.1.2 255.255.255.0  

#

interface GigabitEthernet0/0/1

#

interface GigabitEthernet0/0/2

#

interface NULL0

#

interface LoopBack0

ip address 3.3.3.3 255.255.255.255  

#

interface LoopBack1

ip address 192.168.1.1 255.255.255.0  

#

ospf 100 router-id 3.3.3.3  

opaque-capability enable

graceful-restart period 180  

area 0.0.0.1  

 network 20.1.1.0 0.0.0.255  

 network 192.168.1.0 0.0.0.255  

#

user-interface con 0

authentication-mode password

idle-timeout 0 0

user-interface vty 0 4

user-interface vty 16 20

#

wlan ac

#

return

<r3>

7、实验结果

执行了:reset opsf process grace-restarter

<r1>ping -c 100 192.168.1.1

 PING 192.168.1.1: 56  data bytes, press CTRL_C to break

   Reply from 192.168.1.1: bytes=56 Sequence=1 ttl=254 time=60 ms

   Reply from 192.168.1.1: bytes=56 Sequence=2 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=3 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=4 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=5 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=6 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=7 ttl=254 time=40 ms

   Reply from 192.168.1.1: bytes=56 Sequence=8 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=9 ttl=254 time=40 ms

   Reply from 192.168.1.1: bytes=56 Sequence=10 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=11 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=12 ttl=254 time=40 ms

   Reply from 192.168.1.1: bytes=56 Sequence=13 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=14 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=15 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=16 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=17 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=18 ttl=254 time=40 ms

   Reply from 192.168.1.1: bytes=56 Sequence=19 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=20 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=21 ttl=254 time=40 ms

   Reply from 192.168.1.1: bytes=56 Sequence=22 ttl=254 time=10 ms

   Reply from 192.168.1.1: bytes=56 Sequence=23 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=24 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=25 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=26 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=27 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=28 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=29 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=30 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=31 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=32 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=33 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=34 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=35 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=36 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=37 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=38 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=39 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=40 ttl=254 time=40 ms

   Reply from 192.168.1.1: bytes=56 Sequence=41 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=42 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=43 ttl=254 time=40 ms

   Reply from 192.168.1.1: bytes=56 Sequence=44 ttl=254 time=40 ms

   Reply from 192.168.1.1: bytes=56 Sequence=45 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=46 ttl=254 time=40 ms

   Reply from 192.168.1.1: bytes=56 Sequence=47 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=48 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=49 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=50 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=51 ttl=254 time=10 ms

   Reply from 192.168.1.1: bytes=56 Sequence=52 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=53 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=54 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=55 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=56 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=57 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=58 ttl=254 time=40 ms

   Reply from 192.168.1.1: bytes=56 Sequence=59 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=60 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=61 ttl=254 time=30 ms

Dec 27 2023 17:06:18-08:00 r1 %%01OSPF/4/RECV_FIRST_GLSA(l)[28]:OSPF 25600 attem

pted to enter helper mode and received first grace LSA from neighbor 2.2.2.2, on

interface 1.1.1.10.  

<r1>

Dec 27 2023 17:06:18-08:00 r1 %%01OSPF/4/ENTER_HELPER_MODE(l)[29]:OSPF 25600 nei

ghbor 2.2.2.2 enters helper on interface 1.1.1.10.  

<r1>

   Reply from 192.168.1.1: bytes=56 Sequence=62 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=63 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=64 ttl=254 time=20 ms

Dec 27 2023 17:06:19-08:00 r1 %%01OSPF/3/NBR_DOWN_REASON(l)[30]:Neighbor state l

eaves full or changed to Down. (ProcessId=25600, NeighborRouterId=2.2.2.2, Neigh

borAreaId=0, NeighborInterface=GigabitEthernet0/0/0,NeighborDownImmediate reason

=Neighbor Down Due to SequenceNum Mismatch, NeighborDownPrimeReason=M,I,MS bit o

r SequenceNum Incorrect, NeighborChangeTime=2023-12-27 17:06:19-08:00)  

<r1>

Dec 27 2023 17:06:19-08:00 r1 %%01OSPF/4/NBR_CHANGE_E(l)[31]:Neighbor changes ev

ent: neighbor status changed. (ProcessId=25600, NeighborAddress=2.1.1.10, Neighb

orEvent=SeqNumberMismatch, NeighborPreviousState=Full, NeighborCurrentState=ExSt

art)  

<r1>

   Reply from 192.168.1.1: bytes=56 Sequence=65 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=66 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=67 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=68 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=69 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=70 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=71 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=72 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=73 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=74 ttl=254 time=30 ms

Dec 27 2023 17:06:24-08:00 r1 %%01OSPF/4/NBR_CHANGE_E(l)[32]:Neighbor changes ev

ent: neighbor status changed. (ProcessId=25600, NeighborAddress=2.1.1.10, Neighb

orEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exc

hange)  

<r1>

Dec 27 2023 17:06:24-08:00 r1 %%01OSPF/4/NBR_CHANGE_E(l)[33]:Neighbor changes ev

ent: neighbor status changed. (ProcessId=25600, NeighborAddress=2.1.1.10, Neighb

orEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loadi

ng)  

<r1>

Dec 27 2023 17:06:24-08:00 r1 %%01OSPF/4/NBR_CHANGE_E(l)[34]:Neighbor changes ev

ent: neighbor status changed. (ProcessId=25600, NeighborAddress=2.1.1.10, Neighb

orEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full)  

<r1>

   Reply from 192.168.1.1: bytes=56 Sequence=75 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=76 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=77 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=78 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=79 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=80 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=81 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=82 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=83 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=84 ttl=254 time=20 ms

Dec 27 2023 17:06:30-08:00 r1 %%01OSPF/4/GR_EXIT_HLP_SU(l)[35]:OSPF 25600 neighb

or 2.2.2.2 exits helper successfully on interface 1.1.1.10.  

<r1>

   Reply from 192.168.1.1: bytes=56 Sequence=85 ttl=254 time=40 ms

   Reply from 192.168.1.1: bytes=56 Sequence=86 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=87 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=88 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=89 ttl=254 time=20 ms

   Reply from 192.168.1.1: bytes=56 Sequence=90 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=91 ttl=254 time=40 ms

   Reply from 192.168.1.1: bytes=56 Sequence=92 ttl=254 time=40 ms

   Reply from 192.168.1.1: bytes=56 Sequence=93 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=94 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=95 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=96 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=97 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=98 ttl=254 time=40 ms

   Reply from 192.168.1.1: bytes=56 Sequence=99 ttl=254 time=30 ms

   Reply from 192.168.1.1: bytes=56 Sequence=100 ttl=254 time=30 ms


 --- 192.168.1.1 ping statistics ---

   100 packet(s) transmitted

   100 packet(s) received

   0.00% packet loss

   round-trip min/avg/max = 10/28/60 ms


<r1>

标签:1.1,ttl,56,bytes,192.168,ms,14,OSPF,GR
From: https://blog.51cto.com/u_13560030/9002310

相关文章

  • Generalised f-Mean Aggregation for Graph Neural Networks
    目录概符号说明GenAgg代码KortvelesyR.,MoradS.andProrokA.Generalisedf-meanaggregationforgraphneuralnetworks.NIPS,2023.概基于MPNN架构的GNN主要在于aggregator和updatefunction两部分,一般来说后者是参数化的主要方式.本文提出一种新的参数......
  • 行处理工具grep,cut,uniq,tee,diff,paste,tr使用说明
    行处理工具grep:用于查找文件里符合条件的字符串或正则表达式。grep指令用于查找内容包含指定的范本样式的文件,如果发现某文件的内容符合所指定的范本样式,预设grep指令会把含有范本样式的那一列显示出来。若不指定任何文件名称,或是所给予的文件名为-,则grep指令会从标准输入......
  • 14-Mysql主从复制
    一、mysql复制原理1.1主从复制原理过程从库的I/Othread线程会读取masterinfo文件获取主库的user,passwordport信息然后还会获取上次获取主库二进制日志的位置如3640就是00003这个文件640这个位置,主库收到从库的请求后,会验证用户名密码等的合法性,然后问主库你有没有......
  • 14通道自动灵敏度校准低功耗电容触摸传感器芯片Si314
    刷卡解锁、一步开门、远程监测、遇到风险自动宣布警报、智能联动等人们关于门锁各种看似遥不可及的梦想,因为智能锁的呈现一一变成实际。由于智能门锁的不断进化,人们关于智能家居也有了更多梦想和期待。将触摸屏引入智能门锁交互,让用户在智能锁的体会上更安全、更便利、更个性化。......
  • 2.3T NPU强势登场!NXP i.MX 8M Plus开启工业新篇章,14纳米!
            更多产品详情以及购买咨询可添加如下客服人员微信 (即刻添加,马上咨询) 更多i.MX8MPlus产品资料可长按二维码识别下载如需选购,请登录创龙科技天猫旗舰店:tronlong.tmall.com!欢迎加入i.MX8MPlus技术交流群:1064661665......
  • 14.并列句-考点分析-长难句分析
    长难句分析——在分析长难句的时候只要见到有并列连词的出现通常会有省略;分析长难句第二步找连词,翻译把省略补齐在翻译。但是当连词连接2个单词时当做每看见。eg.Iwasbeatenandyou(werebeaten是省略的部分).如何查找省略的内容呢?——一句话只要有省略,就一定省略在连......
  • PostgreSQL数据库中插入数据并跳过重复记录
    概述:ONCONFLICT是将新数据插入现有表时处理唯一性冲突的一种方式快速预览1.DOUPDATESET:重复则更新2.DONOTHING:重复则跳过先创建表t_daily_stats、并且主键字段由serial_no、date组成,以及其他字段--创建设备每日统计表CREATETABLEt_daily_stats(seri......
  • Django 报错(You have 18 unapplied migration(s))
    pythonmanage.pyrunserver0.0.0.0:8000时报错:Youhave18unappliedmigration(s).Yourprojectmaynotworkproperlyuntilyouapplythemigrationsforapp(s):admin,auth,contenttypes,sessions.Run'pythonmanage.pymigrate'toapplythem.说明之前有......
  • 14-STM32F103+ESP8266+EC800K(移远4G Cat1)--STM32+EC800K以SSL单向认证方式连接MQTT
    <p><iframename="ifd"src="https://mnifdv.cn/resource/cnblogs/ZLIOTB/EC800K/my.html"frameborder="0"scrolling="auto"width="100%"height="1500"></iframe></p>  说明安装的M......
  • ARC105E Keep Graph Disconnected 题解
    ARC105E正向考虑是很难的,从结果入手,发现最后一定是分别包含\(1\),\(n\)的两个完全图。考虑表示出这两个人一共加了多少边:\(\frac{n(n-1)}{2}-m-x(n-x)\),\(x\)表示点\(1\)所在集合的大小。由于是判断先手还是后手必胜,所以只需看结果对\(2\)的余数,于是对\(n\)的奇偶进行......