当前位置:网站首页>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的环回
边栏推荐
- flatMap() :对每个元素执行映射函数并将结果展平
- 嵌入式系统驱动高级【2】——平台总线式驱动开发上_基础框架
- 多线程 (进阶+初阶)
- C专家编程 第10章 再论指针 10.2 指针数组就是Iliffle向量
- 【洛谷】P2613 【模板】有理数取余
- 数学基础(三)PCA原理与推导
- What aspects should we start with for interface security testing?
- SwiftUI * SwiftUI 4.0 全新的导航系统
- What are the functions and applications of the smart counter control board?
- JS 运行机制最全面的一次梳理
猜你喜欢
随机推荐
"Lonely Walking on the Moon": Two choices of Duguyue, let a "middleman" become a big hero
ros入门(安装)
C专家编程 第8章 为什么程序员无法分清万圣节和圣诞节 8.10 轻松一下---国际C语言混乱代码大赛
unshift() :将一个或多个元素添加到数组的开头
Shell脚本:函数
What aspects should we start with for interface security testing?
数学基础(三)PCA原理与推导
win10上运行emwin
2022-08-08 第五小组 顾祥全 学习笔记 day31-集合-IO流-File类
数据库工具DataGrip V2022.2正式发布——支持导入多个 CSV 文件的选项
C专家编程 第9章 再论数组 9.6 C语言的多维数组
Matlab optimization method -- 0.618 method
整数溢出机制 C
Shell脚本:正则表达式
【物理应用】基于El-centro地震波作用下隔震与非隔震支座下的顶层位移、速度、加速度的对比情况附matlab代码
【扫雷--1】
20220530设计问题:常数时间插入、删除和获取随机元素
Chapter2多元函数
并查集相关知识点
Introduction to the JSP