当前位置:网站首页>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环回实验目的完成实验结束!
边栏推荐
- C language character and string function summary (2)
- The Statement update Statement execution
- Grid false data injection attacks detection based on coding strategy
- [HCIP] BGP Small Experiment (Federation, Optimization)
- nodeJs--mime模块
- 08-SDRAM: Summary
- 一文概览最实用的 DeFi 工具
- Don't concatenate strings with jOOQ
- 已知中序遍历数组和先序遍历数组,返回后序遗历数组
- CRS management and maintenance
猜你喜欢
632. 最小区间
微软电脑管家V2.1公测版正式发布
c语言字符和字符串函数总结(二)
uni-app项目总结
Disk and file system management
Realize deletion - a specified letter in a string, such as: the string "abcd", delete the "a" letter in it, the remaining "bcd", you can also pass multiple characters to be deleted, and pass "ab" can
Task execution control in Ansible
Business test how to avoid missing?
实现删除-一个字符串中的指定字母,如:字符串“abcd”,删除其中的”a”字母,剩余”bcd”,也可以传递多个需要删除的字符,传递”ab”也可以做到删除”ab”,剩余”cd”。
When Netflix's NFTs Forget Web2 Business Security
随机推荐
实现删除-一个字符串中的指定字母,如:字符串“abcd”,删除其中的”a”字母,剩余”bcd”,也可以传递多个需要删除的字符,传递”ab”也可以做到删除”ab”,剩余”cd”。
GIF making - very simple one-click animation tool
Double queue implementation stack?Dual stack implementation queue?
Async/await principle and execution sequence analysis
请教一下本网站左下角的动漫人物是怎么做的?
Don't know about SynchronousQueue?So ArrayBlockingQueue and LinkedBlockingQueue don't and don't know?
460. LFU cache
JSP如何使用page指令让JSP文件支持中文编码呢?
测试用例:四步测试设计法
什么是低代码(Low-Code)?低代码适用于哪些场景?
短视频seo搜索优化主要内容
Web开发
不了解SynchronousQueue?那ArrayBlockingQueue和LinkedBlockingQueue不会也不知道吧?
uni-app project summary
Unknown CMake command "add_action_files"
els 长条变形
Graphical LeetCode - 1161. Maximum Sum of In-Layer Elements (Difficulty: Moderate)
TCL: Pin Constraints Using the tcl Scripting Language in Quartus
基于相关性变量筛选偏最小二乘回归的多维相关时间序列建模方法
2022/08/01 Study Notes (day21) Generics and Enums