当前位置:网站首页>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环回实验目的完成实验结束!
边栏推荐
- Active Disturbance Rejection Control of Substation Inspection Robot Based on Data Drive
- 辨析内存函数memset、memcmp、memmove以及memcpy
- After reshipment tencent greetings to monitor if the corresponding service does not exist by sc. Exe command to add services
- JSP如何使用page指令让JSP文件支持中文编码呢?
- 回顾历史5次经济衰退时期:这一次可能会有何不同?
- 460. LFU cache
- [Headline] Written test questions - minimum stack
- JSP内置对象out对象的功能简介说明
- TCL: Pin Constraints Using the tcl Scripting Language in Quartus
- JSP Taglib指令具有什么功能呢?
猜你喜欢
Knowing the inorder traversal of the array and the preorder traversal of the array, return the postorder history array
测试用例:四步测试设计法
An overview of the most useful DeFi tools
协作乐高 All In One:DAO工具大全
Kunpeng compile and debug plug-in actual combat
Short video seo search optimization main content
面试:简单介绍你参与的一个项目
Disk and file system management
BGP 第一次实验
当奈飞的NFT忘记了Web2的业务安全
随机推荐
Async/await principle and execution sequence analysis
MYSQL(基本篇)——一篇文章带你走进MYSQL的奇妙世界
How does JSP use request to get the real IP of the current visitor?
请教一下本网站左下角的动漫人物是怎么做的?
Automatic conversion of Oracle-style implicit joins to ANSI JOINs using jOOQ
Interview high-frequency test questions solution - stack push and pop sequence, effective parentheses, reverse Polish expression evaluation
BGP 第一次实验
面试:简单介绍你参与的一个项目
MLX90640 红外热成像仪测温模块开发笔记(完整版)
ROS 动态参数
DFS详解
Knowing the inorder traversal of the array and the preorder traversal of the array, return the postorder history array
【HCIP】BGP小型实验(联邦,优化)
扑克牌问题
uni-app project summary
微软电脑管家V2.1公测版正式发布
NFT工具合集
Unknown CMake command “add_action_files“
不要用jOOQ串联字符串
Double queue implementation stack?Dual stack implementation queue?