当前位置:网站首页>BGP的基础配置---建立对等体、路由宣告
BGP的基础配置---建立对等体、路由宣告
2022-07-29 03:50:00 【不大聪明¿】
实验要求

IGP的配置
首先选一种IGP协议保证AS2内部互通,这里采用OSPF。在此之前要完成所有设备的IP配置,如今已经资深多天,在此就不多做展示。
在对R2、R3、R4进行OSPF配置后,查看它们每个的路由表是否补齐



BGP建立对等体
这里我们采用环回接口建邻,所以先要书写静态路由保证环回接口能通
[R1]ip route-static 2.2.2.0 24 12.1.1.2
[R2]ip route-static 1.1.1.0 24 12.1.1.1
用两者环回进行测试

在开始建邻---EBGP之间
R1

[R1]bgp 1
[R1-bgp]router-id 1.1.1.1
[R1-bgp]peer 2.2.2.2 as-number 2 (指对端的ip地址与所在as号)
[R1-bgp]peer 2.2.2.2 ebgp-max-hop 2(BGP规定EBGP邻居间默认所有的BGP数据包TTL值为1,导致环回建立邻居关系服务缺少跳数,所以修改跳数到够用,这里设置2)
[R1-bgp]peer 2.2.2.2 connect-interface LoopBack 0 (目标为环回接口)
R2

[R2]bgp 2
[R2-bgp]router-id 2.2.2.2
[R2-bgp]peer 1.1.1.1 as-number 1
[R2-bgp]peer 1.1.1.1 ebgp-max-hop 2
[R2-bgp]peer 1.1.1.1 connect-interface LoopBack 0
完成后可以产看TCP的状态以及邻居表

可以看到TCP的179端口状态已经为 Established

R1的邻居表中也有R2
同理完成R2、R3、R4相互之间 R4、R5相互之间的对等体建立,在R2、R3、R4之间建立时不需要修改跳数
BGP的宣告
以R1为例

[R1]bgp 1
[R1-bgp]network 11.1.1.0 24
在2、3上进行查看路由表
R2

R3

可以发现R2上是优而R3上是不优,这是由于BGP的AS-BY-AS所导致 ,要进行修改

[R2]bgp 2
[R2-bgp]peer 3.3.3.3 next-hop-local将BGP路由传输给邻居3.3.3.3时修改下一跳属性为本地(2.2.2.2)
此时再查看R3的路由表

可以发现已经变为优
R4要想变为优则需同样操作,同理当宣告R5的环回时则需要在R4上进行修改
最后在R2、R3、R4宣告各自环回,每个环回就可以去所有的AS自治系统
测试:用R1的环回ping R5的环回

边栏推荐
- Opensql quick learning
- Let variable declaration feature of ES6 new feature and its case
- RHCE's at, crontab's basic operations, the Chrony service, symmetric encryption and asymmetric encryption
- 1. Header file - Comment - namespace - standard input / output stream
- I. creation and constraint of MySQL table
- 5年多工作经验,工资给15k,要是你,你会接受吗?
- LDP --- 标签分发协议
- 2. 变量及作用域
- 路西法98-生活记录ing
- Raft protocol - process demonstration
猜你喜欢

(codeforce547)C-Mike and Foam(质因子+容斥原理)

Shutter start white screen

Uni app internationalization

Cloudera manager platform fault repair record

内连接和左连接简单案例

SQL window function

LDP --- 标签分发协议

1. Mx6u driver development-2-led driver

The digitalization of the consumer industry is upgraded to "rigid demand", and weiit's new retail SaaS empowers enterprises!

Solve the problem of garbled code when opening the project code in idea
随机推荐
MOS tube - rapid recovery application notes (II) [parameters and applications]
LVS+KeepAlived高可用部署实战应用
消费行业数字化升级成 “刚需”,weiit 新零售 SaaS 为企业赋能!
SSL==证书相关概念
What you see and think in Microsoft
tron OUT_ OF_ ENERGY
LDP --- 标签分发协议
代码 ~ 隐藏或禁用状态栏和虚拟按键
The function parameters of the new features of ES6 are assigned initial values and rest parameters
Code ~ hide or disable the status bar and virtual keys
RHCE's at, crontab's basic operations, the Chrony service, symmetric encryption and asymmetric encryption
Connect with third-party QQ login
Microcomputer principle and interface technology
Analysis of new retail o2o e-commerce model
(newcoder 15079)无关(容斥原理)
@Configuration (proxybeanmethods = false) what's the use of setting this to false
Arrow function of new features of ES6
Meeting notice of OA project (Query & whether to attend the meeting & feedback details)
(nowcoder22529C)dinner(容斥原理+排列组合)
(2022杭电多校三)1002-Boss Rush(状压DP+二分)