当前位置:网站首页>Hcip MPLS experiment
Hcip MPLS experiment
2022-08-09 03:05:00 【turkey sauce】
实验题目:
实验拓扑:
实验步骤:
Do the public network part firstIP配置:
r2
[Huawei]sysname r2
[r2]int l0
[r2-LoopBack0]ip add 2.2.2.2 24
[r2-LoopBack0]int g0/0/1
[r2-GigabitEthernet0/0/1]ip ad 23.1.1.1 24
r3
[Huawei]sysname r3
[r3]int l0
[r3-LoopBack0]ip add 3.3.3.3 24
[r3-LoopBack0]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 23.1.1.2 24
[r3-GigabitEthernet0/0/0]int g0/0/1
[r3-GigabitEthernet0/0/1]ip add 34.1.1.1 24
r4
[Huawei]sysname r4
[r4]int l0
[r4-LoopBack0]ip add 4.4.4.4 24
[r4-LoopBack0]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 34.1.1.2 24
[r4-GigabitEthernet0/0/0]int g4/0/0
[r4-GigabitEthernet4/0/0]ip add 47.1.1.1 24
r7
[Huawei]sysname r7
[r7]int g0/0/0
[r7-GigabitEthernet0/0/0]ip add 47.1.1.2 24
The focus of the public network part:
Start the public network partigp
Notice the announcement47网段,使得 2、3知晓
将4连7的接口4/0/0Tune to silent interface
[r4-ospf-1]silent-interface g4/0/0
先将opsf中的4、7Authentication encryption is performed after the interface between them is silent,使得4、7will not exist in betweenospf
[r4-GigabitEthernet4/0/0]ospf authentication-mode md5 1 cipher 123456
7Have to write the default to point to the operator(公网)
[r7]ip route-static 0.0.0.0 0 47.1.1.1
ISP内部的IGP的配置——这里使用OSPF
mpls协议:
mpls vpn部分
创建vpn空间
vpnSpace configuration commands:
[r2]ip vpn-instance b1
[r2-vpn-instance-b1]route-distinguisher 1:1
[r2-vpn-instance-b1-af-ipv4]vpn-target 1:1
[r2-vpn-instance-b1-af-ipv4]q
[r2-vpn-instance-b1]q
[r2]ip vpn-instance a1
[r2-vpn-instance-a1]rout
[r2-vpn-instance-a1]route-distinguisher 2:2
[r2-vpn-instance-a1-af-ipv4]vpn-target 2:2
查看当前配置:
[r2]display current-configuration
r2 r4Separate two spaces for associating two users
Space interface connection:
bgp关系建立
r2 r4建邻
[r2]bgp 1
[r2-bgp]route-select
[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 l0
[r2-bgp]ipv4-family vpnv4 //Used to transmit private routes
[r2-bgp-af-vpnv4]peer 4.4.4.4 enable // 建立传输vpn路由
r4
View neighbor relationship establishment
<r3>display mpls ldp peer
The public network environment was successfully established!!!
Perform customer configuration
r6
[Huawei]sysname r6
[r6]int l0
[r6-LoopBack0]ip add 192.168.1.1 24
[r6-LoopBack0]in g0/0/2
[r6-GigabitEthernet0/0/2]ip add 192.168.2.1 24[r6]rip 1 //rip协议
[r6-rip-1]ver 2
[r6-rip-1]network 192.168.1.0 宣告网段
[r6-rip-1]network 192.168.2.0
r2:
[r2]rip 1 vpn-instance a1
[r2-rip-1]ver 2
[r2-rip-1]network 192.168.2.0
r2和r6 rip协议启动
接下来该r4 r7启动ospf协议
r7
[r7]int g0/0/02
[r7-GigabitEthernet0/0/2]ip add 192.168.3.2 24
[r7-GigabitEthernet0/0/2]int l0
[r7-LoopBack0]ip add 192.168.4.2 24
[r7-LoopBack0]q
[r7]ospf 1 router-id 7.7.7.7
[r7-ospf-1]area 0
[r7-ospf-1-area-0.0.0.0]network 172.168.3.2 0.0.0.0 //Announce private network segment and loopback
[r7-ospf-1-area-0.0.0.0]network 192.168.4.2 0.0.0.0
r4:
[r4]ospf 2 vpn-instance a2
[r4-ospf-2]area 0
[r4-ospf-2-area-0.0.0.0]network 192.168.3.1 0.0.0.0
r4 r7生成ospf邻接关系
Next is a two-way repost
r2
[r2]rip 1 vpn-instance a1
[r2-rip-1]import-route bgp
[r2-rip-1]bgp 1
[r2-bgp]ipv4-family vpn-instance a1
[r2-bgp-a1]import-route rip 1 // will be in spacevpnroute to getbgp里
r4
[r4]bgp 1
[r4-bgp]ipv4-family vpn-instance a2
[r4-bgp-a2]import-route ospf 2
[r4-bgp-a2]q
[r4-bgp]q
[r4]ospf 2 vpn-instance a2
[r4-ospf-2]import-route bgp
静态路由配置
r1
[r1]ip route-static 192.168.3.0 24 192.168.2.2
[r1]ip route-static 192.168.4.0 24 192.168.2.2
r2Write static routes to the space
[r2]ip route-static vpn-instance b1 192.168.1.0 24 192.168.2.1
[r2]bgp 1
[r2-bgp]ipv4-family vpn-instance b1
[r2-bgp-b1]import-route direct
[r2-bgp-b1]import-route static[r4]bgp 1
[r4-bgp]ipv4-family vpn-instance b2
[r4-bgp-b2]import-route static
[r4-bgp-b2]import-route direct
r2 r4Unreachable routes learned separately
r2 r4上vpn学到的路由
r5:静态路由
[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]ip add 192.168.3.2 24
[r5-GigabitEthernet0/0/0]int l0
[r5-LoopBack0]ip add 192.168.4.1 24
[r5-LoopBack0]q
[r5]ip route-static 192.168.1.0 24 192.168.3.1
[r5]ip route-static 192.168.2.0 24 192.168.3.1
r2 ping r7
r7 ping r2的环回
r7学到r1上的路由
r6 ping r7
r7访问 r2、3、4的环回
边栏推荐
- CI/CD:持续集成/持续部署(难舍难分)
- Ingress的概念和原理
- 浅聊一下那些营销工具—优惠券
- 权限系统就该这么设计(万能通用),稳的一批!
- 新型双功能螯合剂NOTA及其衍生物CAS号:147597-66-8p-SCN-Bn-NOTA
- Recently, I have seen a lot of people who want to study by themselves or enroll in classes but don’t know how to choose. I will tell you about it today.
- Processing Point Clouds
- Linux安装Redis
- C专家编程 第9章 再论数组 9.3 为什么C语言把数组形参当做指针
- SwiftUI * SwiftUI 4.0 全新的导航系统
猜你喜欢
Postman interface test [official website] latest version installation and use tutorial
书签收藏难整理?这款书签工具管理超方便
第二部分:和查找表相关的问题
"Lonely Walking on the Moon": Two choices of Duguyue, let a "middleman" become a big hero
深度学习:优化器
【元胞自动机】基于元胞自动机模拟社会力因素下的灾害人员疏散应急仿真附matlab代码
那些关于DOM的常见Hook封装(一)
01| 数据类型
掌握 TypeToken 原理及泛型擦除
浅聊一下那些营销工具—优惠券
随机推荐
C专家编程 第8章 为什么程序员无法分清万圣节和圣诞节 8.10 轻松一下---国际C语言混乱代码大赛
Chapter2多元函数
Promoting practice with competitions-Like the 84th biweekly game reflection and the 305th weekly game supplementary questions
C专家编程 第9章 再论数组 9.4 数组片段的下标
Cyanine5tetrazine(CAS号:1427705-31-4)结构式原理
C专家编程 第9章 再论数组 9.1 什么时候数组与指针相同
多线程 (进阶+初阶)
C专家编程 第9章 再论数组 9.7 轻松一下---软件/硬件平衡
flat() :递归地将数组展平到指定的深度
20220523搜索和排序:搜索旋转排序数组
数组与切片
最优化方法——0.618法matlab实现
Jenkins environment deployment, (packaging, publishing, deployment, automated testing)
MySQL相关知识 和 数据的存储相关知识
Kubernetes:(十五)PV与PVC的《恩怨情仇》
第一部分:和数组相关的问题
数据库工具DataGrip V2022.2正式发布——支持导入多个 CSV 文件的选项
C专家编程 第9章 再论数组 9.5 数组和指针可交换性的总结
ERROR:Module not found: Error: Can‘t resolve ‘core-js/modules/es.promise.js‘ in ‘address‘
Rotate the neon circle