当前位置:网站首页>bgp与mpls综合实验
bgp与mpls综合实验
2022-08-02 10:17:00 【愤愤的卷毛】
根据上图完成实验要求
建立拓扑ip地址规划
网段划分
用户网段
172.16.2.0/24
172.16.3.0/24
172.16.4.0/24
172.16.5.0/24
172.16.6.0/24
172.16.7.0/24
环回地址
172.16.0.2/32
172.16.0.3/32
172.16.0.4/32
172.16.0.5/32
172.16.0.6/32
172.16.0.7/32
建立如上图的拓扑
配置各个接口ip地址
我们进入到各个路由器接口配置所需要的ip地址
配置完成后可查看接口摘要检查是否出错
<r2>display ip interface brief
as2内的路由配置
在as2内完成路由配置并修改用户换回网段为broadcast类型
以a2为例:
[r2]ospf 1
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255[r2-bgp]peer 172.16.0.5 connect-interface lo0
建立bgp关系
r1
[r1]bgp 1
[r1-bgp]router-id 1.1.1.1
[r1-bgp]peer 12.1.1.2 as-number 2
[r1-bgp]peer 15.1.1.2 as-number 2
r2
[r2]bgp 2
[r2-bgp]router-id 2.2.2.2
[r2-bgp]peer 12.1.1.1 as-number 1
[r2-bgp]peer 172.16.0.5 as-number 2
[r2-bgp]peer 172.16.0.5 connect-interface LoopBack 0
[r2-bgp]peer 172.16.0.7 as-number 2
[r2-bgp]peer 172.16.0.7 connect-interface LoopBack 0
r5
[r5]bgp 2
[r5-bgp]router-id 5.5.5.5
[r5-bgp]peer 12.1.1.5as-number 1
[r5-bgp]peer 172.16.0.2 as-number 2
[r5-bgp]peer 172.16.0.2 connect-interface LoopBack 0
[r5-bgp]peer 172.16.0.7 as-number 2
[r5-bgp]peer 172.16.0.7 connect-interface LoopBack 0
r7
[r7]bgp 2
[r7-bgp]router-id 7.7.7.7
[r7-bgp]peer 172.16.0.2 as-number 2
[r7-bgp]peer 172.16.0.2 connect-interface LoopBack 0
[r7-bgp]peer 172.16.0.5 as-number 2
[r7-bgp]peer 172.16.0.5 connect-interface LoopBack 0
[r7-bgp]peer 78.1.1.2 as-number 3
r8:
[r8]bgp 3
[r8-bgp]router-id 8.8.8.8
[r8-bgp]peer 78.1.1.1 as-number 2
bgp宣告
r1:
[r1-bgp]network 1.1.1.0 24
r2:
[r2]bgp 2
[r2-bgp]network 172.16.2.0 24
[r2-bgp]network 172.16.3.0 24
[r2-bgp]network 172.16.4.0 24
r5:
[r5]bgp 2
[r5-bgp]network 172.16.5.0 24
[r5-bgp]network 172.16.6.0 24
[r5-bgp]network 172.16.7.0 24
r8:
[r8-bgp]network 8.8.8.0 24
使用mpls解决路由黑洞
以r2为例在r5,r7做出如下配置
r2:
[r2]route recursive-lookup tunnel
mpls的配置
我们以r2为例在r2,r3,r4,r5,r7,r8上进行mpls的配置
[r2]mpls lsr-id 172.16.0.2
[r2]mpls
[r2-mpls]mpls ldp
[r2]interface GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/1]mpls
[r2-GigabitEthernet0/0/1]mpls ldp
[r2]interface GigabitEthernet 0/0/2
[r2-GigabitEthernet0/0/2]mpls
[r2-GigabitEthernet0/0/2]mpls ldp
在配置完成之后我们查看r1的bgp路由表发现172.16.2.0的路由并未走我们的预想路线 所以我们进行干涉选路
干涉选路(路由策略)
在r2上使用路由策略改变下一跳为12.1.1.2 的med值干涉选路
[r2]ip ip-prefix a permit 172.16.2.0 24
[r2]route-policy a permit node 10
[r2-route-policy]if-match ip-prefix a
[r2-route-policy]apply cost 1
[r2-route-policy]q
[r2]route-policy a permit node 20
[r2-route-policy]q
[r2]bgp 2
[r2-bgp]peer 12.1.1.1 route-policy a export
在进行完成干涉选路之后我们再次查看r1路由表发现已经变成我们预想的路线
测试
在完成上述所有的配置之后我们进行测试
到此实验要求全部完成实验结束!
边栏推荐
- 后管实现面包屑功能
- 软件测试与质量 之白盒测试
- 软件测试X模型
- R语言ggplot2可视化:使用ggpubr包的ggbarplot函数可视化水平柱状图(条形图)、使用orientation参数设置柱状图转置为条形图
- 每日一题练习1-15
- 【术语科普】关于集成工作台那些难懂的词儿,看这篇秒懂!
- R语言ggplot2可视化:基于aes函数中的fill参数和shape参数自定义绘制分组折线图并添加数据点(散点)、使用theme函数的legend.position函数配置图例到图像右侧
- TimerTask(addin timer语音)
- npm ERR! 400 Bad Request - PUT xxx - Cannot publish over previously published version “1.0.0“.
- 38岁女儿不恋爱没有稳定工作老母亲愁哭
猜你喜欢
使用较广泛的安全测试工具有哪些?
Shell script realizes multi-select DNS simultaneous batch resolution of domain name IP addresses (new update)
第十五章 多线程
FPGA手撕代码——CRC校验码的多种Verilog实现方式 (2021乐鑫科技数字IC提前批代码编程)
List-based queuing and calling system
games202:三,实时环境光照IBL + PRT
org.apache.ibatis.binding.BindingException Invalidbound statement (not found)的解决方案和造成原因分析(超详细)
You Only Hypothesize Once: 用旋转等变描述子估计变换做点云配准(已开源)
Alibaba CTO Cheng Li: Alibaba Open Source History, Concept and Practice
为什么要使用BGP?
随机推荐
R语言使用zoo包中的rollapply函数以滚动的方式、窗口移动的方式将指定函数应用于时间序列、设置align参数指定结果数据中的时间标签取自窗口中的位置(参数right指定取自窗口的最右侧)
LayaBox---TypeScript---JSX
练习16-两道模拟题
The realization of the list
后管实现面包屑功能
Com多进程通信实现
The R language uses the ggtexttable function of the ggpubr package to visualize the table data (draw the table directly or add the table data to the image), set the theme parameter to customize the fi
Event 对象,你很了解吗?
3 d laser slam: LeGO - LOAM - ground point extracting method and the analysis of the code
从零开始Blazor Server(5)--权限验证
[Science of Terminology] For those difficult words about the integrated workbench, read this article to understand in seconds!
第十七章 Excel操作
超赞!发现一个APP逆向神器!
How to choose a truly "easy-to-use, high-performance" remote control software
LayaBox---TypeScript---高级类型
软件测试岗位巨坑?阿里在职7年测试人告诉你千万别上当
LayaBox---TypeScript---Namespaces and modules
享年94岁,图灵奖得主、计算复杂性理论先驱Juris Hartmanis逝世
零代码工具推荐---HiFlow
行为型模式-策略模式