当前位置:网站首页>MPLS experiment
MPLS experiment
2022-08-04 13:32:00 【aweike】
实验要求:
1.A公司之间,Bcompanies can communicate with each other
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.Configuration of dynamic protocols
ISPfrom within the regionOSPF
[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
R2The interface configuration tables
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
R4The interface configuration tables
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和R7Configure the default route on
[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的环回
边栏推荐
- 【LeetCode】1403. 非递增顺序的最小子序列
- LeetCode 1403 Minimum subsequence in non-increasing order [greedy] HERODING's LeetCode road
- 谁说 Mysql 单表最大 2000 W ?我硬要塞它 1 个亿
- rpm安装提示error: XXX: not an rpm package (or package manifest):
- router---编程式导航
- 双目立体视觉笔记(三)三角测量、极线校正
- How to play the Tower of Hanoi
- 永磁同步电机FOC驱动代码讲解
- 新 Nsight Graph、Nsight Aftermath 版本中的性能提升和增强功能
- Ultra-QuickSort
猜你喜欢
"Social Enterprises Conducting Civilian Personnel Training Specifications" group standard on the shelves of Xinhua Bookstore
Haproxy搭建web群集
Interviewer: Tell me the difference between NIO and BIO
永磁同步电机FOC驱动代码讲解
新 Nsight Graph、Nsight Aftermath 版本中的性能提升和增强功能
CReFF缓解长尾数据联邦学习(IJCAI 2022)
Week 7 Latent Variable Models and Expectation Maximization
MySQL-数据类型
面试官:说一下NIO和BIO的区别
双目立体视觉笔记(三)三角测量、极线校正
随机推荐
Programmer Qixi Gift - How to quickly build an exclusive chat room for your girlfriend in 30 minutes
新 Nsight Graph、Nsight Aftermath 版本中的性能提升和增强功能
CReFF缓解长尾数据联邦学习(IJCAI 2022)
【LeetCode】38、外观数列
小程序对接企业微信客服
项目里的各种配置,你都了解吗?
Opencv学习之ORB特征提取和匹配
Unity 3D模型展示框架篇之资源打包、加载、热更(Addressable Asset System | 简称AA)
yum 查看已经安装过的包并卸载
AutoCAD DWG,DXF文件导出高清图片、PDF
redisTemplate存取List遇到的坑
PAT甲级:1040 Longest Symmetric String
odoo13 note point
LeetCode_424_替换后的最长重复字符
postgre 支持 newsql 特性可行性有多大?
MySQL性能指标TPS\QPS\IOPS如何压测?
【无标题】
Cows 树状数组
ssm学习心得(完结篇
LeetCode 1403 Minimum subsequence in non-increasing order [greedy] HERODING's LeetCode road