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

边栏推荐
- Matlab simulation of vertical handover between MTD SCDMA and TD LTE dual networks
- Is the galaxy VIP account opened by qiniu safe?
- 2022-07-21 第四小组 多态
- Opencv报错:(parameter or structure field))Unrecognized or unsupported array type in functon ‘cvGetMat‘
- OxyCon 2022 网络抓取前沿大会即将开启!
- Win11更改磁盘驱动器号的方法
- Unknown-Aware Object Detection:Learning What You Don’t Know from Videos in the Wild(CVPR 2022)
- How to close the case prompt icon of win11? Closing method of win11 case prompt Icon
- tf.truncated_normal()用法
- Golang 中‘...‘的用法
猜你喜欢

ByteDance (Tiktok) software test monthly salary 23K post, technical two-sided interview questions are newly released

Multithreaded programming

ES6 set and map

Win11 method of changing disk drive letter

VR panoramic shooting and production of business center helps businesses effectively attract people

LeetCode·

Standardize your own debug process

Opencv annotates the image (picture frame + writing)

经典面试问题——OOP语言的三大特征

使用anaconda配置gpu版本的tensorflow(30系列以下显卡)
随机推荐
一篇文章让你理解 云原生 容器化相关
OxyCon 2022 网络抓取前沿大会即将开启!
Type the URL to the web page display. What happened during this period?
Opencv报错:(parameter or structure field))Unrecognized or unsupported array type in functon ‘cvGetMat‘
Looking at the next step of BAIC bluevale through the 8billion fund-raising, product upgrading and building core capabilities are the key words
els 初始化窗口类
JVM memory model parsing
Summary of Huawei virtualization fusioncompute knowledge points
Unknown-Aware Object Detection:Learning What You Don’t Know from Videos in the Wild(CVPR 2022)
els 回调函数、退出消息
堆内存与栈内存的区别?
Quick check of OGC WebGIS common service standards (wms/wmts/tms/wfs)
一切的源头,代码分支策略的选择
Small test (I)
使用anaconda配置gpu版本的tensorflow(30系列以下显卡)
Day 7 hcip notes sorting (OSPF configuration)
Managing databases in a hybrid cloud: eight key considerations
78. 子集
GoLang 抽奖系统 设计
Swin Transformer【Backbone】