当前位置:网站首页>BGP中的状态机
BGP中的状态机
2022-07-02 06:08:00 【火锅就要吃红锅】
BGP状态机
Idle 初始状态
BGP协议初始时是处于Idle状态,开始准备TCP的连接并监视远程对等体。在这个状态时,系统不分配任何资源,也拒绝所有进入的BGP连接。只有收到Start Event时,才分配BGP资源,启动ConnectRetry计时器,启动对其它BGP对等体的传输层连接,同时也侦听是否有来自其它对等体的连接请求。Connect Retry 计时器会呈现级数级的增加
Connect 连接状态
这个状态下BGP等待TCP完成连接,再决定后续动作:
- 若连接成功,本地清空ConnectRetry计时器,并向对等体发送OPEN报文,然后状态改变为OpenSent状态;
- 连接失败,BGP会继续侦听邻居发出的连接,重置 Connect Retry 计时器并将自己状态转移到 Active 状态
- Connect Retry时间超时,重置ConnectRetry计时器,再次试图与邻居建立TCP连接,BGP 保持 Connect 状态,出现其他事件转 入 Idle 状态。
Active 激活状态
正在进行TCP连接,等待完成中,认证都是在TCP建立期间完成的。
- 如果 TCP 连接成功,BGP 将 Connect Retry 计时器清零,完成初始化,给邻居发送Open 消息并将状态置为 Open,hold 时间置为4mins 。
- 如果在 Active 状态,Connect Retry计时器超时回 Connect 状态并重置 Connect Retry 计时器。
- 如果试图与一个未知 IP 建立 TCP 会话,同时 Connect Retry 计时器重置,拒绝连接并保持 Active 状态。
- 任何一个事件都会导致重回 Idle
OpenSent 参数协商状态
在此状态,TCP连接已经建立成功,开始先邻居发送Open消息包,同时BGP等待邻居发送的 open 消息包;Open包携带参数协商对等体的建立。
- 收到open消息,如果发现有差错,将给邻居发送一个 notification 消息并将状态置为 Idle 。
- 如果收到 open 包消息没错,将发送 keeplive 包给邻居,并建立IBGP或者EBGP状态置为 Open confire state 。
- 如果收到TCP断开消息则断开BGP连接重置 Connect Retry 计时器,状态置为 Active 。
OpenConfirm 参数验证状态
这个状态下,参数、能力特性协商成功,自己发送Keepalive包,BGP等待KEEPALIVE或NOTIFICATION报文。如果收到KEEPALIVE报文,则进入Established状态,如果收到NOTIFICATION报文,则变为Idle状态。
- 如果收到一个 keeplive 消息包,会将状态置为 Establish 。
- 如果收到 notification 消息包,会将状态置为 Idle 并断开 TCP 连接。
- 如果 hold 计时器超时,检测到一个差错或者有 stop 事件发生,BGP 将给邻居发送一个 notification 并断开连接,之后状态置为 Idle 。
Established 建立成功
这个状态下, **已经收到对方的Keepalive包,双方能力特性经协商发现一致,**BGP可以和其他对等体交换UPDATE,NOTIFICATION,KEEPALIVE报文。
- 如果收到了正确的UPDATE或KEEPALIVE报文,就认为对端处于正常运行状态,本地重置Hold Timer。
- 如果收到NOTIFICATION报文,本地转到Idle状态。
- 如果收到错误的UPDATE报文,本地发送NOTIFICATION报文通知对端,并改变本地状态为Idle。
- 如果收到了TCP拆链通知,本地关闭BGP连接,并回到Idle状态。
边栏推荐
- Database learning summary 5
- 图片裁剪插件cropper.js
- Regular expression summary
- Deep learning classification network -- alexnet
- 让每一位开发者皆可使用机器学习技术
- 51 single chip microcomputer - ADC explanation (a/d conversion, d/a conversion)
- STC8H8K系列匯編和C51實戰——數碼管顯示ADC、按鍵串口回複按鍵號與ADC數值
- Page printing plug-in print js
- Format check JS
- Classic literature reading -- deformable Detr
猜你喜欢
Brain and cognitive neuroscience matlab psychoolbox cognitive science experimental design - experimental design 4
Introduce uview into uni app
Data playback partner rviz+plotjuggler
Fundamentals of software testing
让每一位开发者皆可使用机器学习技术
ES6的详细注解
Test case
Reading classic literature -- Suma++
Sumo tutorial Hello World
神机百炼3.54-染色法判定二分图
随机推荐
图片裁剪插件cropper.js
Error creating bean with name 'instanceoperatorclientimpl' defined in URL when Nacos starts
Verifying downloaded files using sha256 files
PHP development and testing WebService (soap) -win
Happy Lantern Festival | Qiming cloud invites you to guess lantern riddles
PHP array to XML
格式校验js
ESP8266与STC8H8K单片机联动——天气时钟
Scheme and implementation of automatic renewal of token expiration
Little bear sect manual query and ADC in-depth study
Stc8h8k series assembly and C51 actual combat - serial port sending menu interface to select different functions
Classic literature reading -- deformable Detr
Web page user step-by-step operation guide plug-in driver js
STC8H8K系列匯編和C51實戰——數碼管顯示ADC、按鍵串口回複按鍵號與ADC數值
Web页面用户分步操作引导插件driver.js
Servlet web XML configuration details (3.0)
数据回放伴侣Rviz+plotjuggler
Google play academy team PK competition, official start!
Ros2 --- lifecycle node summary
AttributeError: ‘str‘ object has no attribute ‘decode‘