当前位置:网站首页>【HCIP】BGP 基础
【HCIP】BGP 基础
2022-07-28 01:06:00 【Domeecky】
目录
一、GBP 报文类型
GBP 报文类型:open(协商 BGP 参数),update(交换路由信息),keepalive(保持邻居关系),notification(差错通知),route-refresh(用于改变路由策略后向对等体重新请求路由信息)
二、BGP 状态机
(1)Idle,初始状态,只有经历 Start 事件后,也就是 32 秒后,才会开始建立邻居
(2)Connect,GBP 启动连接重传定时器(32 秒),等待 TCP 连接完成。连接成功,则进入 OpenSent 状态;连接失败,则进入 Active 状态;定时器超时,则停留在该状态尝试与其他对等体建立关系
(3)Active,若邻居建立成功,则进入 OpenSent,若失败,停留在该状态,若定时器超时未收到响应,回到 Connect
(4)OpenSent,若收到的 Open 正确,则发送 Keepalive 报文进入 OpenConfirm,若错误,则发送 Notification 报文,回到 Idle 状态。Open 关键报文内容:My AS(标识自身 AS 区域),Hold Time(默认 180 秒,双方不一致则使用小的),Router ID(自身 RID)。Open 报文中默认携带 3 种协商能力:IPV4 单播路由功能,路由刷新功能,4 字节 AS 号支持能力;地址簇必须要有一种协商成功。
(5)OpenConfirm,在该状态下,BGP 等待回应,若收到 Keepalive 报文,则进入Established 状态,若收到 Notification 报文,则回到 Idle 状态
(6)Established,在该状态下,若收到错误信息,则回到 Idle 状态
三、GBP 邻居建立
默认建立 IBGP 邻居时,TTL = 255;默认建立 EBGP 邻居时,TTL = 1
建立 IBGP 邻居时使用环回口是为了更加稳定
BGP 邻居分为「IBGP 邻居」和「EBGP 邻居」
IBGP 邻居:邻居与自身 AS 号相同
EBGP 邻居:邻居与自身 AS 号不同
四、BGP 路由通告原则
(1)BGP 只会将有效路由中的最优路由进行通告;(*>),* 代表有效,> 代表最优
(2)自身产生的 BGP 路由通告给所有 BGP 邻居
(3)从 IBGP 邻居收到的路由,会传递给 EBGP 邻居,不会传递给 IBGP 邻居(防环)
(4)从 EBGP 邻居收到的路由,会传递给所有 BGP 邻居
(5)BGP 发送路由给 EBGP 时携带自身 AS 号,对方收到后查看其中是否包含自身 AS 号,若包含说明接收过,则不接收,若不包含则接收
(6)从 EBGP 发送给 IBGP 的路由下一跳不会自动修改
五、路由黑洞
路由黑洞可使用 BGP 同步来解决,BGP 同步:从 IBGP 邻居收到的路由需要在自身 IGP 表中存在,才能参加最优路由的选举。
由于 BGP 同步并不能完全解决路由黑洞问题,所以可以使用如下方法:使用全互联、建立 GRE 隧道、建立 LSP 隧道
GRE 隧道:在数据帧头部加上源目 IP
gbp「进程号」
peer「邻居IP」as-number「AS号」
peer「邻居IP」connect-interface「端口」
refresh bgp all export:重新发送路由信息给所有BGP邻居
refresh bgp all import:要求所有BGP邻居给自己重新发送路由信息
peer「IP」next-hop-local:通告路由时修改下一跳,只需在边界设备配置
undo synchronization:关闭BGP同步功能(缺省情况下关闭)
gre隧道:
interface tunnel 0/0/1
tunnel protocol gre
source「源」
destination「目」
ip add「IP」边栏推荐
猜你喜欢

【数据库数据恢复】SQL Server数据库磁盘空间不足的数据恢复案例

Go learning 01

The cooperation between starfish OS and metabell is just the beginning

测试/开发程序员的级别“陷阱“,级别不是衡量单维度的能力......

Xiaomi website homepage big module - small module + navigation (floating case)

Appium 点击操作梳理

C # using ABP warehouse to access the database error record set

uniapp 总结篇 (小程序)

Codeworks round 810 (Div. 2) a~c problem solution

正则表达式
随机推荐
Soft test - database (2) relational model
Class notes (5) (1) - 593. Binary search
MySQL create stored procedure ------ [hy000][1418] this function has none of deterministic, no SQL
uniapp 总结篇 (小程序)
Behind every piece of information you collect, you can't live without TA
Four common post data submission methods
OBS keyboard plug-in custom DIY
Synchronized details
[advanced ROS] Lecture 9 robot model motion based on rviz and arbotix control
The level "trap" of test / development programmers is not a measure of one-dimensional ability
11-Django-基础篇-数据库操作
产品解读丨MeterSphere UI测试模块的设计与分布式扩展
Promise from getting started to mastering (Chapter 3: customize (handwriting) promise)
Appium 点击操作梳理
[机缘参悟-53]:阳谋立身,阴谋防身
[website construction] update SSL certificate with acme.sh: change zerossl to letsencrypt
【愚公系列】2022年07月 Tabby集成终端的使用
学会这招再也不怕手误让代码崩掉
Flex layout - fixed positioning + flow layout - main axis alignment - side axis alignment - expansion ratio
Flex layout learning completed on PC side