当前位置:网站首页>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状态。
边栏推荐
- 经典文献阅读之--SuMa++
- Stc8h8k Series Assembly and c51 Real combat - NIXIE TUBE displays ADC, Key Series port reply Key number and ADC value
- JWT tool class
- 492. Construction rectangle
- Contest3145 - the 37th game of 2021 freshman individual training match_ H: Eat fish
- ZABBIX server trap command injection vulnerability (cve-2017-2824)
- 492.构造矩形
- LeetCode 39. 组合总和
- 数据库学习总结5
- PHP development and testing WebService (soap) -win
猜你喜欢

数据回放伴侣Rviz+plotjuggler

uni-app开发中遇到的问题(持续更新)

Keepalived installation, use and quick start

脑与认知神经科学Matlab Psytoolbox认知科学实验设计——实验设计四

Step by step | help you easily submit Google play data security form

Current situation analysis of Devops and noops

Comment utiliser mitmproxy

Eco express micro engine system has supported one click deployment to cloud hosting

Google play academy team PK competition, official start!

TI毫米波雷达学习(一)
随机推荐
Stc8h8k series assembly and C51 actual combat - keys allow key counting (using falling edge interrupt control)
Stick to the big screen UI, finereport development diary
500. 键盘行
Contest3147 - game 38 of 2021 Freshmen's personal training match_ E: Listen to songs and know music
Replace Django database with MySQL (attributeerror: 'STR' object has no attribute 'decode')
Picture clipping plug-in cropper js
Contest3147 - game 38 of 2021 Freshmen's personal training match_ G: Flower bed
Mathematical statistics and machine learning
PHP parent
Lucene Basics
Stc8h8k Series Assembly and c51 Real combat - NIXIE TUBE displays ADC, Key Series port reply Key number and ADC value
token过期自动续费方案和实现
ROS2----LifecycleNode生命周期节点总结
Little bear sect manual query and ADC in-depth study
来自读者们的 I/O 观后感|有奖征集获奖名单
Happy Lantern Festival | Qiming cloud invites you to guess lantern riddles
Redis Key-Value数据库【初级】
Stc8h8k series assembly and C51 actual combat - serial port sending menu interface to select different functions
PHP array to XML
Database learning summary 5