当前位置:网站首页>BGP+MPLS综合实验
BGP+MPLS综合实验
2022-08-02 05:17:00 【less than _ermi】
实验内容
实验过程
实验拓扑图
根据题目要求进行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.1.2/32
172.16.1.3/32
172.16.1.4/32
172.16.1.5/32
172.16.1.6/32
172.16.1.7/32
配置IGP环境均使用oSPF协议
[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
同时将loopback1工作方式修改为broadcast
[R2]interface LoopBack 1
[R2-LoopBack1]ospf network-type broadcast
R3--R7同R2 查看路由表
r1\r2\r5\r7\r8启用BGP 协议 修改r2\r5\r7的下一跳 宣告r1\r8的用户网段
[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]bgp 2
[R2-bgp]router-id 172.16.1.2
[R2-bgp]peer 12.1.1.1 as-number 1
[R2-bgp]peer 172.16.1.5 as-number 2
[R2-bgp]peer 172.16.1.5 connect-interface LoopBack 0
[R2-bgp]peer 172.16.1.7 as-number 2
[R2-bgp]peer 172.16.1.7 connect-interface LoopBack 0
[R5]bgp 2
[R5-bgp]router-id 172.16.1.5
[R5-bgp]peer 15.1.1.1 as-number 1
[R5-bgp]peer 172.16.1.2 as-number 2
[R5-bgp]peer 172.16.1.2 connect-interface LoopBack 0
[R5-bgp]peer 172.16.1.7 as-number 2
[R5-bgp]peer 172.16.1.7 connect-interface LoopBack 0
[R7]bgp 2
[R7-bgp]router-id 172.16.1.7
[R7-bgp]peer 172.16.1.2 as-number 2
[R7-bgp]peer 172.16.1.2 connect-interface LoopBack 0
[R7-bgp]peer 172.16.1.5 as-number 2
[R7-bgp]peer 172.16.1.5 connect-interface LoopBack 0
[R7-bgp]peer 78.1.1.2 as-number 3
[R8]bgp 3
[R8-bgp]router-id 8.8.8.8
[R8-bgp]peer 78.1.1.1 as-number 2
[R2-bgp]peer 172.16.1.5 next-hop-local
[R2-bgp]peer 172.16.1.7 next-hop-local
[R5-bgp]peer 172.16.1.2 next-hop-local
[R5-bgp]peer 172.16.1.7 next-hop-local
[R7-bgp]peer 172.16.1.2 next-hop-local
[R7-bgp]peer 172.16.1.5 next-hop-local
[R1-bgp]network 10.10.10.10 24
[R1-bgp]network 80.80.80.80 24
使用MPLS解决BGP路由黑洞问题
[R2]route recursive-lookup tunnel
r5\r7做同样配置
r3\r4\r7启用MPLS协议(例如:r2)
[R2]mpls lsr-id 172.16.1.2
[R2]mpls
Info: Mpls starting, please wait... OK!
[R2-mpls]mpls ldp
[R2-mpls-ldp]q
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]mpls
[R2-GigabitEthernet0/0/1]mpls ldp
[R2-GigabitEthernet0/0/1]q
[R2]interface GigabitEthernet 0/0/2
[R2-GigabitEthernet0/0/2]mpls
[R2-GigabitEthernet0/0/2]mpls ldp
[R2-GigabitEthernet0/0/2]q
宣告AS2的路由
[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]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
在r1上查看BGP路由表,对172.16.2.0/24进行干涉
[R2]ip ip-prefix a permit 172.16.2.0 24
[R2]route-policy a permit node 10
Info: New Sequence of this List.
[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
Info: New Sequence of this List.
[R2-route-policy]q
[R2]bgp 2
[R2-bgp]peer 12.1.1.1 route-policy a export
再次查看路由表
选路干涉成功
测试
实验结束
边栏推荐
- The virtual reality real estate display system foresees the future decoration effect in advance
- 【漫画】2021满分程序员行为对照表(最新版)
- oracle 远程连接数据库
- OAuth 授权协议 | 都云原生时代了,我们应该多懂一点OAuth ?
- Difference and analysis of CPU usage and load
- flex布局(弹性布局)
- An advanced method for solving palindromes
- Alluxio为Presto赋能跨云的自助服务能力
- 【C语言】LeetCode26.删除有序数组中的重复项&&LeetCode88.合并两个有序数组
- 分布式文件存储服务器之Minio对象存储技术参考指南
猜你喜欢
6W+字记录实验全过程 | 探索Alluxio经济化数据存储策略
25K test old bird's 6-year experience in interviews, four types of companies, four types of questions...
Introduction to Grid Layout
coredns介绍
leetcode-338.比特位计数
The advantages of making web3d dynamic product display
A list of 300+ learning resources compiled by senior engineers of the Tao Department (the latest version in 2021)
18 years of programmer career, read more than 200 programming books, pick out some essence to share with you
非关系型数据库MongoDB的特点及安装
Three methods of importing sql files in MySQL
随机推荐
Redis-----非关系数据库
C 竞赛——捕鱼
Linux CentOS8安装Redis6
C language entry combat (13): decimal number to binary
Shell 脚本不同玩法
DNS的解析流程
Detailed explanation of interface in Go language
Three methods of importing sql files in MySQL
程序员写PPT的小技巧
VMTK环境配置记录
淘系资深工程师整理的300+项学习资源清单(2021最新版)
What are the ways to improve software testing capabilities?After reading this article, it will take you up a notch
目标检测重要概念——IOU、感受野、空洞卷积、mAP
双重for循环案例(用js打印九九乘法表)
Use the browser's local storage to realize the function of remembering the user name
网安学习-内网渗透4
oracle 远程连接数据库
字节面试题:如何保证缓存和数据库的一致性
【C语言】LeetCode26.删除有序数组中的重复项&&LeetCode88.合并两个有序数组
为什么4个字节的float要比8个字节的long大呢?