当前位置:网站首页>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的环回

边栏推荐
- 一款免费的强大办公工具。
- C专家编程 第10章 再论指针 10.2 指针数组就是Iliffle向量
- 2027年加密市场将会发生什么?思维的跨越?长期预测无法脱离形势变化
- 深度学习——以天气识别为例,探讨如何保存神经网络模型
- Solve the Final Fantasy 13-2 Clock Puzzle with DFS
- Image.new() 及 img.paste() 的用法记录
- 【21天学习挑战赛】二分查找题目之寻找峰值
- 非关系型数据库MongoDB:(二)副本集部署说明、数据迁移、限制内存、启用mongo认证
- 三箭资本濒临破产?市场陷入1907年恐慌之中?加密监管不可避免
- Processing Point Clouds
猜你喜欢

Second data CEO CAI data warming invited to jointly organize the acceleration data elements online salon

redis集群详解

交换VLAN实验

Chapter 2数据分析

01| 数据类型

1.02亿美元从数字资产基金撤出!BTC价格已经触底!预示下跌趋势即将逆转?

Solve the Final Fantasy 13-2 Clock Puzzle with DFS

关于eBPF与可观测性,你想知道的都在这里

让历史文化“活”起来,北京河图“万象中轴”助力打造北京城市金名片

智能计数器控制板的功能及应用有哪些?
随机推荐
【面试整理】-- 多线程
【21天学习挑战赛】二分查找题目之寻找峰值
lvs+keepalived高可用负载均衡集群
Kubernetes:(十五)PV与PVC的《恩怨情仇》
【信号去噪】基于Sage-Husa自适应卡尔曼滤波器实现海浪磁场噪声抑制及海浪磁场噪声的产生附matlab代码
Celery进阶_任务优先级分配
C专家编程 第9章 再论数组 9.4 数组片段的下标
Introduction to the JSP
Cyanine5tetrazine(CAS号:1427705-31-4)结构式原理
Exchange VLAN experiment
如何应对网络攻击?
Postman interface test [official website] latest version installation and use tutorial
ARM开发(二)ARM体系结构——ARM,数据和指令类型,处理器工作模式,寄存器,状态寄存器,流水线,指令集,汇编小练习题
What aspects should we start with for interface security testing?
加密公司集体裁员 以应对加密寒冬和通货膨胀?现加密总市值低于1万亿美元
Zabbix 5.0 监控教程(五)
【机器学习】21天挑战赛学习笔记(三)
Lottie进阶和原理分析
对线面试官实现去重和幂等
redis集群详解