当前位置:网站首页>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上完成聚合
完成后可查看路由表
可以看到路由条目大大减少
最后可以进行测试
可以看到每个环回之间互通
边栏推荐
- OpenShift 4 - Deploy Redis Cluster with Operator
- R语言的画图代码及差异性分析[通俗易懂]
- OpenShift 4 - Customize RHACS security policies to prevent production clusters from using high-risk registry
- 安装Xshell并使用其进行Ymodem协议的串口传输
- WeChat chat record search in a red envelope
- The R language ggstatsplot package ggbarstats function visualizes bar charts, and adds hypothesis test results (including sample number, statistics, effect size and its confidence interval, significan
- 7. Summary of common interview questions
- 基于最小二乘法和SVM从天气预报中预测太阳能发电量(Matlab代码实现)
- 浏览器自带的拾色器
- Linux查看redis版本(查看mongodb版本)
猜你喜欢
Why don't you make a confession during the graduation season?
Ubantu project 4: xshell, XFTP connected the virtual machine and set xshell copy and paste the shortcut
深入浅出边缘云 | 4. 生命周期管理
RecyclerView的高效使用第一节
模板与泛型编程值typelist实现
Introductory UnityShader learning (2) - the rendering pipeline
NC | 斯坦福申小涛等开发数据可重复分析计算框架TidyMass
STM32(十)------- SPI通信
自适应控制——仿真实验三 用超稳定性理论设计模型参考自适应系统
Essential Learning for Getting Started with Unity Shader - Transparency Effect
随机推荐
TRACE32——常用操作
How useful is four-quadrant time management?
R语言计算时间序列数据的移动平均值(滚动平均值、例如5日均线、10日均线等):使用zoo包中的rollmean函数计算k个周期移动平均值
使用 Chainlink Keepers 实现智能合约函数的自动化执行
Synchronized and volatile interview brief summary
R language ggplot2 visualization: use the ggboxplot function of the ggpubr package to visualize the grouped box plot, use the ggpar function to change the graphical parameters (caption, add, modify th
Getting started with UnityShader (3) - Unity's Shader
Efficient use of RecyclerView Section 2
分成两栏后文字顺序混乱的问题解决【写期刊论文时】
Excel快速对齐表格的中姓名(两个字姓名和三个字姓名对齐)
Getting Started with TextBlock Control Basic Tools Usage, Get Started
vb中如何连接mysql_vb怎么连接数据库「建议收藏」
工程流体力学复习
R语言ggplot2可视化:使用ggpubr包的ggboxplot函数可视化箱图、使用font函数自定义图例标题文本(legend.title)字体的大小、颜色、样式(粗体、斜体)
删除 状态良好(恢复分区)的磁盘
WPF project - basic usage of controls entry, you must know XAML
模板与泛型编程值typelist实现
R language ggplot2 visualization: use the ggboxplot function of the ggpubr package to visualize the box plot, use the font function to customize the font size, color, style (bold, italic) of the legen
深入浅出边缘云 | 4. 生命周期管理
SQL、HQL、JPQL 到底有什么区别