当前位置:网站首页>BGP综合实验(建立对等体、路由反射器、联邦、路由宣告及聚合)
BGP综合实验(建立对等体、路由反射器、联邦、路由宣告及聚合)
2022-07-31 15:17:00 【不大聪明¿】
目录
实验要求:

实验拓扑的搭建及IP地址的划分
首先实验要求AS2网段地址基于172.16.0.0/16划分,此网段很大,我们可以随意的划,怎么舒服怎么来,但是要保证合理可行尽量提高利用率,减少地址浪费。

上图是搭建好的拓扑及划分的地址,其中“/30”的用与骨干链路和建立对等体的环回接口,“/24”的模拟用户网段
然后按照划分的IP进行环回接口以及物理接口的IP配置
IGP的配置
在BGP对等体建立之前,要保证AS2内部互通,此处采用OSPF协议
以R2为例

[R2]ospf 1
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 172.16.0.1 0.0.0.0
[R2-ospf-1-area-0.0.0.0] network 172.16.0.9 0.0.0.0
[R2-ospf-1-area-0.0.0.0] network 172.16.1.1 0.0.0.0[R2-ospf-1-area-0.0.0.0] network 172.16.2.1 0.0.0.0
同理完成AS2内部其他路由器配置,完成后查看路由表,并进行检测,保证AS2内部全网可达

对等体的建立
EBGP之间
EBGP之间采用直连建邻,直接用物理接口建立对等体
以R1、R2为例

[R1]bgp 1
[R1-bgp] peer 12.1.1.2 as-number 2 (对方的物理接口IP及AS号)
同理完成R2及R7与R8上的配置
IBGP之间
实验要求:R2、R3、R4为一个联邦,R5、R6、R7之间为一个联邦
以R2为例

[R2]bgp 64512 (私有编号)
[R2-bgp] confederation id 2 (声明大的AS编号)
[R2-bgp] peer 12.1.1.1 as-number 1
[R2-bgp] peer 172.16.1.5 as-number 64512
[R2-bgp] peer 172.16.1.5 connect-interface LoopBack0[R2-bgp] peer 172.16.1.5 next-hop-local
同理完成剩余路由器配置
反射器---打破IBGP之间的水平分割
根据当前拓扑在R3与R6上配置反射器
以R3为例

[R3]bgp 64512
[R3-bgp]peer 172.16.1.1 reflect-client该指令的作用,是让172.16.1.1成为本地的客户端,同时本地成为路由反射器
同理完成R6
联邦之间建邻
[r4-bgp]peer 172.16.1.21 as-number 64513
[r4-bgp]peer 172.16.1.21 ebgp-max-hop 2
[r4-bgp]peer 172.16.1.21 connect-interface LoopBack0[r4-bgp]confederation peer-as 64512
在对端同样配置即可
宣告路由
AS1与AS3可以直接宣告R1与R8的环回

[R1]bgp 1
[R1-bgp]network 1.1.1.0 24

[R8]bgp 3
[R8-bgp]network 8.8.8.0 24
AS2的宣告可以在R2与R7上采用重发布的方式

[R2]bgp 64512
[R2-bgp]import-route ospf 1

[R7]bgp 64513
[R7-bgp]import-route ospf 1
为了防止出现选路不佳 ,将AS2中的所有环回接口的工作类型修改为broadcast
[R3-LoopBack0]ospf network-type broadcast
完成后可以在R1或在R8上查看

可以看到AS2内部的所有路由以及R8的环回
路由聚合
我们可以将AS2内部的路由手工聚合来减少路由条目

[R2]bgp 64512
[R2-bgp]aggregate 172.16.0.0 16 detail-suppressed (仅发送聚合条目,不转发明细条目)
同理在R7上完成聚合
完成后可查看路由表

可以看到路由条目大大减少
最后可以进行测试

可以看到每个环回之间互通
边栏推荐
- [MySQL] Mysql paradigm and the role of foreign keys
- svn安装及使用(身体功能手册)
- 安装Xshell并使用其进行Ymodem协议的串口传输
- charles进行弱网测试(app弱网测试怎么做)
- OpenShift 4 - Deploy Redis Cluster with Operator
- Doing things software development - the importance of law and understanding of reasonable conclusions
- Deployment应用生命周期与Pod健康检查
- radiobutton的使用
- 大健云仓冲刺美股:增营收反减利润 京东与DCM是股东
- R语言的画图代码及差异性分析[通俗易懂]
猜你喜欢

The meaning of node_exporter performance monitoring information collection in Prometheus

The use of border controls

看交互设计如何集成到Scrum敏捷流程中

学习笔记12--路径-速度分解法之局部路径搜索

WPF项目--控件入门基础用法,必知必会XAML

Synchronized and volatile interview brief summary

TRACE32 - Common Operations

浏览器自带的拾色器

DBeaver连接MySQL 8.x时Public Key Retrieval is not allowed 错误解决

leetcode303 Weekly Match Replay
随机推荐
R language moves time series data forward or backward (custom lag or lead period): use the lag function in the dplyr package to move the time series data forward by one day (set the parameter n to a p
Gorm—Go语言数据库框架
数据表插入数据insert into
435. 无重叠区间
Getting started with UnityShader (1) - GPU and Shader
腾讯云部署----DevOps
Ubuntu Topic 5: Setting a Static IP Address
ASP.NET Core 产生连续 Guid
Synchronized and volatile interview brief summary
what exactly is json (c# json)
分成两栏后文字顺序混乱的问题解决【写期刊论文时】
Public Key Retrieval is not allowed error solution when DBeaver connects to MySQL 8.x
谷歌CTS测试(cta测试)
11 pinia use
Gorm—Go language database framework
【MySQL】Mysql范式及外键作用
Why don't you make a confession during the graduation season?
TRACE32 - C source code association
修改SQL语言实现Mysql 多表关联查询优化
基于极限学习机(ELM)进行多变量用电量预测(Matlab代码实现)