基本 MPLS 配置
MPLS 配置概述
首次在设备上安装 Junos OS 时,MPLS 默认处于禁用状态。您必须显式配置设备以允许通过 MPLS 流量。为 MPLS 网络中运行 Junos OS 的所有设备完成以下步骤。
要启用 MPLS:
当数据包转发模式更改为 MPLS 时,所有基于流的安全功能都会停用,并且设备仅执行基于数据包的处理。设备上无法提供基于流的服务,例如安全策略、区域、NAT、ALG、机箱群集、屏幕、防火墙身份验证和 IPsec VPN。但是,可使用防火墙过滤器在基于流的数据包转发模式下为所选流量启用 MPLS。
MPLS 配置准则
在 QFX 系列设备或 EX4600 上配置 MPLS 时,请注意,支持的 IP 前缀数量取决于所使用的特定平台。有关更多信息,请参阅设备产品介绍中的扩展规格。
我们建议采用以下功能:
如果您的入口提供商边缘 (PE) 交换机需要支持 8000 多个外部 IP 前缀,请使用更大的容量设备作为入口 PE 交换机。
如果使用交换机作为 BGP 标记路由的路由反射器,请将其用作专用路由反射器(即交换机不得参与管理数据流量)。
如果使用交换机作为 PE 交换机或 BGP 标记的路由的路由反射器,请在 PE 交换机和路由反射器上配置路由策略,以过滤路由表中的外部 IP 路由。
下面给出了名为 fib_policy(在
[edit policy-options
层级和[edit routing-options
层级)的路由策略的配置示例,用于从 inet.0 路由表中过滤 BGP 标记的路由:user@switch# show policy-options policy-statement fib_policy { from { protocol bgp; rib inet.0; } then reject; }
user@switch# show routing-options forwarding-table { export fib_policy; }
QFX 系列设备或 EX4600 交换机不支持在层次结构级别使用
allow-fragmentation
语句[edit protocols mpls path-mtu]
进行数据包分片。因此,必须确保每个 MPLS 接口上配置的最大传输单元 (MTU) 值足以处理 MPLS 数据包。大小超过接口 MTU 值的数据包将被丢弃。
配置 MPLS
您还必须为 2 层交叉连接配置 MPLS,才能正常工作。以下是最低 MPLS 配置:
[edit] interfaces {interface-name
{ unitlogical-unit-number;
} } protocols { mpls { interface all; } }
示例:启用 MPLS
此示例说明如何为基于数据包的处理启用 MPLS。它还展示了如何在网络中的所有传输接口上启用 MPLS 系列和 MPLS 进程。
启用 MPLS 后,所有基于流的安全功能都会停用,设备将执行基于数据包的处理。设备上无法提供基于流的服务,例如安全策略、区域、NAT、ALG、机箱群集、屏幕、防火墙身份验证、IP 数据包和 IPsec VPN。
在从流模式更改为数据包模式之前,必须删除剩余在流模式下的所有安全策略。要防止管理连接丢失,必须将管理接口绑定到区域并启用主机入站流量,以防止设备断开连接。
有关配置区域的信息,请参阅 安全设备安全策略用户指南。
要求
开始之前,删除所有配置的安全服务。请参阅 示例:删除安全服务。
概述
本主题中的说明介绍如何在设备上启用 MPLS。必须先在设备上启用 MPLS,然后才能在 MPLS 网络中包含运行 Junos OS 的设备。
配置
程序
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到层级的 [edit]
CLI 中,然后从配置模式进入 commit
。
set security forwarding-options family mpls mode packet-based set interfaces ge-1/0/0 unit 0 family mpls set protocols mpls ge-1/0/0 unit 0
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关如何操作的说明,请参阅 在配置模式下使用 CLI 编辑器。
要启用 MPLS:
启用 MPLS 以实现基于数据包的处理。
[edit security forwarding-options] user@host# set family mpls mode packet-based
在想要包含在 MPLS 网络中的每个传输接口上启用 MPLS 系列。
[edit interfaces] user@host# set interfaces ge-1/0/0 unit 0 family mpls
在 MPLS 网络中的所有传输接口上启用 MPLS 进程。
[edit protocols mpls] user@host# set interface ge-1/0/0 unit 0
结果
在配置模式下,输入命令以确认 show security forwarding-options
您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明,以便进行更正。
如果使用命令 set security forward-option family mpls mode packet
为基于数据包的处理启用 MPLS,则模式不会立即更改,系统将显示以下消息:
警告:尝试重置流 inet 模式时可能需要重新启动
警告:尝试重置 mpls 流模式时需要重新启动,请检查安全流状态,了解详情。
您需要重新启动设备才能使配置生效。
如果禁用 MPLS 并切换回使用安全服务(基于流的处理),则模式不会立即更改,系统将显示警告消息,指示您重新启动设备。必须重新启动设备才能使配置生效。这还会导致管理会话被重置,传输流量被中断。
[edit] user@host# show security forwarding-options family { mpls { mode packet-based; } }
完成设备配置后,请从配置模式进入 commit
。
验证
确认配置工作正常。
示例:在 EX8200 和 EX4500 交换机上配置 MPLS
您可以在交换机上配置 MPLS,以提高网络的传输效率。MPLS 服务可用于将各种站点连接到骨干网络,并确保低延迟应用(如 IP 语音 (VoIP) 和其他关键业务功能)获得更好的性能。
要在交换机上实施 MPLS,必须配置两个提供商边缘 (PE) 交换机(一个入口 PE 交换机和一个出口 PE 交换机),以及至少一个提供商(传输)交换机。您可以将 MPLS 网络 PE 交换机上的客户边缘 (CE) 接口配置为电路交叉连接 (CCC) 或 IP (family inet) 接口。
此示例说明如何使用简单接口作为 CCC 配置 MPLS 隧道:
此示例说明如何使用简单接口作为 CCC 配置 MPLS。有关将标记的 VLAN 接口配置为 CCC 的信息,请参阅 使用第 2 层 VPN(CLI 过程)配置基于 MPLS 的 VLAN CCC 或使用 第 2 层电路配置基于 MPLS 的 VLAN CCC。
要求
此示例使用以下硬件和软件组件:
适用于交换机的 Junos OS 10.1 或更高版本
三台 EX 系列交换机
开始配置 MPLS 之前,请确保已在核心接口上配置路由协议(OSPF 或 IS-IS),并在所有交换机上配置环路接口。此示例包括所有交换机上的 OSPF 配置。有关将 IS-IS 配置为路由协议的信息,请参阅 Junos OS 路由协议配置指南。
概述和拓扑
此示例包括一个入口或本地 PE 交换机、一个出口或远程 PE 交换机以及一台提供商交换机。它包括将本地 PE 交换机 (PE-1) 的客户边缘接口绑定到远程 PE 交换机 (PE-2) 的客户边缘接口的 CCC。它还介绍如何配置 PE 交换机和提供商交换机的核心接口以支持 MPLS 数据包的传输。在此示例中,连接本地 PE 交换机和提供商交换机的核心接口是单个接口,而连接远程 PE 交换机和提供商交换机的核心接口是聚合以太网接口。
核心接口不能标记 VLAN 接口。
核心接口可以是聚合以太网接口。此示例在提供商交换机和远程 PE 交换机之间包括 LAG,因为此类型的配置是可实施的另一个选项。有关配置 LAG 的信息,请参阅 配置聚合以太网链路(CLI 过程)。
图 1 显示了此示例中使用的拓扑。

表 1 显示了此示例中用于入口 PE 交换机的 MPLS 配置组件。
财产 |
设置 |
说明 |
---|---|---|
本地 PE 交换机硬件 |
EX 系列交换机 |
PE-1 |
环路地址 |
lo0 127.1.1.1/32 |
识别交换机间通信的 PE-1。 |
路由协议 |
ospf traffic-engineering |
指示此交换机使用 OSPF 作为路由协议,并且启用了流量工程。 |
MPLS 协议和标签交换路径的定义 |
mpls label-switched-path lsp_to_pe2_ge1 to 127.1.13 |
指示此 PE 交换机使用具有指定 LSP 的 MPLS 协议来访问另一个 PE 交换机(由环路地址指定)。 语句还必须指定要用于 MPLS 流量的核心接口。 |
RSVP |
rsvp |
指示此交换机正在使用 RSVP。语句必须指定用于 RSVP 会话的环路地址和核心接口。 |
接口系列 |
family inet family mpls family ccc |
核心接口的逻辑单元配置为同时属于和family inetfamily mpls。 客户边缘接口的逻辑单元配置为属于 family ccc。 |
客户边缘接口 |
ge-0/0/1 |
将此网络连接到网络外部设备的接口。 |
核心接口 |
ge-0/0/5.0 以及 ge-0/0/6.0 IP 地址 10.1.5.1/24 和 10.1.6.1/24 |
连接到 MPLS 网络中其他交换机的接口。 |
CCC 定义 |
connections remote-interface-switch ge-1-to-pe2 interface ge-0/0/1.0 transmit-lsp lsp_to_pe2_ge1 receive-lsp lsp_to_pe1_ge1 |
将电路交叉连接 (CCC) ge-0/0/1与本地和远程 PE 交换机上定义的 LSP 相关联。 |
表 2 显示了此示例中用于出口 PE 交换机的 MPLS 配置组件。
财产 |
设置 |
说明 |
---|---|---|
远程 PE 交换机硬件 |
EX 系列交换机 |
PE-2 |
环路地址 |
lo0 127.1.1.3/32 |
识别交换机间通信的 PE-2。 |
路由协议 |
ospf traffic-engineering |
指示此交换机使用 OSPF 作为路由协议,并且启用了流量工程。 |
MPLS 协议和标签交换路径的定义 |
mpls label-switched-path lsp_to_pe1_ge1 to 127.1.1.1 |
指示此 PE 交换机使用具有指定标签交换路径 (LSP) 的 MPLS 协议来访问其他 PE 交换机。 语句还必须指定要用于 MPLS 流量的核心接口。 |
RSVP |
rsvp |
指示此交换机正在使用 RSVP。语句必须指定用于 RSVP 会话的环路地址和核心接口。 |
接口系列 |
family inet family mpls family ccc |
核心接口的逻辑单元配置为同时属于和family inetfamily mpls。 客户边缘接口的逻辑单元配置为属于 family ccc。 |
客户边缘接口 |
ge-0/0/1 |
将此网络连接到网络外部设备的接口。 |
核心接口 |
ae0 带 IP 地址 10.1.9.2/24 |
PE-2 上的聚合以太网接口,连接到提供商交换机的聚合以太网接口 ae0 ,属于 family mpls。 |
CCC 定义 |
connections remote-interface-switch ge-1-to-pe1 interface ge-0/0/1.0 transmit-lsp lsp_to_pe1_ge1; receive-lsp lsp_to_pe2_ge1; |
将 CCC ge-0/0/1与本地和远程 PE 交换机上定义的 LSP 相关联。 |
表 3 显示了此示例中用于提供商交换机的 MPLS 配置组件。
财产 |
设置 |
说明 |
---|---|---|
提供商交换机硬件 |
EX 系列交换机 |
MPLS 网络配置中的中继交换机。 |
环路地址 |
lo0 127.1.1.2/32 |
识别交换机间通信的提供商交换机。 |
路由协议 |
ospf traffic-engineering |
指示此交换机使用 OSPF 作为路由协议,并且启用了流量工程。 |
MPLS 协议 |
mpls |
指示此交换机正在使用 MPLS 协议。 语句必须指定用于 MPLS 流量的核心接口。 |
RSVP |
rsvp |
指示此交换机正在使用 RSVP。语句必须指定将用于 RSVP 会话的环路和核心接口。 |
接口系列 |
family inet family mpls |
环路接口和核心接口的逻辑单元属于 family inet。 核心接口的逻辑单元也配置为属于 family mpls。 |
核心接口 |
ge-0/0/5.0 以及 ge-0/0/6.0 IP 地址 10.1.5.1/24 和 10.1.6.1/24使用 ae0 IP 地址 10.1.9.1/24 |
将提供商交换机 (P) 连接到 PE-1 的接口。 连接到 PE-2 聚合以太网接口的 P 上的聚合以太网接口 ae0 。 |
配置本地 PE 交换机
程序
CLI 快速配置
要快速配置本地入口 PE 交换机,请复制以下命令,并将其粘贴到 PE-1 的交换机终端窗口中:
[edit] set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 set protocols ospf area 0.0.0.0 interface ge-0/0/5.0 set protocols ospf area 0.0.0.0 interface ge-0/0/6.0 set protocols mpls label-switched-path lsp_to_pe2_ge1 to 127.1.1.3 set protocols mpls interface ge-0/0/5.0 set protocols mpls interface ge-0/0/6.0 set protocols rsvp interface lo0.0 set protocols rsvp interface ge-0/0/5.0 set protocols rsvp interface ge-0/0/6.0 set interfaces lo0 unit 0 family inet address 127.1.1.1/32 set interfaces ge-0/0/5 unit 0 family inet address 10.1.5.1/24 set interfaces ge-0/0/6 unit 0 family inet address 10.1.6.1/24 set interfaces ge-0/0/5 unit 0 family mpls set interfaces ge-0/0/6 unit 0 family mpls set interfaces ge-0/0/1 unit 0 family ccc set protocols connections remote-interface-switch ge-1-to-pe2 interface ge-0/0/1.0 set protocols connections remote-interface-switch ge-1-to-pe2 transmit-lsp lsp_to_pe2_ge1 set protocols connections remote-interface-switch ge-1-to-pe2 receive-lsp lsp_to_pe1_ge1
逐步过程
要配置本地入口 PE 交换机:
配置 OSPF 并启用流量工程:
[edit protocols] user@switchPE-1# set ospf traffic-engineering
在环路地址和核心接口上配置 OSPF:
[edit protocols] user@switchPE-1# set ospf area 0.0.0.0 interface lo0.0 user@switchPE-1# set ospf area 0.0.0.0 interface ge-0/0/5.0 user@switchPE-1# set ospf area 0.0.0.0 interface ge-0/0/6.0
在此 PE 交换机 (PE-1) 上配置 MPLS,使用标签交换路径 (LSP) 配置到其他 PE 交换机 (PE-2):
[edit protocols] user@switchPE-1# set mpls label-switched-path lsp_to_pe2_ge1 to 127.1.1.3
在核心接口上配置 MPLS:
[edit protocols] user@switchPE-1# set mpls interface ge-0/0/5.0 user@switchPE-1# set mpls interface ge-0/0/6.0
在环路接口和核心接口上配置 RSVP:
[edit protocols] user@switchPE-1# set rsvp interface lo0.0 user@switchPE-1# set rsvp interface ge-0/0/5.0 user@switchPE-1# set rsvp interface ge-0/0/6.0
配置环路接口和核心接口的 IP 地址:
[edit] user@switchPE-1# set interfaces lo0 unit 0 family inet address 127.1.1.1/32 user@switchPE-1# set interfaces ge-0/0/5 unit 0 family inet address 10.1.5.1/24 user@switchPE-1# set interfaces ge-0/0/6 unit 0 family inet address 10.1.6.1/24
在核心接口地址的逻辑单元上进行配置 family mpls :
[edit] user@switchPE-1# set interfaces ge-0/0/5 unit 0 family mpls user@switchPE-1# set interfaces ge-0/0/6 unit 0 family mpls
将客户边缘接口的逻辑单元配置为 CCC:
[edit interfaces ge-0/0/1 unit 0] -user@PE-1# set family ccc
配置从 PE-1 到 PE-2 基于接口的 CCC:
注:您还可以将标记的 VLAN 接口配置为 CCC。请参阅 使用第 2 层 VPN 配置基于 MPLS 的 VLAN CCC(CLI 过程) 或使用 第 2 层电路配置基于 MPLS 的 VLAN CCC。
[edit protocols] user@PE-1# set connections remote-interface-switch ge-1-to-pe2 interface ge-0/0/1.0 user@PE-1# set connections remote-interface-switch ge-1-to-pe2 transmit-lsp lsp_to_pe2_ge1 user@PE-1# set connections remote-interface-switch ge-1-to-pe2 receive-lsp lsp_to_pe1_ge1
结果
显示配置结果:
user@switchPE-1> show configuration
interfaces { ge-0/0/1 { unit 0 { family ccc; } } ge-0/0/5 { unit 0 { family inet { address 10.1.5.1/24; } family mpls; } } ge-0/0/6 { unit 0 { family inet { address 10.1.6.1/24; } family mpls; } } lo0 { unit 0 { family inet { address 127.1.1.1/32; } } } protocols { rsvp { interface lo0.0; interface ge-0/0/5.0; interface ge-0/0/6.0; } mpls { label-switched-path lsp_to_pe2_ge1 { to 127.1.1.3; } interface ge-0/0/5.0; interface ge-0/0/6.0; } ospf { traffic-engineering; area 0.0.0.0 { interface lo0.0; interface ge-0/0/5.0; interface ge-0/0/6.0; } } connections { remote-interface-switch ge-1-to-pe2 { interface ge-0/0/1.0; transmit-lsp lsp_to_pe2_ge1; receive-lsp lsp_to_pe1_ge1; } }
配置远程 PE 交换机
程序
CLI 快速配置
要快速配置远程 PE 交换机,请复制以下命令,并将其粘贴到 PE-2 的交换机终端窗口中:
[edit] set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 set protocols ospf area 0.0.0.0 interface ae0 set protocols mpls label-switched-path lsp_to_pe1_ge1 to 127.1.1.1 set protocols mpls interface ae0 set protocols rsvp interface lo0.0 set protocols rsvp interface ae0 set interfaces lo0 unit 0 family inet address 127.1.1.3/32 set interfaces ae0 unit 0 family inet address 10.1.9.2/24 set interfaces ae0 unit 0 family mpls set interfaces ge-0/0/1 unit 0 family ccc set protocols connections remote-interface-switch ge-1-to-pe1 interface ge-0/0/1.0 set protocols connections remote-interface-switch ge-1-to-pe1 transmit-lsp lsp_to_pe1_ge1 set protocols connections remote-interface-switch ge-1-to-pe1 receive-lsp lsp_to_pe2_ge1
逐步过程
要配置远程 PE 交换机 (PE-2):
配置 OSPF 并启用流量工程:
[edit protocols] user@switchPE-2# set ospf traffic-engineering
在环路接口和核心接口上配置 OSPF:
[edit protocols] user@switchPE-2# set ospf area 0.0.0.0 interface lo0.0 user@switchPE-2# set ospf area 0.0.0.0 interface ae0
在此交换机 (PE-2) 上使用标签交换路径 (LSP) 配置 MPLS,以连接到其他 PE 交换机 (PE-1):
[edit protocols] user@switchPE-2# set mpls label-switched-path lsp_to_pe1_ge1 to 127.1.1.1
在核心接口上配置 MPLS:
[edit protocols] user@switchPE-2# set mpls interface ae0
在环路接口和核心接口上配置 RSVP:
[edit protocols] ser@switchPE-2# set rsvp interface lo0.0 user@switchPE-2# set rsvp interface ae0
配置环路接口和核心接口的 IP 地址:
[edit] user@switchPE-2# set interfaces lo0 unit 0 family inet address 127.1.1.3/32 user@switchPE-2# set interfaces ae0 unit 0 family inet address 10.1.9.2/24
在核心接口的逻辑单元上配置 family mpls :
[edit] user@switchPE-2# set interfaces ae0 unit 0 family mpls
将客户边缘接口的逻辑单元配置为 CCC:
[edit interfaces ge-0/0/1 unit 0] user@PE-2# set family ccc
配置从 PE-2 到 PE-1 基于接口的 CCC:
[edit protocols] user@PE-2# set connections remote-interface-switch ge-1-to-pe1 interface ge-0/0/1.0 user@PE-2# set connections remote-interface-switch ge-1-to-pe1 transmit-lsp lsp_to_pe1_ge1 user@PE-2# set connections remote-interface-switch ge-1-to-pe1 receive-lsp lsp_to_pe2_ge1
结果
显示配置结果:
user@switchPE-2> show configuration
interfaces { ge-0/0/1 { unit 0 { family ccc; } } ae0 { unit 0 { family inet { address 10.1.9.2/24; } family mpls; } } lo0 { unit 0 { family inet { address 127.1.1.3/32; } } } } protocols { rsvp { interface lo0.0; interface ae0.0; } mpls { label-switched-path lsp_to_pe1_ge1 { to 127.1.1.1; } interface ae0.0; } ospf { traffic-engineering; area 0.0.0.0 { interface ae0.0; } } connections { remote-interface-switch ge-1-to-pe1 { interface ge-0/0/1.0; transmit-lsp lsp_to_pe1_ge1; receive-lsp lsp_to_pe2_ge1; } } }
配置提供商交换机
程序
CLI 快速配置
要快速配置提供商交换机,请复制以下命令并将其粘贴到交换机终端窗口中:
[edit] set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 set protocols ospf area 0.0.0.0 interface ge-0/0/5.0 set protocols ospf area 0.0.0.0 interface ge-0/0/6.0 set protocols ospf area 0.0.0.0 interface ae0 set protocols mpls interface ge-0/0/5.0 set protocols mpls interface ge-0/0/6.0 set protocols mpls interface ae0 set protocols rsvp interface lo0.0 set protocols rsvp interface ge-0/0/5.0 set protocols rsvp interface ge-0/0/6.0 set protocols rsvp interface ae0 set interfaces lo0 unit 0 family inet address 127.1.1.2/32 set interfaces ge-0/0/5 unit 0 family inet address 10.1.5.1/24 set interfaces ge-0/0/6 unit 0 family inet address 10.1.6.1/24 set interfaces ae0 unit 0 family inet address 10.1.9.1/24 set interfaces ge-0/0/5 unit 0 family mpls set interfaces ge-0/0/6 unit 0 family mpls set interfaces ae0 unit 0 family mpls
逐步过程
要配置提供商交换机:
配置 OSPF 并启用流量工程:
[edit protocols] user@switchP# set ospf traffic-engineering
在环路接口和核心接口上配置 OSPF:
[edit protocols] user@switchP# set ospf area 0.0.0.0 interface lo0.0 user@switchP# set ospf area 0.0.0.0 interface ge-0/0/5 user@switchP# set ospf area 0.0.0.0 interface ge-0/0/6 user@switchP# set ospf area 0.0.0.0 interface ae0
在交换机上的核心接口上配置 MPLS:
[edit protocols] user@switchP# set mpls interface ge-0/0/5 user@switchP# set mpls interface ge-0/0/6 user@switchP# set mpls interface ae0
在环路接口和核心接口上配置 RSVP:
[edit protocols] user@switchP# set rsvp interface lo0.0 user@switchP# set rsvp interface ge-0/0/5 user@switchP# set rsvp interface ge-0/0/6 user@switchP# set rsvp interface ae0
配置环路接口和核心接口的 IP 地址:
[edit] user@switchP# set interfaces lo0 unit 0 family inet address 127.1.1.2/32 user@switchP# set interfaces ge-0/0/5 unit 0 family inet address 10.1.5.1/24 user@switchP# set interfaces ge-0/0/6 unit 0 family inet address 10.1.6.1/24 user@switchP# set interfaces ae0 unit 0 family inet address 10.1.9.1/24
在核心接口地址的逻辑单元上进行配置 family mpls :
[edit] user@switchP# set interfaces ge-0/0/5 unit 0 family mpls user@switchP# set interfaces ge-0/0/6 unit 0 family mpls user@switchP# set interfaces ae0 unit 0 family mpls
结果
显示配置结果:
user@switchP> show configuration
interfaces { ge-0/0/5 { unit 0 { family inet { address 10.1.5.1/24; } family mpls; } } ge-0/0/6 { unit 0 { family inet { address 10.1.6.1/24; } family mpls; } } } ae0 { unit 0 { family inet { address 10.1.9.1/24; } family mpls; } } lo0 { unit 0 { family inet { address 127.1.1.2/32; } } } protocols { rsvp { interface lo0.0; interface ge-0/0/5.0; interface ge-0/0/6.0; interface ae0.0; } mpls { interface ge-0/0/5.0; interface ge-0/0/6.0; interface ae0.0; } ospf { traffic-engineering; area 0.0.0.0 { interface lo0.0; interface ge-0/0/5.0; interface ge-0/0/6.0; interface ae0.0; } }
验证
要确认配置工作正常,请执行以下任务:
验证交换机上的物理层
目的
验证接口是否已启动。在每台交换机上执行此验证任务。
行动
user@switchPE-1> show interfaces terse Interface Admin Link Proto Local Remote ge-0/0/0 up up ge-0/0/0.0 up up eth-switch ge-0/0/1 up up ge-0/0/1.0 up up ccc ge-0/0/2 up up ge-0/0/2.0 up up eth-switch ge-0/0/3 up up ge-0/0/3.0 up up eth-switch ge-0/0/4 up up ge-0/0/4.0 up up eth-switch ge-0/0/5 up up ge-0/0/5.0 up up inet 10.1.5.1/24 mpls ge-0/0/6 up up ge-0/0/6.0 up up inet 10.1.6.1/24 mpls
含义
命令 show interfaces terse
显示有关交换机上千兆以太网接口的状态信息。此输出将验证接口是否为 up。协议系列(Proto 列)的输出显示接口 ge-0/0/1.0 配置为电路交叉连接。核心接口 (ge-0/0/5.0 和 ) 的协议家族的输出显示,这些接口被配置为和mplsinet。ge-0/0/6.0 核心 Local 接口的列显示为这些接口配置的 IP 地址。
验证路由协议
目的
验证配置的路由协议的状态。在每台交换机上执行此验证任务。状态必须为 Full。
行动
user@switchPE-1> show ospf neighbor Address Interface State ID Pri Dead 127.1.1.2 ge—0/0/5 Full 10.10.10.10 128 39
含义
命令 show ospf neighbor
会显示路由协议的状态。此输出显示状态为 Full,这意味着路由协议运行正常,也就是说,直接连接的邻接方之间正在交换 hello 数据包。
验证用于 MPLS 流量的核心接口
目的
验证 MPLS 接口的状态是否为 Up。在每台交换机上执行此验证任务。
行动
user@switchPE-1> show mpls interface Interface State Administrative groups ge—0/0/5 Up <none> ge—0/0/6 Up <none>
含义
命令 show mpls interface
显示已配置为属于 family mpls的核心接口的状态。此输出显示配置为属于 family mpls 的接口为 Up。
验证 RSVP 会话的状态
目的
验证 RSVP 会话的状态。在每台交换机上执行此验证任务。
行动
user@switchPE-1> show rsvp session Ingress RSVP: 1 sessions To From State Rt Style Labelin Labelout LSPname 127.1.13 127.1.1.1 Up 0 1 FF - 300064 lsp_to_pe2_ge1 Total 1 displayed, Up 1, Down 0 Egress RSVP: 1 sessions To From State Rt Style Labelin Labelout LSPname 127.1.1.1 127.1.1.3 Up 0 1 FF 299968 lsp_to_pe1_ge1 Total 1 displayed, Up 1, Down 0 Transit RSVP: 0 sessions Total 0 displayed, Up 0, Down 0
含义
此输出确认 RSVP 会话为 Up。
验证用于 MPLS 标签操作的接口分配
目的
验证使用哪个接口作为 CCC 的开头,以及正在使用哪个接口将 MPLS 数据包推送到下一跃点。仅在 PE 交换机上执行此任务。
行动
user@switchPE-1> show route forwarding-table family mpls MPLS: Destination Type RtRef Next hop Type Index NhRef Netif default perm 0 dscd 50 1 0 user 0 recv 49 3 1 user 0 recv 49 3 2 user 0 recv 49 3 299776 user 0 Pop 541 2 ge-0/0/1.0 ge-0/0/1.0 (CCC) user 0 2.0.0.1 Push 299792 540 2 ge-0/0/5.0
含义
此输出显示,CCC 已在接口 ge-0/0/1.0上设置好。交换机接收入口流量 ge-0/0/1.0 ,并将标签 299792 推送到数据包上,然后通过接口 ge-0/0/5.0传出。输出还显示,当交换机收到带有标签 29976 的 MPLS 数据包时,会弹出该标签并通过接口将数据包发送出去 ge-0/0/1.0
检查本地 PE 交换机后,对远程 PE 交换机运行相同的命令。
验证 CCC 的状态
目的
验证 CCC 的状态。仅在 PE 交换机上执行此任务。
行动
user@switchPE-1> show connections CCC and TCC connections [Link Monitoring On] Legend for status (St) Legend for connection types UN -- uninitialized if-sw: interface switching NP -- not present rmt-if: remote interface switching WE -- wrong encapsulation lsp-sw: LSP switching DS -- disabled tx-p2mp-sw: transmit P2MP switching Dn -- down rx-p2mp-sw: receive P2MP switching -> -- only outbound conn is up <- -- only inbound conn is up Legend for circuit types Up -- operational intf -- interface RmtDn -- remote CCC down tlsp -- transmit LSP Restart -- restarting rlsp -- receive LSP Connection/Circuit Type St Time last up # Up trans ge1-to-pe2 rmt-if Up Feb 17 05:00:09 1 ge-0/0/1.0 intf Up lsp_to_pe1_ge1 tlsp Up lsp_to_pe2_ge1 rlsp Up
含义
命令 show connections
显示 CCC 连接的状态。此输出可验证 CCC 接口及其关联的传输和接收 LSP 是否为 Up。检查本地 PE 交换机后,对远程 PE 交换机运行相同的命令。