Skip to Content
SDN时代中的MPLS
book

SDN时代中的MPLS

by Antonio Sanchez Monge, Krzysztof Grzegorz Szarkowicz
May 2025
Intermediate to advanced
920 pages
13h 33m
Chinese
O'Reilly Media, Inc.
Content preview from SDN时代中的MPLS

第 3 章 第 3 层单播 MPLS 服务 第 3 层单播 MPLS 服务

本作品已使用人工智能进行翻译。欢迎您提供反馈和意见:translation-feedback@oreilly.com

到目前为止,本书已经介绍了 MPLS 的主要作用:在服务提供商(SP)或数据中心核心之间建立隧道(LSP)以传输数据包。在前面的示例中,入口 PE 在将每个 IPv4 数据包放入 LSP 之前,都会对其进行路由查找。路由查找过程会考虑 IPv4 报头中包含的第 3 层(L3)字段;用户数据包会单播定向到单个主机。综上所述,MPLS 上的 IPv4 互联网转接是一种 L3 单播 MPLS 服务。从历史上看,它是第一个 MPLS 服务,从数量上看,它也是使用最广泛的 MPLS 服务。

MPLS 上的 IPv4 互联网是一种无标签服务,即数据包到达出口(服务)PE 时通常没有 MPLS 标签。在 LSP 中,数据包只携带传输标签,不携带服务标签。什么是服务标签?简单地说,它就是一个MPLS标签,用来标识一项服务。乍一看,传输标签和服务标签是无法区分的:它们看起来是一样的。区别在于标签交换路由器(LSR)和标签边缘路由器(LER)对标签的解释方式,这是由信令过程决定的:当 LSR/LER 发布标签广告时,它也在将标签映射为具有确切含义的东西

如果对 MPLS 服务进行标记,入口 PE 通常会推送由两个 MPLS 标头组成的堆栈--只要出口 PE 的距离超过一跳。外层报头和内层报头分别包含传输标签和服务标签。在路径的后期,倒数第二个 LSR 会弹出传输标签,并将服务标签暴露给出口 PE。如果您难以理解,请不要担心,后面的示例会对您有所帮助。

还有哪些其他 L3 单播 MPLS 服务?以下是一些常用的例子:

  • 通过 IPv4/MPLS 核心传输互联网 IPv6 数据包--俗称6PE 的服务。入口 PE 在其全局IPv6 表上执行路由查找。

  • L3 虚拟专用网络(L3VPN)。入口 PE 在专用于特定客户或租户的私有表上执行路由查询。

租户通常可以是外部客户或内部部门,但也可以是应用程序。多租户一词指的是服务在租户之间隔离流量和路由信息的能力。

备注

在本章的所有示例中,PE 将路由状态从一个 NLRI 转换到另一个 NLRI--AFI/SAFI 值发生变化。这将自动触发 PE 的下一跳-自身 (NHS) 操作。

6PE:IPv4/MPLS 核心网中的 IPv6 传输

图 3-1所示的 6PE 解决方案在 RFC 4798 中有所描述,它允许通过 IPv4/MPLS 主干网传输 IPv6 单播数据包,其 P 路由器完全不知道 IPv6。考虑到截至本文撰写时,IPv6 标签分发协议(LDP)尚未实施,6PE 是运营商在互联网核心中传输 IPv6 的实际技术。

6PE Topology
图 3-1. 6PE 拓扑
备注

从现在起,在第 3 章到 第 9 章中,PE1-PE2 和 PE3-PE4 链路的中间系统到中间系统(IS-IS)度量为 100。因此,从 PE1 到 PE4 的首选路径是 PE1-P1=P2-PE4,反之亦然。

主机、CE 和 PE 都是支持 IPv4 和 IPv6 的双协议栈设备。为便于理解,IPv6 寻址与 IPv4 非常相似。例如,H1 的 IPv4 和 IPv6 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Beginning AppleScript®

Beginning AppleScript®

Stephen G. Kochan

Publisher Resources

ISBN: 9798341658226