当前位置:网站首页>MPLS实验
MPLS实验
2022-08-04 13:31:00 【aweike】
实验要求:
1.A公司之间,B公司之间能相互通信
2.R7能够访问R2/3/4的环回
实验步骤:
1.IP地址的规划,拓扑结构的搭建
2.IP地址的配置
先配置ISP区域内的IP,R1、R6、R5、R7使用MPLS,VPN技术实现
R2、R3、R4的配置:
[R2]interface g0/0/1
[R2-GigabitEthernet0/0/1]ip address 11.1.1.1 24
[R2-GigabitEthernet0/0/1]q
[R2]interface LoopBack 0
[R2-LoopBack0]ip address 2.2.2.2 24
[R3]interface g0/0/0
[R3-GigabitEthernet0/0/0]ip address 11.1.1.2 24
[R3-GigabitEthernet0/0/0]interface g0/0/1
[R3-GigabitEthernet0/0/1]ip address 12.1.1.1 24
[R3-GigabitEthernet0/0/1]q
[R3]interface LoopBack 0
[R3-LoopBack0]ip address 3.3.3.3 24
[R4]interface g0/0/0
[R4-GigabitEthernet0/0/0]ip address 12.1.1.2 24
[R4]interface g4/0/0
[R4-GigabitEthernet4/0/0]ip address 13.1.1.1 24
[R4]interface LoopBack 0
[R4-LoopBack0]ip address 4.4.4.4 24
3.动态协议的配置
ISP区域内起OSPF
[R2]ospf 1
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 11.1.1.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 2.2.2.0 0.0.0.255
[R3]ospf 1
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 11.1.1.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]network 12.1.1.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]network 3.3.3.0 0.0.0.255
[R4]ospf 1
[R4-ospf-1]area 0
[R4-ospf-1-area-0.0.0.0]network 12.1.1.0 0.0.0.255
[R4-ospf-1-area-0.0.0.0]network 4.4.4.0 0.0.0.255
BGP的配置 R2和R4之间
[R2]bgp 1
[R2-bgp]router-id 2.2.2.2
[R2-bgp]peer 4.4.4.4 as-number 1
[R2-bgp]peer 4.4.4.4 connect-interface LoopBack 0
[R2-bgp]peer 4.4.4.4 next-hop-local
[R4]bgp 1
[R4-bgp]router-id 4.4.4.4
[R4-bgp]peer 2.2.2.2 as-number 1
[R4-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[R4-bgp]peer 2.2.2.2 next-hop-local
4.MPLS的配置
[R2]mpls lsr-id 2.2.2.2
[R2]mpls
[R2-mpls]mpls ldp
[R2-mpls-ldp]q
[R2]interface g0/0/1
[R2-GigabitEthernet0/0/1]mpls
[R2-GigabitEthernet0/0/1]mpls ldp
[R3]mpls lsr-id 3.3.3.3
[R3]mpls
[R3-mpls]mpls ldp
[R3-mpls-ldp]q
[R3]interface g0/0/0
[R3-GigabitEthernet0/0/0]mpls
[R3-GigabitEthernet0/0/0]mpls ldp
[R3-GigabitEthernet0/0/0]q
[R3]interface g0/0/1
[R3-GigabitEthernet0/0/1]mpls
[R3-GigabitEthernet0/0/1]mpls ldp
[R4]mpls lsr-id 4.4.4.4
[R4]mpls
[R4-mpls]mpls ldp
[R4-mpls-ldp]q
[R4]interface g0/0/0
[R4-GigabitEthernet0/0/0]mpls
[R4-GigabitEthernet0/0/0]mpls ldp
5.VPN的配置
R1和R6的IP配置
[R1]interface LoopBack 0
[R1-LoopBack0]ip address 192.168.1.1 24
[R1-LoopBack0]q
[R1]interface g0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.2.1 24
[R6]interface LoopBack 0
[R6-LoopBack0]ip address 192.168.1.2 24
[R6-LoopBack0]q
[R6]interface g0/0/0
[R6-GigabitEthernet0/0/0]ip address 192.168.2.1 24
R2上VPN的配置
[R2]ip vpn-instance a
[R2-vpn-instance-a]ipv4-family
[R2-vpn-instance-a-af-ipv4]route-distinguisher 1:1
[R2-vpn-instance-a-af-ipv4]vpn-target 1:1
[R2-vpn-instance-a-af-ipv4]q
[R2-vpn-instance-a]q
[R2]ip vpn-instance b
[R2-vpn-instance-b]ipv4-family
[R2-vpn-instance-b-af-ipv4]route-distinguisher 2:2
[R2-vpn-instance-b-af-ipv4]vpn-target 2:2
[R2-vpn-instance-b-af-ipv4]q
[R2-vpn-instance-b]q
[R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]ip binding vpn-instance a
[R2-GigabitEthernet0/0/0]ip address 192.168.2.2 24
[R2-GigabitEthernet0/0/0]q
[R2]interface g0/0/2
[R2-GigabitEthernet0/0/2]ip binding vpn-instance b
[R2-GigabitEthernet0/0/2]ip address 192.168.2.2 24
R2的接口配置表
R5和R7的IP配置
[R5]interface LoopBack 0
[R5-LoopBack0]ip address 192.168.4.1 24
[R5-LoopBack0]q
[R5]interface g0/0/0
[R5-GigabitEthernet0/0/0]ip address 192.168.3.1 24
[R7]interface LoopBack 0
[R7-LoopBack0]ip address 192.168.4.2 24
[R7]interface g0/0/0
[R7-GigabitEthernet0/0/0]ip address 192.168.3.1 24
[R7]interface g0/0/1
[R7-GigabitEthernet0/0/1]ip address 13.1.1.2 24
R4上VPN的配置
[R4]ip vpn-instance a
[R4-vpn-instance-a]ipv4-family
[R4-vpn-instance-a-af-ipv4]route-distinguisher 1:1
[R4-vpn-instance-a-af-ipv4]vpn-target 1:1
[R4-vpn-instance-a-af-ipv4]q
[R4-vpn-instance-a]q
[R4]ip vpn-instance b
[R4-vpn-instance-b]ipv4-family
[R4-vpn-instance-b-af-ipv4]route-distinguisher 2:2
[R4-vpn-instance-b-af-ipv4]vpn-target 2:2
[R4-vpn-instance-b-af-ipv4]q
[R4-vpn-instance-b]q
[R4]interface g0/0/1
[R4-GigabitEthernet0/0/1]ip binding vpn-instance a
[R4-GigabitEthernet0/0/1]ip address 192.168.3.1 24
[R4-GigabitEthernet0/0/1]q
[R4]interface g0/0/2
[R4-GigabitEthernet0/0/2]ip binding vpn-instance b
[R4-GigabitEthernet0/0/2]ip address 192.168.3.1 24
R4的接口配置表
6.重发布
R1起OSPF,R6起RIP
[R1]ospf 1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 192.168.2.0 0.0.0.255
[R6]rip 1
[R6-rip-1]version 2
[R6-rip-1]network 192.168.1.0
[R6-rip-1]network 192.168.2.0
R2进行连接
[R2]ospf 2 vpn-instance a
[R2-ospf-2]area 0
[R2-ospf-2-area-0.0.0.0]network 192.168.2.0 0.0.0.255
[R2]rip 1 vpn-instance b
[R2-rip-1]version 2
[R2-rip-1]network 192.168.2.0
R5起OSPF,R7起RIP
[R5]ospf 1
[R5-ospf-1]area 0
[R5-ospf-1-area-0.0.0.0]network 192.168.4.0 0.0.0.255
[R5-ospf-1-area-0.0.0.0]network 192.168.3.0 0.0.0.255
[R7]rip 1
[R7-rip-1]version 2
[R7-rip-1]network 192.168.3.0
[R7-rip-1]network 192.168.4.0
R4进行连接
[R4]ospf 2 vpn-instance a
[R4-ospf-2]area 0
[R4-ospf-2-area-0.0.0.0]network 192.168.3.0 0.0.0.255
[R4-ospf-2-area-0.0.0.0]q
[R4-ospf-2]q
[R4]rip 1 vpn-instance b
[R4-rip-1]version 2
[R4-rip-1]network 192.168.3.0
R2上进行重发布
[R2]ospf 2 vpn-instance a
[R2-ospf-2]import-route bgp
[R2-ospf-2]q
[R2]rip 1 vpn-instance b
[R2-rip-1]import-route bgp
R4上进行重发布
[R4]rip 1 vpn-instance b
[R4-rip-1]import-route bgp
[R4-rip-1]q
[R4]ospf 2 vpn-instance a
[R4-ospf-2]import-route bgp
R7上配置NAT
[R7]acl 2000
[R7-acl-basic-2000]rule 1 permit source any
[R7-acl-basic-2000]q
[R7]interface g0/0/1
[R7-GigabitEthernet0/0/1]nat outbound 2000
R3和R7上进行缺省路由的配置
[R3]ip route-static 0.0.0.0 0 12.1.1.2
[R7]ip route-static 0.0.0.0 0 13.1.1.1
7.测试
R1pingR5的环回
R2pingR7的环回
R7pingR3的环回
边栏推荐
- 做项目管理有且有必要了解并学习的重要知识--PMP项目管理
- 博尔赫斯-诗中的经典语段
- 封装、继承、多态的联合使用实现不同等级学生分数信息的统计
- 跨链桥已成行业最大安全隐患 为什么和怎么办
- 使用SQLServer复制数据库
- PMP每日一练 | 考试不迷路-8.4(包含敏捷+多选)
- Arduino框架下I2S控制ADC采样以及PWM输出示例解析
- LeetCode 1403 Minimum subsequence in non-increasing order [greedy] HERODING's LeetCode road
- HDU1580 输出先手能取的方案数
- SCA兼容性分析工具(ORACLE/MySQL/DB2--->MogDB/openGauss/PostgreSQL)
猜你喜欢
MFC的相机双目标定界面设计
Haproxy搭建web群集
"Social Enterprises Conducting Civilian Personnel Training Specifications" group standard on the shelves of Xinhua Bookstore
RobotFramework二次开发(一)
ReentrantLock 原理
Arduino框架下I2S控制ADC采样以及PWM输出示例解析
Geoffrey Hinton:深度学习的下一个大事件
烂大街的缓存穿透、缓存击穿和缓存雪崩,你真的懂了?
LeetCode_424_替换后的最长重复字符
5 cloud security management strategies enterprises should implement
随机推荐
rpm安装提示error: XXX: not an rpm package (or package manifest):
router---路由守卫
Just a Hook
2546 饭卡(01背包,挺好的)
【无标题】
redisTemplate存取List遇到的坑
router---Route guard
vcl啥意思_oval
ROS设置plugin插件
【LeetCode】38、外观数列
nVisual secondary development - Chapter 2 nVisual API operation guide Swagger use
文字编码 - Markdown 简明教程
This article sorts out the development of the main models of NLP
代码越写越乱?那是因为你没用责任链!
【WeChat Mini Program】Social Internship Production Project for Information Management and Information System Major--Trash Fingerprint
备份控制文件
博途1200/1500PLC斜坡指令RAMP(带暂停功能)
橄榄枝大课堂APP正式启动上线
odoo13笔记点
Control CD-ROM with VbScript