当前位置:网站首页>MPLS基础实验配置
MPLS基础实验配置
2022-07-26 03:12:00 【网络攻城狮summary】
MPLS优势
- MPLS 是通过标签来进行转发数据,加快数据的转发效率。
- MPLS可以承载许多不同类型的流量。
- MPLS能够设置预编程的回退路径,可以快速切换故障路径。
- MPLS能够为流量分配QoS功能。
实验拓扑

实验讲解
OSPF配置,保证网内通讯
- 本次MPLS基础实验有4个路由器,使用OSPF动态路由协议保证网内通讯,如下是OSPF的配置。
R1:
int g0/0/0
ip add 12.1.1.1 24
interface LoopBack0
ip address 1.1.1.1 32
ospf 1 router-id 1.1.1.1
area 0
network 1.1.1.1 0.0.0.0
network 12.1.1.0 0.0.0.255
R2:
int g0/0/0
ip add 12.1.1.2 24
interface LoopBack0
ip address 2.2.2.2 32
int g0/0/1
ip add 23.1.1.2 24
ospf 1 router-id 2.2.2.2
area 0
network 2.2.2.2 0.0.0.0
network 12.1.1.0 0.0.0.255
network 23.1.1.0 0.0.0.255
R3:
int g0/0/0
ip add 23.1.1.3 24
interface LoopBack0
ip address 3.3.3.3 32
int g0/0/1
ip add 34.1.1.3 24
ospf 1 router-id 3.3.3.3
area 0
network 3.3.3.3 0.0.0.0
network 34.1.1.0 0.0.0.255
network 23.1.1.0 0.0.0.255
R4:
int g0/0/0
ip add 34.1.1.4 24
interface LoopBack0
ip address 4.4.4.4 32
ospf 1 router-id 4.4.4.4
area 0
network 4.4.4.4 0.0.0.0
network 34.1.1.0 0.0.0.255
- 验证一下ospf配置成功:


配置MPLS
R1:
mpls lsr-id 1.1.1.1 //配置标签交换路由器的id号
mpls //启用MPLS
q
mpls ldp //启用标签分发协议
q
int g0/0/0 //进入接口再启用一次MPLS
mpls
mpls ldp
q
R2:
mpls lsr-id 2.2.2.2
mpls
q
mpls ldp
q
int g0/0/0
mpls
mpls ldp
q
int g0/0/1
mpls
mpls ldp
q
R3:
mpls lsr-id 3.3.3.3
mpls
q
mpls ldp
q
int g0/0/0
mpls
mpls ldp
q
int g0/0/1
mpls
mpls ldp
q
R4:
mpls lsr-id 4.4.4.4
mpls
q
mpls ldp
q
int g0/0/0
mpls
mpls ldp
q
- 验证MPLS配置成功:
使用命令dis mpls ldp peer查看邻居状态,R1已经成功匹配邻居2.2.2.2,也就是路由器R2,发现源是G0/0/0口。
- R2路由器发现了两个邻居,发现源分别是两个接口G0/0/0和G0/0/1。

- 使用命令
dis mpls lsp查看标签交换协议与标签号。

- 使用命令
tracert lsp ip 4.4.4.4 32查看转发路径中的标签状态,可以看到刚开始是没有标签的,到12.1.1.2时压入一个标签1026,到最后的34.1.1.4时标签是3,并且下一跳的type是egress,代表下一跳剥离标签,数据到达4.4.4.4。

- 通过抓包也能看到数据包里面的标签是1026。

边栏推荐
- [sql] case expression
- [C Advanced] deeply explore the storage of data (in-depth analysis + interpretation of typical examples)
- STM32 - serial port learning notes (one byte, 16 bit data, string, array)
- JVM memory model parsing
- Get twice the result with half the effort: learn the web performance test case design model
- [SQL] CASE表达式
- [untitled]
- "Xiao Deng's view" the value brought by Siem to enterprises (II)
- What's good for starting a business with 10000 yuan? Is we media OK?
- els 回调函数、退出消息
猜你喜欢

文件操作(一)——文件简介与文件的打开方式和关闭

实现一个方法,找出数组中的第k大和第m大的数字相加之和

Summary of Huawei virtualization fusioncompute knowledge points

【C语言】深入理解 整型提升 和 算术转换

Looking at the next step of BAIC bluevale through the 8billion fund-raising, product upgrading and building core capabilities are the key words
![[C language] deeply understand integer lifting and arithmetic conversion](/img/5c/21d0df424c034721c64b0653edc483.png)
[C language] deeply understand integer lifting and arithmetic conversion

Safety margin of mass consumption

Leetcode · daily question · 919. complete binary tree inserter · hierarchy traversal · BFS
![[untitled]](/img/6f/a2cd98af7a8de469e5311422b48afe.png)
[untitled]

Execution process behind shell commands
随机推荐
Win11大小写提示图标怎么关闭?Win11大小写提示图标的关闭方法
2022-07-21 第四小组 多态
ByteDance (Tiktok) software test monthly salary 23K post, technical two-sided interview questions are newly released
FPGA_ Initial use process of vivado software_ Ultra detailed
Canvas -- drawing of rectangle -- making of histogram
Get twice the result with half the effort: learn the web performance test case design model
els 消息循环
els 注册窗口类、创建窗口类、显示窗口
NFT因无意义而美丽
UE4 how to render statically? 5 steps to generate static rendering
els 回调函数、退出消息
班级里有一群学生考试结果出来了,考了语文和数学两门,请筛选出总分是第一的同学
STM32 - serial port learning notes (one byte, 16 bit data, string, array)
Opencv annotates the image (picture frame + writing)
Execution process behind shell commands
如何正确计算 Kubernetes 容器 CPU 使用率
Teach you to rely on management hand in hand
els 初始化窗口类
Use eventlog analyzer for log forensics analysis
Opencv error: (parameter or structure field)) unrecognized or unsupported array type in functon 'cvgetmat‘