当前位置:网站首页>BGP综合实验 建立对等体、路由反射器、联邦、路由宣告及聚合
BGP综合实验 建立对等体、路由反射器、联邦、路由宣告及聚合
2022-08-02 00:13:00 【愤愤的卷毛】
完成下图实验:

规划拓扑 基于172.16.0.0 划分as2的网段
由于as2的网段较大所以 我们可以将建临的环回接口都划分为32位掩码的ip地址,将用户环回网段划分为24位掩码的ip地址,骨干链路的网段划分为20位掩码的IP地址。
如下图所示:

配置各个接口的IP地址
我们进入到各个路由器配置各个接口的ip地址
r1

r2
r3

r4

r5

r6
r7

r8

完成as2的ospf宣告实现as2的网络可通
以r2为例
[R2]ospf 1
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 172.16.0.2 0.0.0.0
[R2-ospf-1-area-0.0.0.0] network 172.16.2.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0] network 172.16.1.1 16.0.15.255[R2-ospf-1-area-0.0.0.0] network 172.16.2.1 48.0.15.255
r2

r3

r4

r5
r6
r7

建立as1和as2 as3和as2的ebgp对等体关系
r1:
[r1]bgp 1
[r1-bgp]router-id 1.1.1.1
[r1-bgp]peer 12.1.1.2 as-number 2
r2:
[r2]bgp 64512
[r2-bgp]router-id 2.2.2.2
[r2-bgp]peer 12.1.1.1 as-number 1
r8:
[r8]bgp 3
[r8-bgp]router-id 3.3.3.3
[r8-bgp]peer 78.1.1.7 as-number 2
r7:
[r7]bgp 64513
[r7-bgp]router-id 7.7.7.7
[r7-bgp]peer 78.1.1.8 as-number 3
建立as2内的两个联邦(r2,r3,r4为as64512 r5,r6,r7为as64513) ibgp的建立,路由的反射器
r2
[r2]bgp 64512
[r2-bgp]router-id 2.2.2.2
[r2-bgp]peer 172.16.0.3 as-number 64512
[r2-bgp]peer 172.16.0.3 connect-interface LoopBack 0
r3
[r3]bgp 64512
[r3-bgp]router-id 3.3.3.3
[r3-bgp]peer 172.16.0.2 as-number 64512
[r3-bgp]peer 172.16.0.2 connect-interface LoopBack 0
[r3-bgp]peer 172.16.0.4 as-number 64512
[r3-bgp]peer 172.16.0.4 connect-interface LoopBack 0
[r3-bgp]peer 172.16.0.2 peer 172.16.0.3 next-hop-local 路由反射器
r4
[r4]bgp 64512
[r4-bgp]router-id 4.4.4.4
[r4-bgp]peer 172.16.0.3 as-number 64512
[r4-bgp]peer 172.16.0.3 connect-interface LoopBack 0
r5
[r5]bgp 64513
[r5-bgp]router-id 5.5.5.5
[r5-bgp]peer 172.16.0.6 as-number 64513
[r5-bgp]peer 172.16.0.6 connect-interface LoopBack 0
r6
[r6]bgp 64513
[r6-bgp]router-id 6.6.6.6
[r6-bgp]peer 172.16.0.5 as-number 64513
[r6-bgp]peer 172.16.0.5 connect-interface LoopBack 0
[r6-bgp]peer 172.16.0.7 as-number 64513
[r6-bgp]peer 172.16.0.7 connect-interface LoopBack 0
[r6-bgp]peer 172.16.0.5 peer 172.16.0.3 next-hop-local 路由反射器
r7
[r5]bgp 64513
[r5-bgp]router-id 7.7.7.7
[r5-bgp]peer 172.16.0.6 as-number 64513
[r5-bgp]peer 172.16.0.6 connect-interface LoopBack 0
完成as64512 ,as64513的ebgp关系建立
r2:
[r2]bgp 64512
[r2-bgp]router-id 2.2.2.2
[r2-bgp]peer 172.16.0.5 as-number 64513
[r2-bgp]peer 172.16.0.5 connect-interface LoopBack 0
[r2-bgp]peer 172.16.0.5 ebgp-max-hop 2
r5:
[r5]bgp 64513
[r5-bgp]router-id 5.5.5.5
[r5-bgp]peer 172.16.0.2 as-number 64512
[r5-bgp]peer 172.16.0.2 connect-interface LoopBack 0
[r2-bgp]peer 172.16.0.2 ebgp-max-hop 2
r4:
[r4]bgp 64512
[r4-bgp]router-id 4.4.4.4
[r4-bgp]peer 172.16.0.7 as-number 64513
[r4-bgp]peer 172.16.0.7 connect-interface LoopBack 0
[r2-bgp]peer 172.16.0.7 ebgp-max-hop 2
r7:
[r5]bgp 64513
[r5-bgp]router-id 7.7.7.7
[r5-bgp]peer 172.16.0.4 as-number 64512
[r5-bgp]peer 172.16.0.4 connect-interface LoopBack 0
[r2-bgp]peer 172.16.0.4 ebgp-max-hop 2
在完成as2的配置之后我们可以查看bgp邻居表检查是否成功配置
以r2为例:
<r2>display bgp peer

完成as1,as2,as3的bgp宣告
r1:
[r1]bgp 1
[r1-bgp]network 1.1.1.0 24
as2中我们直接在r2,r7上用重发布的方式宣告
r2
[r2]bgp 64512
[r2-bgp]import-route ospf 1
r7:
[r7]bgp 64512
[r7-bgp]import-route ospf 1
r8:
[r8]bgp 3
[r8-bgp]network 8.8.8.0 24
查看r1,r8的bgp路由表看是否学习到各个as区域的路由
r1
<r1>display bgp routing-table

r8
<r8>display bgp routing-table

路由聚合在r2,r7上分别为as1,as3聚合路由
r2:
[r2-bgp]aggregate 172.16.0.0 16 detail-suppressed
r7:
[r7-bgp] aggregate 172.16.0.0 16 detail-suppressed
查看r1,r8的bgp路由表中的as2区域路由是否聚合
r1:

r8:

测试是否可以全网可达

到此可以使用r1的1.1.1.1的环回ping到r8的8.8.8.8环回实验目的完成实验结束!
边栏推荐
- 460. LFU cache
- JSP request对象功能详解说明
- els block boundary deformation processing
- ROS dynamic parameters
- After reshipment tencent greetings to monitor if the corresponding service does not exist by sc. Exe command to add services
- Trie详解
- The Statement update Statement execution
- What is the function of the JSP Taglib directive?
- 已知中序遍历数组和先序遍历数组,返回后序遗历数组
- Collection of NFT tools
猜你喜欢

众筹DAO“枯萎”的缩影:曾拍下《沙丘》未出版手稿的Spice DAO解散

Automatic conversion of Oracle-style implicit joins to ANSI JOINs using jOOQ

IP Core: FIFO

Pytorch seq2seq 模型架构实现英译法任务

Knowing the inorder traversal of the array and the preorder traversal of the array, return the postorder history array

BGP 第一次实验

Arduino Basic Syntax

Are test points the same as test cases?

什么是低代码(Low-Code)?低代码适用于哪些场景?

146. LRU cache
随机推荐
els 长条变形
回顾历史5次经济衰退时期:这一次可能会有何不同?
Multidimensional Correlation Time Series Modeling Method Based on Screening Partial Least Squares Regression of Correlation Variables
业务测试如何避免漏测 ?
短视频seo搜索优化主要内容
How to find new potential projects?Tools recommended
Constructor, this keyword, method overloading, local variables and member variables
字符串分割函数strtok练习
Business test how to avoid missing?
链上治理为何如此重要,波卡Gov 2.0又会如何引领链上治理的发展?
Pytorch seq2seq 模型架构实现英译法任务
Graphical LeetCode - 1161. Maximum Sum of In-Layer Elements (Difficulty: Moderate)
IO流基础
面试:简单介绍你参与的一个项目
Mean Consistency Tracking of Time-Varying Reference Inputs for Multi-Agent Systems with Communication Delays
uni-app项目总结
Multi-feature fusion face detection based on attention mechanism
632. Minimum interval
短视频SEO优化教程 自媒体SEO优化技巧方法
JSP out.println()方法具有什么功能呢?