当前位置:网站首页>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专家编程 第8章 为什么程序员无法分清万圣节和圣诞节 8.10 轻松一下---国际C语言混乱代码大赛
- C专家编程 第9章 再论数组 9.1 什么时候数组与指针相同
- Rotate the neon circle
- 多商户商城系统功能拆解23讲-平台端分销等级
- 并查集相关知识点
- Doris从理论详解到千万级数据量场景使用
- 【21天学习挑战赛】二分查找题目之寻找峰值
- C专家编程 第10章 再论指针 10.2 指针数组就是Iliffle向量
- 如何实现canal数据同步
- What are the most popular automated testing tools in 2022?The most complete and most detailed of the entire network is here
猜你喜欢

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.

Chapter3 numpy创建数组

Zabbix 5.0 监控教程(四)

Chrome的JSON美化插件

Chapter2多元函数

Shell脚本:正则表达式

交换VLAN实验

What are the functions and applications of the smart counter control board?

DSP28379学习笔记 (一)——GPIO基本操作

三箭资本濒临破产?市场陷入1907年恐慌之中?加密监管不可避免
随机推荐
【机器学习】21天挑战赛学习笔记(三)
MVVM项目开发(商品管理系统二)
【问题记录】pip 安装报错 Failed to establish a new connection
浅聊一下那些营销工具—优惠券
让历史文化“活”起来,北京河图“万象中轴”助力打造北京城市金名片
MySQL相关知识 和 数据的存储相关知识
C专家编程 第9章 再论数组 9.6 C语言的多维数组
【洛谷】P1456 Monkey King
2022-08-08 第五小组 顾祥全 学习笔记 day31-集合-IO流-File类
powershell 执行策略
【扫雷--1】
Chapter 2数据分析
加密公司集体裁员 以应对加密寒冬和通货膨胀?现加密总市值低于1万亿美元
Kubernetes:(十三)secret与configmap的那些事
redis集群详解
高并发+海量数据下如何实现系统解耦?【中】
非关系型数据库MongoDB:(二)副本集部署说明、数据迁移、限制内存、启用mongo认证
What are the functions and applications of the smart counter control board?
Matlab optimization method -- 0.618 method
【洛谷】P5091 【模板】扩展欧拉定理