示例:配置多段伪线
此示例说明如何配置动态多段伪线 (MS-PW),其中拼接提供商边缘 (S-PE) 设备由 BGP 自动动态发现,伪线由 LDP 使用 FEC 129 发出信号。这种部署需要在 S-PE 上进行最低限度的配置,从而减轻与静态配置的第 2 层电路相关的配置负担,同时仍使用 LDP 作为底层信令协议。
要求
此示例使用以下硬件和软件组件:
六台路由器,可以是 M Series 多服务边缘路由器、MX 系列 5G 通用路由平台、T Series 核心路由器或 PTX 系列 数据包传输路由器 的组合。
两个远程 PE 设备配置为终止 PE (T-PE)。
两个 S-PE 配置为:
路由反射器(在区域间配置的情况下)。
如果采用 AS 间配置,则为 AS 边界路由器或路由反射器。
所有设备上运行 Junos OS 13.3 或更高版本。
开始之前:
配置设备接口。
配置 OSPF 或任何其他 IGP 协议。
配置 BGP。
配置 LDP。
配置 MPLS。
概述
从 Junos OS 13.3 版开始,您可以在 MPLS 数据包交换网络 (PSN) 中使用 FEC 129 以及 LDP 信令和 BGP 自动发现来配置 MS-PW。MS-PW 功能还提供来自 T-PE 设备的作、行政和管理 (OAM) 功能,例如 ping、traceroute 和 BFD。
要在 MS-PW 中启用 S-PE 的自动发现,请在层次结构级别包含[edit protocols bgp group group-name family l2vpn]该auto-discovery-mspw语句。
family l2vpn {
auto-discovery-mspw;
}
S-PE的自动选择和MS-PW的动态设置在很大程度上依赖于BGP。BGP为FEC 129伪线构造的用于自动发现S-PE的网络层可达性信息(NLRI)称为MS-PW NLRI [draft-ietf-pwe3-dynamic-ms-pw-15.txt]。MS-PW NLRI 本质上是一个前缀,由路由识别符 (RD) 和 FEC 129 源附件标识符 (SAII) 组成。它称为 BGP 自动发现 (BGP-AD) 路由,编码为 RD:SAII。
只有配置了 2 类 AII 的 T-PE 才会分别启动自己的 MS-PW NLRI。由于 2 类 AII 在全局范围内是唯一的,因此 MS-PW NLRI 用于识别调配 2 类 AII 的 PE 设备。1 类 AII 和 2 类 AII 之间的区别要求在 BGP 中定义新的地址族指示器 (AFI) 和后续地址族标识符 (SAFI),以支持 MS-PW。用于识别 MS-PW NLRI 的拟议 AFI 和 SAFI 值对分别为 25 和 6(等待 IANA 分配)。
AFI 和 SAFI 值支持 S-PE 的自动发现,应在发起路由的 T-PE 和参与信令的 S-PE 上配置。
图 1 展示了两个远程 PE 路由器(T-PE1 和 T-PE2)之间的区域间 MS-PW 设置。提供商 (P) 路由器为 P1 和 P2,S-PE 路由器为 S-PE1 和 S-PE2。MS-PW 在 T-PE1 和 T-PE2 之间建立,所有设备都属于同一个 AS — AS 100。由于 S-PE1 和 S-PE2 属于同一个 AS,因此它们充当路由反射器,也分别称为 RR 1 和 RR 2。
图 2 展示了 AS 间 MS-PW 设置。MS-PW 在 T-PE1 和 T-PE2 之间建立,其中 T-PE1、P1 和 S-PE1 属于 AS 1,S-PE2、P2 和 T-PE2 属于 AS 2。由于 S-PE1 和 S-PE2 属于不同的 AS,因此将其配置为 ASBR 路由器,并且分别称为 ASBR 1 和 ASBR 2。
以下部分将介绍如何在区域间和 AS 间场景中建立 MS-PW。
Minimum Configuration Requirements on S-PE
为了动态发现 SS-PW 的两端并动态设置 T-LDP 会话,需要满足以下条件:
对于区域间 MS-PW,每个 S-PE 都扮演 ABR 和 BGP 路由反射器角色。
在区域间情况下,如 图 1 所示,S-PE 扮演 BGP 路由反射器角色,并将 BGP-AD 路由反射到其客户端。一个 T-PE 播发的 BGP-AD 路由最终会到达其远程 T-PE。由于每个 S-PE 设置下一跳自,接收 BGP-AD 路由的 S-PE 或 T-PE 始终可以通过BGP下一跃点发现在其本地AS或本地区域播发 BGP-AD 的 S-PE。
对于 AS 间 MS-PW,每个 S-PE 要么扮演一个 ASBR 要么是一个 BGP 路由反射器角色。
在 MS-PW 中,两个 T-PE 分别启动 BGP-AD 路由。当 S-PE 通过与 T-PE 的 IBGP 会话或常规 BGP-RR 接收 BGP-AD 路由时,它会在 AS 间情况下将 BGP-AD 路由重新播发至其一个或多个 EBGP 对等方之前设置下一跃点自带,如 图 2 所示。
当重新播发或反映 MS-PW 的 BGP-AD 路由时,每个 S-PE 都必须设置下一跳自。
Active and Passive Role of T-PE
为确保在两个方向上将同一组 S-PE 用于 MS-PW,两个 T-PE 在 FEC 129 信令方面发挥不同的作用。这是为了避免在为 MS-PW 动态选择每个 S-PE 时,T-PE1 和 T-PE2 选择不同的路径。
当使用 FEC 129 向 MS-PW 发出信号时,每个 T-PE 可以独立开始向 MS-PW 发出信号。信令过程可能会导致尝试通过不同的 S-PE 设置 MS-PW 的每个方向。
为避免这种情况,其中一个 T-PE 必须启动伪线信令(主动角色),而另一个 T-PE 则等待接收 LDP 标签映射,然后再发送相应的伪线 LDP 标签映射消息(被动角色)。当 MS-PW 路径动态放置时,必须先识别有源 T-PE(源 T-PE)和无源 T-PE(目标 T-PE),然后才能为给定 MS-PW 启动信令。根据 SAII 值确定哪个 T-PE 承担主动角色,其中具有较大 SAII 值的 T-PE 起积极作用。
在本例中,T-PE1 和 T-PE 2 的 SAII 值分别为 800:800:800 和 700:700:700。由于 T-PE1 的 SAII 值较高,因此它承担主动角色,T-PE2 承担被动角色。
Directions for Establishing an MS-PW
S-PE 用于设置 MS-PW 的说明是:
转发方向 — 从有源 T-PE 到无源 T-PE。
在此方向上,S-PE 执行 BGP-AD 路由查找,以确定要发送标签映射消息的下一跳 S-PE。
反向 — 从无源 T-PE 到有源 T-PE。
在此方向上,S-PE 不执行 BGP-AD 路由查找,因为标签映射消息是从 T-PE 接收的,并且拼接路由安装在 S-PE 中。
在此示例中,MS-PW 在从 T-PE1 到 T-PE2 的转发方向上建立。当 MS-PW 从 T-PE2 放置到 T-PE1 时,MS-PW 将以相反的方向建立。
Autodiscovery and Dynamic Selection of S-PE
在 BGP 中定义了新的 AFI 和 SAFI 值,以支持基于 2 类 AII 的 MS-PW。此新地址族支持 S-PE 的自动发现。必须同时在 TPE 和 SPE 上配置此地址族。
第 2 层 VPN 组件负责动态选择要沿着 MS-PW 在转发方向上的下一个 S-PE。
在转发方向上,选择下一个 S-PE 基于 BGP 播发的 BGP-AD 路由和 LDP 发送的伪线 FEC 信息。BGP-AD 路由由无源 T-PE (T-PE2) 反向启动,而伪线 FEC 信息由 LDP 从有源 T-PE (T-PE1) 转发方向发送。
在相反的方向上,通过查找用于在转发方向上建立伪线的 S-PE (S-PE1),获得下一个 S-PE (S-PE2) 或活动 T-PE (T-PE1)。
Provisioning a T-PE
要支持 FEC 129 2 类 AII,T-PE 需要配置其远程 T-PE 的 IP 地址、全局 ID 和连接电路 ID。 不支持在 T-PE 上显式指定要使用的一组 S-PE 的显式路径。这样就无需为每个 S-PE 配置一个 2 类 AII。
Stitching an MS-PW
S-PE 在将收到的标签映射消息转发到下一个 S-PE 之前,先执行以下 MPLS 标签作:
弹出 MPLS 隧道标签。
弹出虚拟机箱标签。
推送新的虚拟机箱标签。
推送用于下一个分段的 MPLS 隧道标签。
Establishing an MS-PW
完成必要的配置后,将按以下方式建立 MS-PW:
使用 BGP 在 T-PE1 和 T-PE2 之间交换 SAII 值。
T-PE1 承担活动 T-PE 角色,因为它配置了更高的 SAII 值。T-PE2 变为无源 T-PE。
T-PE1 接收源自 T-PE2 的 BGP-AD 路由。它将从收到的 BGP-AD 路由中的 T-PE2 获得的 AII 值与本地调配的 AII 值进行比较。
如果 AII 值匹配,T-PE1 将执行 BGP-AD 路由查找,以选择第一个 S-PE (S-PE1)。
T-PE1 向 S-PE1 发送 LDP 标签映射消息。
S-PE1 使用源自 T-PE2 的 BGP-AD 路由和从 T-PE1 接收的 LDP 标签映射消息,选择转发方向上的下一个 S-PE (S-PE2)。
为此,S-PE1 将从 BGP-AD 路由获得的 SAII 与从 LDP 标签映射消息获得的 TAI 进行比较。
如果 AII 值匹配,S-PE1 将通过与 BGP-AD 路由关联的 BGP 下一跃点查找 S-PE2。
选择 S-PE 的过程一直持续到最后一个 S-PE 与 T-PE2 建立 T-LDP 会话为止。当 T-PE2 收到来自最后一个 S-PE (S-PE2) 的 LDP 标签映射消息时,它会启动自己的标签映射消息并将其发送回 S-PE2。
当在 S-PE1 和 S-PE2 上收到所有标签映射消息时,S-PE 将安装拼接路由。因此,当 MS-PW 在相反方向上建立时,S-PE 无需像在转发方向上那样执行 BGP-AD 路由查找来确定其下一跃点。
OAM Support for an MS-PW
建立 MS-PW 后,可从 T-PE 设备执行以下 OAM 功能:
Ping
T-PE 之间的端到端连接验证
如果 T-PE1、S-PE 和 T-PE2 支持控制字 (CW),伪线控制平面会自动协商 CW 的使用。 虚拟电路连接验证 (VCCV) 控制通道 (CC) 无论伪线上是否启用 CW,类型 3 都将正常运行。但是,仅用于端到端验证的 VCCV Type 1 仅在启用 CW 时受支持。
下面是一个示例:
从 T-P1 到 T-PE2 的 Ping
user@T-PE1> ping mpls l2vpn fec129 instance instance-name local-id SAII of T-PE1 remote-pe-address address of T-PE2 remote-id TAII of T-PE2
或
user@T-PE1> ping mpls l2vpn fec129 interface CE1-facing interface
从 T-PE 到任何 S-PE 的部分连接验证
要跟踪部分 MS-PW,可以使用伪线标签的 TTL 强制 VCCV 消息在中间节点弹出。当 TTL 到期时,S-PE 可以通过检查 CW 或检查具有 UDP 目标端口 3502 的有效 IP 报头(如果未使用 CW)来确定数据包是否为 VCCV 数据包。然后,应将数据包转移到 VCCV 处理。
如果 T-PE1 发送伪线标签的 TTL 等于 1 的 VCCV 消息,则 TTL 将在 S-PE 上过期。因此,T-PE1 可以验证伪线的第一段。
VCCV 数据包是根据 RFC 4379 构建的。通过检查 S-PE TLV 收集构建 VCCV LSP ping 数据包所需的所有信息。此 TTL 的使用受 RFC 5085 中说明的注意事项的约束。如果 S-PE 之间或 S-PE 与 T-PE 之间的倒数第二个标签交换路由器纵伪线标签 TTL,则 VCCV 消息可能不会从 MS-PW 的正确 S-PE 中出现。
下面是一个示例:
从 T-PE1 到 S-PE 的 Ping
user@T-PE1> ping mpls l2vpn fec129 interface CE1-facing interface bottom-label-ttl segment
bottom-label-ttlS-PE1 的值为 1,S-PE2 的值为 2。该
bottom-label-ttl语句会设置正确的 VC 标签 TTL,以便将数据包弹出到正确的 SS-PW 以进行 VCCV 处理。
注意:Junos OS 支持 VCCV 类型 1 和类型 3 用于 MS-PW OAM 功能。不支持 VCCV Type 2。
跟踪路由
Traceroute 在类似于 LSP 跟踪的单个作中沿 MS-PW 路径测试每个 S-PE。该作能够确定 MS-PW 的实际数据路径,并用于动态信号 MS-PW。
user@T-PE1> traceroute mpls l2vpn fec129 interface CE1-facing interface
双向转发检测
双向转发检测 (BFD) 是一种检测协议,旨在为所有介质类型、封装、拓扑和路由协议提供快速转发路径故障检测时间。除了快进路径故障检测外,BFD 还为网络管理员提供了一致的故障检测方法。可以将路由器或交换机配置为在 BFD 关闭时记录系统日志 (syslog) 消息。
user@T-PE1> show bfd session extensive
配置
配置区域间 MS-PW
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层次结构级别的 [edit] CLI 中。
T-PE1
set interfaces ge-3/1/0 unit 0 family inet address 192.0.2.1/24 set interfaces ge-3/1/0 unit 0 family mpls set interfaces ge-3/1/2 encapsulation ethernet-ccc set interfaces ge-3/1/2 unit 0 set interfaces lo0 unit 0 family inet address 10.255.10.1/32 primary set routing-options autonomous-system 100 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols bgp family l2vpn auto-discovery-mspw set protocols bgp group mspw type internal set protocols bgp group mspw local-address 10.255.10.1 set protocols bgp group mspw neighbor 10.255.2.1 set protocols ospf area 0.0.0.0 interface lo0.0 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols ldp interface lo0.0 set routing-instances ms-pw instance-type l2vpn set routing-instances ms-pw interface ge-3/1/2.0 set routing-instances ms-pw route-distinguisher 10.10.10.10:15 set routing-instances ms-pw l2vpn-id l2vpn-id:100:15 set routing-instances ms-pw vrf-target target:100:115 set routing-instances ms-pw protocols l2vpn site CE1 source-attachment-identifier 800:800:800 set routing-instances ms-pw protocols l2vpn site CE1 interface ge-3/1/2.0 target-attachment-identifier 700:700:700 set routing-instances ms-pw protocols l2vpn pseudowire-status-tlv set routing-instances ms-pw protocols l2vpn oam bfd-liveness-detection minimum-interval 300
P1
set interfaces ge-2/0/0 unit 0 family inet address 192.0.2.2/24 set interfaces ge-2/0/0 unit 0 family mpls set interfaces ge-2/0/2 unit 0 family inet address 192.0.2.13/24 set interfaces ge-2/0/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.13.1/32 primary set routing-options autonomous-system 100 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols ospf area 0.0.0.0 interface lo0.0 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols ldp interface lo0.0
S-PE1 (RR 1)
set interfaces ge-1/3/1 unit 0 family inet address 192.0.2.9/24 set interfaces ge-1/3/1 unit 0 family mpls set interfaces ge-1/3/2 unit 0 family inet address 192.0.2.22/24 set interfaces ge-1/3/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.2.1/32 primary set routing-options autonomous-system 100 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols bgp family l2vpn auto-discovery-mspw set protocols bgp group mspw type internal set protocols bgp group mspw local-address 10.255.2.1 set protocols bgp group mspw export next-hop-self set protocols bgp group mspw cluster 203.0.113.0 set protocols bgp group mspw neighbor 10.255.10.1 set protocols bgp group mspw neighbor 10.255.3.1 set protocols ospf area 0.0.0.0 interface lo0.0 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols ldp interface lo0.0 set policy-options policy-statement next-hop-self then next-hop self set policy-options policy-statement send-inet0 from protocol bgp set policy-options policy-statement send-inet0 then accept
S-PE2 (RR 2)
set interfaces ge-0/3/1 unit 0 family inet address 192.0.2.10/24 set interfaces ge-0/3/1 unit 0 family mpls set interfaces ge-0/3/2 unit 0 family inet address 192.0.2.14/24 set interfaces ge-0/3/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.3.1/32 primary set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols bgp family l2vpn auto-discovery-mspw set protocols bgp group mspw type internal set protocols bgp group mspw local-address 10.255.3.1 set protocols bgp group mspw export next-hop-self set protocols bgp group mspw cluster 198.51.100.0 set protocols bgp group mspw neighbor 10.255.2.1 set protocols bgp group mspw neighbor 10.255.14.1 set protocols bgp group int type internal set protocols bgp group int local-address 10.255.3.1 set protocols bgp group int neighbor 10.255.2.1 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface lo0.0 set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols ldp interface lo0.0 set policy-options policy-statement next-hop-self then next-hop self set policy-options policy-statement send-inet0 from protocol bgp set policy-options policy-statement send-inet0 then accept
P2
set interfaces ge-1/3/1 unit 0 family inet address 192.0.2.5/24 set interfaces ge-1/3/1 unit 0 family mpls set interfaces ge-1/3/2 unit 0 family inet address 192.0.2.4/24 set interfaces ge-1/3/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.4.1/32 primary set routing-options autonomous-system 100 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface lo0.0 set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols ldp interface lo0.0
T-PE2
set interfaces ge-2/0/0 encapsulation ethernet-ccc set interfaces ge-2/0/0 unit 0 set interfaces ge-2/0/2 unit 0 family inet address 192.0.2.15/24 set interfaces ge-2/0/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.14.1/32 primary set routing-options autonomous-system 100 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols bgp family l2vpn auto-discovery-mspw set protocols bgp group mspw type internal set protocols bgp group mspw local-address 10.255.14.1 set protocols bgp group mspw neighbor 10.255.3.1 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols ldp interface lo0.0 set routing-instances ms-pw instance-type l2vpn set routing-instances ms-pw interface ge-2/0/0.0 set routing-instances ms-pw route-distinguisher 10.10.10.10:15 set routing-instances ms-pw l2vpn-id l2vpn-id:100:15 set routing-instances ms-pw vrf-target target:100:115 set routing-instances ms-pw protocols l2vpn site CE2 source-attachment-identifier 700:700:700 set routing-instances ms-pw protocols l2vpn site CE2 interface ge-2/0/0.0 target-attachment-identifier 800:800:800 set routing-instances ms-pw protocols l2vpn pseudowire-status-tlv set routing-instances ms-pw protocols l2vpn oam bfd-liveness-detection minimum-interval 300
分步程序
下面的示例要求您在各个配置层级中进行导航。有关导航 CLI 的信息,请参阅在 配置模式下使用 CLI 编辑器。
要在区域间方案中配置 T-PE1:
修改相应的接口名称、地址和其他参数后,对 MPLS 域中的 T-PE2 设备重复此过程。
配置 T-PE1 接口。
[edit interfaces]user@T-PE1# set ge-3/1/0 unit 0 family inet address 192.0.2.1/24 user@T-PE1# set ge-3/1/0 unit 0 family mpls user@T-PE1# set ge-3/1/2 encapsulation ethernet-ccc user@T-PE1# set ge-3/1/2 unit 0 user@T-PE1# set lo0 unit 0 family inet address 10.255.10.1/32 primary设置自治系统编号。
[edit routing-options]user@T-PE1# set autonomous-system 100在 T-PE1 的所有接口上启用 MPLS,管理接口除外。
[edit protocols]user@T-PE1# set mpls interface all user@T-PE1# set mpls interface fxp0.0 disable使用 BGP 自动发现组成 MS-PW 的中间 S-PE。
[edit protocols]user@T-PE1# set bgp family l2vpn auto-discovery-mspw为 T-PE1 配置 BGP 组。
[edit protocols]user@T-PE1# set bgp group mspw type internal将本地地址和邻居地址分配给 MSPW 组,以便 T-PE1 与 S-PE1 对等。
[edit protocols]user@T-PE1# set bgp group mspw local-address 10.255.10.1 user@T-PE1# set bgp group mspw neighbor 10.255.2.1在 T-PE1 的所有接口上配置 OSPF,管理接口除外。
[edit protocols] user@T-PE1# set ospf area 0.0.0.0 interface lo0.0 user@T-PE1# set ospf area 0.0.0.0 interface all user@T-PE1# set ospf area 0.0.0.0 interface fxp0.0 disable
在 T-PE1 的所有接口上配置 LDP,管理接口除外。
[edit protocols] user@T-PE1# set ldp interface all user@T-PE1# set ldp interface fxp0.0 disable user@T-PE1# set ldp interface lo0.0
在 T-PE1 上配置第 2 层 VPN 路由实例。
[edit routing-instances] user@T-PE1# set ms-pw instance-type l2vpn
为 mspw 路由实例分配接口名称。
[edit routing-instances] user@T-PE1# set ms-pw interface ge-3/1/2.0
为 mspw 路由实例配置路由识别符。
[edit routing-instances] user@T-PE1# set ms-pw route-distinguisher 10.10.10.10:15
为 FEC 129 MS-PW 配置第 2 层 VPN ID 社区。
[edit routing-instances] user@T-PE1# set ms-pw l2vpn-id l2vpn-id:100:15
为 MSPW 路由实例配置 VPN 路由和转发 (VRF) 目标。
[edit routing-instances] user@T-PE1# set ms-pw vrf-target target:100:115
使用第 2 层 VPN 作为 mspw 路由实例的路由协议,配置源附件标识符 (SAI) 值。
[edit routing-instances] user@T-PE1# set ms-pw protocols l2vpn site CE1 source-attachment-identifier 800:800:800
分配将 CE1 站点连接到 VPN 的接口名称,并使用第 2 层 VPN 作为 mspw 路由实例的路由协议来配置目标附件标识符 (TAI) 值。
[edit routing-instances] user@T-PE1# set ms-pw protocols l2vpn site CE1 interface ge-3/1/2.0 target-attachment-identifier 700:700:700
(选答)配置 T-PE1 以发送 MS-PW 状态 TLV。
[edit routing-instances] user@T-PE1# set ms-pw protocols l2vpn pseudowire-status-tlv
(选答)为 VPN 配置 OAM 功能。
[edit routing-instances] user@T-PE1# set ms-pw protocols l2vpn oam bfd-liveness-detection minimum-interval 300
分步程序
下面的示例要求您在各个配置层级中进行导航。有关导航 CLI 的信息,请参阅在 配置模式下使用 CLI 编辑器。
要在区域间场景中配置 S-PE1 (RR 1),请执行以下作:
修改相应的接口名称、地址和其他参数后,对 MPLS 域中的 S-PE2 (RR 2) 设备重复此过程。
配置 S-PE1 接口。
[edit interfaces]user@S-PE1# set ge-1/3/1 unit 0 family inet address 192.0.2.9/24 user@S-PE1# set ge-1/3/1 unit 0 family mpls user@S-PE1# set ge-1/3/2 unit 0 family inet address 192.0.2.22/24 user@S-PE1# set ge-1/3/2 unit 0 family mpls user@S-PE1# set lo0 unit 0 family inet address 10.255.2.1/32 primary设置自治系统编号。
[edit routing-options]user@S-PE1# set autonomous-system 100在 T-PE1 的所有接口上启用 MPLS,管理接口除外。
[edit protocols]user@S-PE1# set mpls interface all user@S-PE1# set mpls interface fxp0.0 disable使用 BGP 启用 S-PE 的自动发现。
[edit protocols]user@S-PE1# set bgp family l2vpn auto-discovery-mspw为 S-PE1 配置 BGP 组。
[edit protocols]user@S-PE1# set bgp group mspw type internal将 S-PE1 配置为充当路由反射器。
[edit protocols]user@S-PE1# set bgp group mspw export next-hop-self user@S-PE1# set bgp group mspw cluster 203.0.113.0将本地地址和邻居地址分配给 MSPW 组,以便 S-PE1 与 T-PE1 和 S-PE2 对等。
[edit protocols]user@S-PE1# set bgp group mspw local-address 10.255.2.1 user@S-PE1# set bgp group mspw neighbor 10.255.10.1 (to T-PE1) user@S-PE1# set bgp group mspw neighbor 10.255.3.1 (to S-PE2)在 S-PE1 的所有接口上配置 OSPF,管理接口除外。
[edit protocols] user@S-PE1# set ospf area 0.0.0.0 interface all user@S-PE1# set ospf area 0.0.0.0 interface fxp0.0 disable user@S-PE1# set ospf area 0.0.0.0 interface lo0.0
在 S-PE1 的所有接口上配置 LDP,管理接口除外。
[edit protocols] user@S-PE1# set ldp interface all user@S-PE1# set ldp interface fxp0.0 disable user@S-PE1# set ldp interface lo0.0
定义用于在 S-PE1 上启用下一跳自并接受 BGP 流量的策略。
[edit policy-options] user@S-PE1# set policy-statement next-hop-self then next-hop self user@S-PE1# set policy-statement send-inet0 from protocol bgp user@S-PE1# set policy-statement send-inet0 then accept
结果
在配置模式下,输入 show interfaces、 show protocols、 show routing-optionsshow routing-instances和show policy-options命令以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明以更正配置。
T-PE1
user@T-PE1# show interfaces
ge-3/1/0 {
unit 0 {
family inet {
address 192.0.2.1/24;
}
family mpls;
}
}
ge-3/1/2 {
encapsulation ethernet-ccc;
unit 0;
}
lo0 {
unit 0 {
family inet {
address 10.255.10.1/32 {
primary;
}
}
}
}
user@T-PE1# show routing-options
autonomous-system 100;
user@T-PE1# show protocols
mpls {
interface all;
interface fxp0.0 {
disable;
}
}
bgp {
family l2vpn {
auto-discovery-mspw;
}
group mspw {
type internal;
local-address 10.255.10.1;
neighbor 10.255.2.1;
}
}
ospf {
area 0.0.0.0 {
interface all;
interface fxp0.0 {
disable;
}
interface lo0.0;
}
}
ldp {
interface all;
interface fxp0.0 {
disable;
}
interface lo0.0;
}
user@T-PE1# show routing-instances
ms-pw {
instance-type l2vpn;
interface ge-3/1/2.0;
route-distinguisher 10.10.10.10:15;
l2vpn-id l2vpn-id:100:15;
vrf-target target:100:115;
protocols {
l2vpn {
site CE1 {
source-attachment-identifier 800:800:800;
interface ge-3/1/2.0 {
target-attachment-identifier 700:700:700;
}
}
pseudowire-status-tlv;
oam {
bfd-liveness-detection {
minimum-interval 300;
}
}
}
}
}
S-PE1 (RR 1)
user@S-PE1# show interfaces
ge-1/3/1 {
unit 0 {
family inet {
address 192.0.2.9/24;
}
family mpls;
}
}
ge-1/3/2 {
unit 0 {
family inet {
address 192.0.2.22/24;
}
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 10.255.2.1/32 {
primary;
}
}
}
}
user@S-PE1# show routing-options
autonomous-system 100;
user@S-PE1# show protocols
mpls {
interface all;
interface fxp0.0 {
disable;
}
}
bgp {
family l2vpn {
auto-discovery-mspw;
}
group mspw {
type internal;
local-address 10.255.2.1;
export next-hop-self;
cluster 203.0.113.0;
neighbor 10.255.10.1;
neighbor 10.255.3.1;
}
}
ospf {
area 0.0.0.0 {
interface lo0.0;
interface all;
interface fxp0.0 {
disable;
}
}
}
ldp {
interface all;
interface fxp0.0 {
disable;
}
interface lo0.0;
}
user@S-PE1# show policy-options
policy-statement next-hop-self {
then {
next-hop self;
}
}
policy-statement send-inet0 {
from protocol bgp;
then accept;
}
如果完成设备配置,请从配置模式进入。commit
配置 AS 间 MS-PW
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层次结构级别的 [edit] CLI 中。
T-PE1
set interfaces ge-3/1/0 unit 0 family inet address 192.0.2.1/24 set interfaces ge-3/1/0 unit 0 family mpls set interfaces ge-3/1/2 encapsulation ethernet-ccc set interfaces ge-3/1/2 unit 0 set interfaces lo0 unit 0 family inet address 10.255.10.1/32 primary set routing-options autonomous-system 1 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols bgp family l2vpn auto-discovery-mspw set protocols bgp group mspw type internal set protocols bgp group mspw local-address 10.255.10.1 set protocols bgp group mspw neighbor 10.255.2.1 set protocols ospf area 0.0.0.0 interface lo0.0 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols ldp interface lo0.0 set routing-instances ms-pw instance-type l2vpn set routing-instances ms-pw interface ge-3/1/2.0 set routing-instances ms-pw route-distinguisher 10.10.10.10:15 set routing-instances ms-pw l2vpn-id l2vpn-id:100:15 set routing-instances ms-pw vrf-target target:100:115 set routing-instances ms-pw protocols l2vpn site CE1 source-attachment-identifier 800:800:800 set routing-instances ms-pw protocols l2vpn site CE1 interface ge-3/1/2.0 target-attachment-identifier 700:700:700 set routing-instances ms-pw protocols l2vpn pseudowire-status-tlv set routing-instances ms-pw protocols l2vpn oam bfd-liveness-detection minimum-interval 300
P1
set interfaces ge-2/0/0 unit 0 family inet address 192.0.2.2/24 set interfaces ge-2/0/0 unit 0 family mpls set interfaces ge-2/0/2 unit 0 family inet address 192.0.2.13/24 set interfaces ge-2/0/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.13.1/32 primary set routing-options autonomous-system 1 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols ospf area 0.0.0.0 interface lo0.0 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols ldp interface lo0.0
S-PE1 (ASBR 1)
set interfaces ge-1/3/1 unit 0 family inet address 192.0.2.9/24 set interfaces ge-1/3/1 unit 0 family mpls set interfaces ge-1/3/2 unit 0 family inet address 192.0.2.22/24 set interfaces ge-1/3/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.2.1/32 primary set routing-options autonomous-system 1 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols bgp family l2vpn auto-discovery-mspw set protocols bgp group to_T-PE1 type internal set protocols bgp group to_T-PE1 local-address 10.255.2.1 set protocols bgp group to_T-PE1 export next-hop-self set protocols bgp group to_T-PE1 neighbor 10.255.10.1 set protocols bgp group to_S-PE2 type external set protocols bgp group to_S-PE2 local-address 10.255.2.1 set protocols bgp group to_S-PE2 peer-as 2 set protocols bgp group to_S-PE2 neighbor 10.255.3.1 multihop ttl 1 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols ldp interface lo0.0 set policy-options policy-statement next-hop-self then next-hop self
S-PE2 (ASBR 2)
set interfaces ge-0/3/1 unit 0 family inet address 192.0.2.10/24 set interfaces ge-0/3/1 unit 0 family mpls set interfaces ge-0/3/2 unit 0 family inet address 192.0.2.14/24 set interfaces ge-0/3/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.3.1/32 primary set routing-options autonomous-system 2 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols bgp family l2vpn auto-discovery-mspw set protocols bgp group to_T-PE2 type internal set protocols bgp group to_T-PE2 local-address 10.255.3.1 set protocols bgp group to_T-PE2 export next-hop-self set protocols bgp group to_T-PE2 neighbor 10.255.14.1 set protocols bgp group to_S-PE1 type external set protocols bgp group to_S-PE1 local-address 10.255.3.1 set protocols bgp group to_S-PE1 peer-as 1 set protocols bgp group to_S-PE1 neighbor 10.255.2.1 multihop ttl 1 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface lo0.0 set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols ldp interface lo0.0 set policy-options policy-statement next-hop-self then next-hop self
P2
set interfaces ge-1/3/1 unit 0 family inet address 192.0.2.5/24 set interfaces ge-1/3/1 unit 0 family mpls set interfaces ge-1/3/2 unit 0 family inet address 192.0.2.4/24 set interfaces ge-1/3/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.4.1/32 primary set routing-options autonomous-system 2 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface lo0.0 set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols ldp interface lo0.0
T-PE2
set interfaces ge-2/0/0 encapsulation ethernet-ccc set interfaces ge-2/0/0 unit 0 set interfaces ge-2/0/2 unit 0 family inet address 192.0.2.15/24 set interfaces ge-2/0/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.14.1/32 primary set routing-options autonomous-system 2 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols bgp family l2vpn auto-discovery-mspw set protocols bgp group mspw type internal set protocols bgp group mspw local-address 10.255.14.1 set protocols bgp group mspw neighbor 10.255.3.1 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols ldp interface lo0.0 set routing-instances ms-pw instance-type l2vpn set routing-instances ms-pw interface ge-2/0/0.0 set routing-instances ms-pw route-distinguisher 10.10.10.10:15 set routing-instances ms-pw l2vpn-id l2vpn-id:100:15 set routing-instances ms-pw vrf-target target:100:115 set routing-instances ms-pw protocols l2vpn site CE2 source-attachment-identifier 700:700:700 set routing-instances ms-pw protocols l2vpn site CE2 interface ge-2/0/0.0 target-attachment-identifier 800:800:800 set routing-instances ms-pw protocols l2vpn pseudowire-status-tlv set routing-instances ms-pw protocols l2vpn oam bfd-liveness-detection minimum-interval 300
分步程序
下面的示例要求您在各个配置层级中进行导航。有关导航 CLI 的信息,请参阅在 配置模式下使用 CLI 编辑器。
要在 AS 间场景中配置 T-PE1 路由器,请执行以下作:
修改相应的接口名称、地址和其他参数后,对 MPLS 域中的 T-PE2 设备重复此过程。
配置 T-PE1 接口。
[edit interfaces]user@T-PE1# set ge-3/1/0 unit 0 family inet address 192.0.2.1/24 user@T-PE1# set ge-3/1/0 unit 0 family mpls user@T-PE1# set ge-3/1/2 encapsulation ethernet-ccc user@T-PE1# set ge-3/1/2 unit 0 user@T-PE1# set lo0 unit 0 family inet address 10.255.10.1/32 primary设置自治系统编号。
[edit routing-options]user@T-PE1# set autonomous-system 1在 T-PE1 的所有接口上启用 MPLS,管理接口除外。
[edit protocols]user@T-PE1# set mpls interface all user@T-PE1# set mpls interface fxp0.0 disable使用 BGP 自动发现组成 MS-PW 的中间 S-PE。
[edit protocols]user@T-PE1# set bgp family l2vpn auto-discovery-mspw为 T-PE1 配置 BGP 组。
[edit protocols]user@T-PE1# set bgp group mspw type internal将本地地址和邻居地址分配给 MSPW 组,以便 T-PE1 与 S-PE1 对等。
[edit protocols]user@T-PE1# set bgp group mspw local-address 10.255.10.1 user@T-PE1# set bgp group mspw neighbor 10.255.2.1在 T-PE1 的所有接口上配置 OSPF,管理接口除外。
[edit protocols] user@T-PE1# set ospf area 0.0.0.0 interface lo0.0 user@T-PE1# set ospf area 0.0.0.0 interface all user@T-PE1# set ospf area 0.0.0.0 interface fxp0.0 disable
在 T-PE1 的所有接口上配置 LDP,管理接口除外。
[edit protocols] user@T-PE1# set ldp interface all user@T-PE1# set ldp interface fxp0.0 disable user@T-PE1# set ldp interface lo0.0
在 T-PE1 上配置第 2 层 VPN 路由实例。
[edit routing-instances] user@T-PE1# set ms-pw instance-type l2vpn
为 mspw 路由实例分配接口名称。
[edit routing-instances] user@T-PE1# set ms-pw interface ge-3/1/2.0
为 mspw 路由实例配置路由识别符。
[edit routing-instances] user@T-PE1# set ms-pw route-distinguisher 10.10.10.10:15
为 FEC 129 MS-PW 配置第 2 层 VPN ID 社区。
[edit routing-instances] user@T-PE1# set ms-pw l2vpn-id l2vpn-id:100:15
为 MSPW 路由实例配置 VPN 路由和转发 (VRF) 目标。
[edit routing-instances] user@T-PE1# set ms-pw vrf-target target:100:115
使用第 2 层 VPN 作为 mspw 路由实例的路由协议,配置源附件标识符 (SAI) 值。
[edit routing-instances] user@T-PE1# set ms-pw protocols l2vpn site CE1 source-attachment-identifier 800:800:800
分配将 CE1 站点连接到 VPN 的接口名称,并使用第 2 层 VPN 作为 mspw 路由实例的路由协议来配置目标附件标识符 (TAI) 值。
[edit routing-instances] user@T-PE1# set ms-pw protocols l2vpn site CE1 interface ge-3/1/2.0 target-attachment-identifier 700:700:700
(选答)配置 T-PE1 以发送 MS-PW 状态 TLV。
[edit routing-instances] user@T-PE1# set ms-pw protocols l2vpn pseudowire-status-tlv
(选答)为 VPN 配置 OAM 功能。
[edit routing-instances] user@T-PE1# set ms-pw protocols l2vpn oam bfd-liveness-detection minimum-interval 300
分步程序
下面的示例要求您在各个配置层级中进行导航。有关导航 CLI 的信息,请参阅在 配置模式下使用 CLI 编辑器。
要在 AS 间场景中配置 S-PE1 (ASBR 1),请执行以下作:
修改相应的接口名称、地址和其他参数后,对 MPLS 域中的 S-PE2 (ASBR 2) 设备重复此过程。
配置 S-PE1 (ASBR 1) 接口。
[edit interfaces]user@S-PE1# set ge-1/3/1 unit 0 family inet address 192.0.2.9/24 user@S-PE1# set ge-1/3/1 unit 0 family mpls user@S-PE1# set ge-1/3/2 unit 0 family inet address 192.0.2.22/24 user@S-PE1# set ge-1/3/2 unit 0 family mpls user@S-PE1# set lo0 unit 0 family inet address 10.255.2.1/32 primary设置自治系统编号。
[edit routing-options]user@S-PE1# set autonomous-system 1在 S-PE1 (ASBR 1) 的所有接口上启用 MPLS,管理接口除外。
[edit protocols]user@S-PE1# set mpls interface all user@S-PE1# set mpls interface fxp0.0 disable使用 BGP 启用 S-PE 的自动发现。
[edit protocols]user@S-PE1# set bgp family l2vpn auto-discovery-mspw将 S-PE1 (ASBR 1) 的 IBGP 组配置为与 T-PE1 对等。
[edit protocols]user@S-PE1# set bgp group to_T-PE1 type internal配置 IBGP 组参数。
[edit protocols]user@S-PE1# set bgp group to_T-PE1 local-address 10.255.2.1 user@S-PE1# set bgp group to_T-PE1 export next-hop-self user@S-PE1# set bgp group to_T-PE1 neighbor 10.255.10.1将 S-PE1 (ASBR 1) 的 EBGP 组配置为与 S-PE2 (ASBR 2) 对等。
[edit protocols]user@S-PE1# set bgp group to_S-PE2 type external配置 EBGP 组参数。
[edit protocols]user@S-PE1# set bgp group to_S-PE2 local-address 10.255.2.1 user@S-PE1# set bgp group to_S-PE2 peer-as 2 user@S-PE1# set bgp group to_S-PE2 neighbor 10.255.3.1 multihop ttl 1在 S-PE1 (ASBR 1) 的所有接口上配置 OSPF,管理接口除外。
[edit protocols] user@S-PE1# set ospf area 0.0.0.0 interface all user@S-PE1# set ospf area 0.0.0.0 interface fxp0.0 disable user@S-PE1# set ospf area 0.0.0.0 interface lo0.0 passive
在 S-PE1 (ASBR 1) 的所有接口上配置 LDP,但管理接口除外。
[edit protocols] user@S-PE1# set ldp interface all user@S-PE1# set ldp interface fxp0.0 disable user@S-PE1# set ldp interface lo0.0
定义用于在 S-PE1 (ASBR 1) 上启用下一跳自的策略。
[edit policy-options] user@S-PE1# set policy-statement next-hop-self then next-hop self
结果
在配置模式下,输入 show interfaces、 show protocols、 show routing-optionsshow routing-instances和show policy-options命令以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明以更正配置。
T-PE1
user@T-PE1# show interfaces
ge-3/1/0 {
unit 0 {
family inet {
address 192.0.2.1/24;
}
family mpls;
}
}
ge-3/1/2 {
encapsulation ethernet-ccc;
unit 0;
}
lo0 {
unit 0 {
family inet {
address 10.255.10.1/32 {
primary;
}
}
}
}
user@T-PE1# show routing-options
autonomous-system 1;
user@T-PE1# show protocols
mpls {
interface all;
interface fxp0.0 {
disable;
}
}
bgp {
family l2vpn {
auto-discovery-mspw;
}
group mspw {
type internal;
local-address 10.255.10.1;
neighbor 10.255.2.1;
}
}
ospf {
area 0.0.0.0 {
interface all;
interface fxp0.0 {
disable;
}
interface lo0.0;
}
}
ldp {
interface all;
interface fxp0.0 {
disable;
}
interface lo0.0;
}
user@T-PE1# show routing-instances
ms-pw {
instance-type l2vpn;
interface ge-3/1/2.0;
route-distinguisher 10.10.10.10:15;
l2vpn-id l2vpn-id:100:15;
vrf-target target:100:115;
protocols {
l2vpn {
site CE1 {
source-attachment-identifier 800:800:800;
interface ge-3/1/2.0 {
target-attachment-identifier 700:700:700;
}
}
pseudowire-status-tlv;
oam {
bfd-liveness-detection {
minimum-interval 300;
}
}
}
}
}
S-PE1 (RR 1)
user@S-PE1# show interfaces
ge-1/3/1 {
unit 0 {
family inet {
address 192.0.2.9/24;
}
family mpls;
}
}
ge-1/3/2 {
unit 0 {
family inet {
address 192.0.2.22/24;
}
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 10.255.2.1/32 {
primary;
}
}
}
}
user@T-PE1# show routing-options
autonomous-system 1;
user@S-PE1# show protocols
mpls {
interface all;
interface fxp0.0 {
disable;
}
}
bgp {
family l2vpn {
auto-discovery-mspw;
}
group to_T-PE1 {
type internal;
local-address 10.255.2.1;
export next-hop-self;
neighbor 10.255.10.1;
}
group to_S-PE2 {
type external;
local-address 10.255.2.1;
peer-as 2;
neighbor 10.255.3.1 {
multihop {
ttl 1;
}
}
}
}
ospf {
area 0.0.0.0 {
interface lo0.0 {
passive;
}
interface all;
interface fxp0.0 {
disable;
}
}
}
ldp {
interface all;
interface fxp0.0 {
disable;
}
interface lo0.0;
}
user@T-PE1# show policy-options
policy-statement next-hop-self {
then {
next-hop self;
}
}
如果完成设备配置,请从配置模式进入。commit
验证
确认配置工作正常。
验证路由
目的
验证是否已学习预期路由。
行动
在作模式下,运行 show route 、 ldp.l2vpn.1、 mpls.0和ms-pw.l2vpn.1路由表命令bgp.l2vpn.1。
在作模式下,运行命令 show route table bgp.l2vpn.1 。
user@T-PE1> show route table bgp.l2vpn.1
bgp.l2vpn.1: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.10.10.10:15:700:0.0.2.188:700/160 AD2
*[BGP/170] 16:13:11, localpref 100, from 10.255.2.1
AS path: 2 I, validation-state: unverified
> to 203.0.113.2 via ge-3/1/0.0, Push 300016
在作模式下,运行命令 show route table ldp.l2vpn.1 。
user@T-PE1> show route table ldp.l2vpn.1
ldp.l2vpn.1: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.255.2.1:CtrlWord:5:100:15:700:0.0.2.188:700:800:0.0.3.32:800/304 PW2
*[LDP/9] 16:21:27
Discard
在作模式下,运行命令 show route table mpls.0 。
user@T-PE1> show route table mpls.0
mpls.0: 12 destinations, 12 routes (12 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0 *[MPLS/0] 1w6d 00:28:26, metric 1
Receive
1 *[MPLS/0] 1w6d 00:28:26, metric 1
Receive
2 *[MPLS/0] 1w6d 00:28:26, metric 1
Receive
13 *[MPLS/0] 1w6d 00:28:26, metric 1
Receive
299920 *[LDP/9] 1w5d 01:26:08, metric 1
> to 203.0.113.2 via ge-3/1/0.0, Pop
299920(S=0) *[LDP/9] 1w5d 01:26:08, metric 1
> to 203.0.113.2 via ge-3/1/0.0, Pop
299936 *[LDP/9] 1w5d 01:26:08, metric 1
> to 203.0.113.2 via ge-3/1/0.0, Swap 300016
300096 *[LDP/9] 16:22:35, metric 1
> to 203.0.113.2 via ge-3/1/0.0, Swap 300128
300112 *[LDP/9] 16:22:35, metric 1
> to 203.0.113.2 via ge-3/1/0.0, Swap 300144
300128 *[LDP/9] 16:22:35, metric 1
> to 203.0.113.2 via ge-3/1/0.0, Swap 300160
300144 *[L2VPN/7] 16:22:33
> via ge-3/1/2.0, Pop Offset: 4
ge-3/1/2.0 *[L2VPN/7] 16:22:33, metric2 1
> to 203.0.113.2 via ge-3/1/0.0, Push 300176, Push 300016(top) Offset: 252
在作模式下,运行命令 show route table ms-pw.l2vpn.1 。
user@T-PE1> show route table ms-pw.l2vpn.1
ms-pw.l2vpn.1: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.10.10.10:15:700:0.0.2.188:700/160 AD2
*[BGP/170] 16:23:27, localpref 100, from 10.255.2.1
AS path: 2 I, validation-state: unverified
> to 203.0.113.2 via ge-3/1/0.0, Push 300016
10.10.10.10:15:800:0.0.3.32:800/160 AD2
*[L2VPN/170] 1w5d 23:25:19, metric2 1
Indirect
10.255.2.1:CtrlWord:5:100:15:700:0.0.2.188:700:800:0.0.3.32:800/304 PW2
*[LDP/9] 16:23:25
Discard
10.255.2.1:CtrlWord:5:100:15:800:0.0.3.32:800:700:0.0.2.188:700/304 PW2
*[L2VPN/7] 16:23:27, metric2 1
> to 203.0.113.2 via ge-3/1/0.0, Push 300016
意义
输出显示所有学习的路由,包括自动发现 (AD) 路由。
AD2 前缀格式为 RD:SAII-type2,其中:
RD是路由识别符值。SAII-type2是类型 2 源附件标识符值。
PW2 前缀格式为 Neighbor_Addr:C:PWtype:l2vpn-id:SAII-type2:TAII-type2,其中:
Neighbor_Addr是相邻 S-PE 设备的环路地址。C指示是否启用控制字 (CW)。C是CtrlWord如果设置了 CW。C是NoCtrlWord如果未设置 CW。
PWtype表示伪线的类型。PWtype是否4处于以太网标记模式。PWtype如果5它只是以太网。
l2vpn-id是 MS-PW 路由实例的第 2 层 VPN ID。SAII-type2是类型 2 源附件标识符值。TAII-type2是类型 2 目标附件标识符值。
验证 LDP 数据库
目的
验证 T-PE1 从 S-PE1 接收并从 T-PE1 发送到 S-PE1 的 MS-PW 标签。
行动
在作模式下,运行命令 show ldp database 。
user@T-PE1> show ldp database
Input label database, 10.255.10.1:0--10.255.2.1:0
Label Prefix
3 10.255.2.1/32
300112 10.255.3.1/32
300128 10.255.4.1/32
299968 10.255.10.1/32
299904 10.255.13.1/32
300144 10.255.14.1/32
300176 FEC129 CtrlWord ETHERNET 000a0064:0000000f 000002bc:000002bc:000002bc 00000320:00000320:00000320
Output label database, 10.255.10.1:0--10.255.2.1:0
Label Prefix
299936 10.255.2.1/32
300096 10.255.3.1/32
300112 10.255.4.1/32
3 10.255.10.1/32
299920 10.255.13.1/32
300128 10.255.14.1/32
300144 FEC129 CtrlWord ETHERNET 000a0064:0000000f 00000320:00000320:00000320 000002bc:000002bc:000002bc
Input label database, 10.255.10.1:0--10.255.13.1:0
Label Prefix
300016 10.255.2.1/32
300128 10.255.3.1/32
300144 10.255.4.1/32
300080 10.255.10.1/32
3 10.255.13.1/32
300160 10.255.14.1/32
Output label database, 10.255.10.1:0--10.255.13.1:0
Label Prefix
299936 10.255.2.1/32
300096 10.255.3.1/32
300112 10.255.4.1/32
3 10.255.10.1/32
299920 10.255.13.1/32
300128 10.255.14.1/32
意义
带有 FEC129 前缀的标签与 MS-PW 相关。
检查 T-PE1 上的 MS-PW 连接
目的
确保所有 FEC 129 MS-PW 连接均正确启动。
行动
在作模式下,运行命令 show l2vpn connections extensive 。
user@T-PE1> show l2vpn connections extensive
Layer-2 VPN connections:
Legend for connection status (St)
EI -- encapsulation invalid NC -- interface encapsulation not CCC/TCC/VPLS
EM -- encapsulation mismatch WE -- interface and instance encaps not same
VC-Dn -- Virtual circuit down NP -- interface hardware not present
CM -- control-word mismatch -> -- only outbound connection is up
CN -- circuit not provisioned <- -- only inbound connection is up
OR -- out of range Up -- operational
OL -- no outgoing label Dn -- down
LD -- local site signaled down CF -- call admission control failure
RD -- remote site signaled down SC -- local and remote site ID collision
LN -- local site not designated LM -- local site ID not minimum designated
RN -- remote site not designated RM -- remote site ID not minimum designated
XX -- unknown connection status IL -- no incoming label
MM -- MTU mismatch MI -- Mesh-Group ID not available
BK -- Backup connection ST -- Standby connection
PF -- Profile parse failure PB -- Profile busy
RS -- remote site standby SN -- Static Neighbor
LB -- Local site not best-site RB -- Remote site not best-site
VM -- VLAN ID mismatch
Legend for interface status
Up -- operational
Dn -- down
Instance: ms-pw
L2vpn-id: 100:15
Number of local interfaces: 1
Number of local interfaces up: 1
ge-3/1/2.0
Local source-attachment-id: 800:0.0.3.32:800 (CE1)
Target-attachment-id Type St Time last up # Up trans
700:0.0.2.188:700 rmt Up Sep 18 01:10:55 2013 1
Remote PE: 10.255.2.1, Negotiated control-word: Yes (Null)
Incoming label: 300048, Outgoing label: 300016
Negotiated PW status TLV: Yes
local PW status code: 0x00000000, Neighbor PW status code: 0x00000000
Local interface: ge-3/1/2.0, Status: Up, Encapsulation: ETHERNET
Pseudowire Switching Points :
Local address Remote address Status
10.255.2.1 10.255.3.1 forwarding
10.255.3.1 10.255.14.1 forwarding
Connection History:
Sep 18 01:10:55 2013 status update timer
Sep 18 01:10:55 2013 PE route changed
Sep 18 01:10:55 2013 Out lbl Update 300016
Sep 18 01:10:55 2013 In lbl Update 300048
Sep 18 01:10:55 2013 loc intf up ge-3/1/2.0
检查输出中的以下字段,以验证是否在 T-PE 设备之间建立了 MS-PW:
Target-attachment-id—检查TAI值是否为T-PE2的SAI值。Remote PE— 检查是否列出了 T-PE2 环路地址。Negotiated PW status TLV—确保值为Yes。Pseudowire Switching Points— 检查交换点是否列出了从 S-PE1 到 S-PE2 以及从 S-PE2 到 T-PE2 的交换点。
意义
在转发方向上的 T-PE1 和 T-PE2 之间建立 MS-PW。
检查 S-PE1 上的 MS-PW 连接
目的
确保 MSPW 路由实例的所有 FEC 129 MS-PW 连接都正确启动。
行动
在作模式下,运行命令 show l2vpn connections instance __MSPW__ extensive 。
user@S-PE1> show l2vpn connections instance __MSPW__ extensive
Layer-2 VPN connections:
Legend for connection status (St)
EI -- encapsulation invalid NC -- interface encapsulation not CCC/TCC/VPLS
EM -- encapsulation mismatch WE -- interface and instance encaps not same
VC-Dn -- Virtual circuit down NP -- interface hardware not present
CM -- control-word mismatch -> -- only outbound connection is up
CN -- circuit not provisioned <- -- only inbound connection is up
OR -- out of range Up -- operational
OL -- no outgoing label Dn -- down
LD -- local site signaled down CF -- call admission control failure
RD -- remote site signaled down SC -- local and remote site ID collision
LN -- local site not designated LM -- local site ID not minimum designated
RN -- remote site not designated RM -- remote site ID not minimum designated
XX -- unknown connection status IL -- no incoming label
MM -- MTU mismatch MI -- Mesh-Group ID not available
BK -- Backup connection ST -- Standby connection
PF -- Profile parse failure PB -- Profile busy
RS -- remote site standby SN -- Static Neighbor
LB -- Local site not best-site RB -- Remote site not best-site
VM -- VLAN ID mismatch
Legend for interface status
Up -- operational
Dn -- down
Instance: __MSPW__
L2vpn-id: 100:15
Local source-attachment-id: 700:0.0.2.188:700
Target-attachment-id Type St Time last up # Up trans
800:0.0.3.32:800 rmt Up Sep 18 01:17:38 2013 1
Remote PE: 10.255.10.1, Negotiated control-word: Yes (Null), Encapsulation: ETHERNET
Incoming label: 300016, Outgoing label: 300048
Negotiated PW status TLV: Yes
local PW status code: 0x00000000, Neighbor PW status code: 0x00000000
Local source-attachment-id: 800:0.0.3.32:800
Target-attachment-id Type St Time last up # Up trans
700:0.0.2.188:700 rmt Up Sep 18 01:17:38 2013 1
Remote PE: 10.255.3.1, Negotiated control-word: Yes (Null), Encapsulation: ETHERNET
Incoming label: 300000, Outgoing label: 300064
Negotiated PW status TLV: Yes
local PW status code: 0x00000000, Neighbor PW status code: 0x00000000
Pseudowire Switching Points :
Local address Remote address Status
10.255.3.1 10.255.14.1 forwarding
检查输出中的以下字段,以验证是否在 T-PE 设备之间建立了 MS-PW:
Target-attachment-id—检查TAI值是否为T-PE2的SAI值。Remote PE— 检查是否列出了 T-PE1 和 S-PE2 环路地址。Negotiated PW status TLV—确保值为Yes。Pseudowire Switching Points— 检查是否列出了从 S-PE2 到 T-PE2 的交换点。
意义
在转发方向上的 T-PE1 和 T-PE2 之间建立 MS-PW。
检查 S-PE2 上的 MS-PW 连接
目的
确保 MSPW 路由实例的所有 FEC 129 MS-PW 连接都正确启动。
行动
在作模式下,运行命令 show l2vpn connections instance __MSPW__ extensive 。
user@S-PE2> show l2vpn connections instance __MSPW__ extensive
Layer-2 VPN connections:
Legend for connection status (St)
EI -- encapsulation invalid NC -- interface encapsulation not CCC/TCC/VPLS
EM -- encapsulation mismatch WE -- interface and instance encaps not same
VC-Dn -- Virtual circuit down NP -- interface hardware not present
CM -- control-word mismatch -> -- only outbound connection is up
CN -- circuit not provisioned <- -- only inbound connection is up
OR -- out of range Up -- operational
OL -- no outgoing label Dn -- down
LD -- local site signaled down CF -- call admission control failure
RD -- remote site signaled down SC -- local and remote site ID collision
LN -- local site not designated LM -- local site ID not minimum designated
RN -- remote site not designated RM -- remote site ID not minimum designated
XX -- unknown connection status IL -- no incoming label
MM -- MTU mismatch MI -- Mesh-Group ID not available
BK -- Backup connection ST -- Standby connection
PF -- Profile parse failure PB -- Profile busy
RS -- remote site standby SN -- Static Neighbor
LB -- Local site not best-site RB -- Remote site not best-site
VM -- VLAN ID mismatch
Legend for interface status
Up -- operational
Dn -- down
Instance: __MSPW__
L2vpn-id: 100:15
Local source-attachment-id: 700:0.0.2.188:700
Target-attachment-id Type St Time last up # Up trans
800:0.0.3.32:800 rmt Up Sep 18 00:58:55 2013 1
Remote PE: 10.255.2.1, Negotiated control-word: Yes (Null), Encapsulation: ETHERNET
Incoming label: 300064, Outgoing label: 300000
Negotiated PW status TLV: Yes
local PW status code: 0x00000000, Neighbor PW status code: 0x00000000
Pseudowire Switching Points :
Local address Remote address Status
10.255.2.1 10.255.10.1 forwarding
Local source-attachment-id: 800:0.0.3.32:800
Target-attachment-id Type St Time last up # Up trans
700:0.0.2.188:700 rmt Up Sep 18 00:58:55 2013 1
Remote PE: 10.255.14.1, Negotiated control-word: Yes (Null), Encapsulation: ETHERNET
Incoming label: 300048, Outgoing label: 300112
Negotiated PW status TLV: Yes
local PW status code: 0x00000000, Neighbor PW status code: 0x00000000
检查输出中的以下字段,以验证是否在 T-PE 设备之间建立了 MS-PW:
Target-attachment-id—检查TAI值是否为T-PE1的SAI值。Remote PE— 检查是否列出了 S-PE1 和 T-PE2 环路地址。Negotiated PW status TLV—确保值为Yes。Pseudowire Switching Points— 检查交换点是否从 S-PE1 到 T-PE1 列出。
意义
MS-PW 在 T-PE1 和 T-PE2 之间建立相反方向。
检查 T-PE2 上的 MS-PW 连接
目的
确保所有 FEC 129 MS-PW 连接均正确启动。
行动
在作模式下,运行命令 show l2vpn connections extensive 。
user@T-PE2> show l2vpn connections extensive
Layer-2 VPN connections:
Legend for connection status (St)
EI -- encapsulation invalid NC -- interface encapsulation not CCC/TCC/VPLS
EM -- encapsulation mismatch WE -- interface and instance encaps not same
VC-Dn -- Virtual circuit down NP -- interface hardware not present
CM -- control-word mismatch -> -- only outbound connection is up
CN -- circuit not provisioned <- -- only inbound connection is up
OR -- out of range Up -- operational
OL -- no outgoing label Dn -- down
LD -- local site signaled down CF -- call admission control failure
RD -- remote site signaled down SC -- local and remote site ID collision
LN -- local site not designated LM -- local site ID not minimum designated
RN -- remote site not designated RM -- remote site ID not minimum designated
XX -- unknown connection status IL -- no incoming label
MM -- MTU mismatch MI -- Mesh-Group ID not available
BK -- Backup connection ST -- Standby connection
PF -- Profile parse failure PB -- Profile busy
RS -- remote site standby SN -- Static Neighbor
LB -- Local site not best-site RB -- Remote site not best-site
VM -- VLAN ID mismatch
Legend for interface status
Up -- operational
Dn -- down
Instance: ms-pw
L2vpn-id: 100:15
Number of local interfaces: 1
Number of local interfaces up: 1
ge-2/0/0.0
Local source-attachment-id: 700:0.0.2.188:700 (CE2)
Target-attachment-id Type St Time last up # Up trans
800:0.0.3.32:800 rmt Up Sep 18 01:35:21 2013 1
Remote PE: 10.255.3.1, Negotiated control-word: Yes (Null)
Incoming label: 300112, Outgoing label: 300048
Negotiated PW status TLV: Yes
local PW status code: 0x00000000, Neighbor PW status code: 0x00000000
Local interface: ge-2/0/0.0, Status: Up, Encapsulation: ETHERNET
Pseudowire Switching Points :
Local address Remote address Status
10.255.3.1 10.255.2.1 forwarding
10.255.2.1 10.255.10.1 forwarding
Connection History:
Sep 18 01:35:21 2013 status update timer
Sep 18 01:35:21 2013 PE route changed
Sep 18 01:35:21 2013 Out lbl Update 300048
Sep 18 01:35:21 2013 In lbl Update 300112
Sep 18 01:35:21 2013 loc intf up ge-2/0/0.0
检查输出中的以下字段,以验证是否在 T-PE 设备之间建立了 MS-PW:
Target-attachment-id—检查TAI值是否为T-PE1的SAI值。Remote PE— 检查是否列出了 T-PE1 环路地址。Negotiated PW status TLV—确保值为Yes。Pseudowire Switching Points— 检查交换点是否列出了从 S-PE2 到 S-PE1 以及从 S-PE1 到 T-PE1 的交换点。
意义
MS-PW 在 T-PE1 和 T-PE2 之间建立相反方向。
故障排除
要对 MS-PW 连接进行故障排除,请参阅:
Ping
问题
如何检查 T-PE 设备之间以及 T-PE 设备与中间设备之间的连接。
解决方案
验证 T-PE1 是否可以 ping T-PE2。该ping mpls l2vpn fec129命令接受 SAI 和 TAI 作为整数或 IP 地址,还允许您使用面向客户边缘的接口而不是其他参数 (instance, local-idremote-id)。 remote-pe-address
Checking Connectivity Between T-PE1 and T-PE2
user@T-PE1> ping mpls l2vpn fec129 instance FEC129-VPWS local-id 800:800:800 remote-pe-address 10.255.14.1 remote-id 700:700:700 !!!!! --- lsping statistics --- 5 packets transmitted, 5 packets received, 0% packet loss user@T-PE1> ping mpls l2vpn fec129 interface ge-3/1/2 !!!!! --- lsping statistics --- 5 packets transmitted, 5 packets received, 0% packet loss
Checking Connectivity Between T-PE1 and S-PE2
user@T-PE1> ping mpls l2vpn fec129 interface ge-3/1/2 bottom-label-ttl 2 !!!!! --- lsping statistics --- 5 packets transmitted, 5 packets received, 0% packet loss
双向转发检测
问题
如何使用 BFD 对 T-PE 设备的 MS-PW 连接进行故障排除。
解决方案
在作模式下,验证 show bfd session extensive 命令输出。
user@T-PE1> show bfd session extensive
Detect Transmit
Address State Interface Time Interval Multiplier
198.51.100.7 Up ge-3/1/0.0 0.900 0.300 3
Client FEC129-OAM, TX interval 0.300, RX interval 0.300
Session up time 03:12:42
Local diagnostic None, remote diagnostic None
Remote state Up, version 1
Replicated
Session type: VCCV BFD
Min async interval 0.300, min slow interval 1.000
Adaptive async TX interval 0.300, RX interval 0.300
Local min TX interval 0.300, minimum RX interval 0.300, multiplier 3
Remote min TX interval 0.300, min RX interval 0.300, multiplier 3
Local discriminator 19, remote discriminator 19
Echo mode disabled/inactive
Remote is control-plane independent
L2vpn-id 100:15, Local-id 800:0.0.3.32:800, Remote-id 700:0.0.2.188:700
Session ID: 0x103
1 sessions, 1 clients
Cumulative transmit rate 3.3 pps, cumulative receive rate 3.3 pps
跟踪路由
问题
如何验证 MS-PW 是否已建立。
解决方案
在作模式下,验证 traceroute 输出。
user@T-PE1> traceroute mpls l2vpn fec129 interface interface
Probe options: ttl 64, retries 3, exp 7
ttl Label Protocol Address Previous Hop Probe Status
1 FEC129 10.255.10.1 (null) Success
2 FEC129 10.255.2.1 10.255.10.1 Success
3 FEC129 10.255.3.1 10.255.2.1 Success
4 FEC129 10.255.14.1 10.255.2.1 Egress
Path 1 via ge-3/1/2 destination 198.51.100.0