配置以太网帧丢失测量
使用本主题可了解有关帧丢失测量以及如何配置帧丢失测量的更多信息。
目前,损失测量不适用于多 LU 卡(MPC3E 和 MPC4E),并且没有命令行界面限制的配置。
为 VPLS 连接配置统计帧损耗测量
使用主动统计帧损失测量,可以监控 MX 系列路由器上的 VPLS 连接。通过统计帧损失测量,您可以监控服务级别协议 (SLA) 的以太网连接质量。通过在路由器上注册连接并启动对连接上的帧传输的定期 SLA 测量,可以监控 MX 系列路由器上配置的点到点和多点到多点连接。
Iterator 会使用符合 ITU-Y.1731 标准的帧定期传输 SLA 测量数据包。该路由器会定期为注册到它的每个连接发送测量数据包。这些测量周期以不重叠的方式传输,从而降低了对 CPU 的处理需求。测量数据包在源网络接口 (UNI) 端口和目标 UNI 端口之间交换,为每个 UNI 对提供一系列定时性能测量。帧损耗比 (FLR) 和连接可用性可以通过统计数据从这些测量中计算得出。
以下步骤概述了如何为 VPLS 连接配置统计帧损耗测量:
- 要为 VPLS 连接配置主动 ETH-DM 测量,请参阅 配置路由器以支持 ETH-DM 会话的准则。
- 要为 VPLS 连接启用统计损失测量,请使用层级的 sla-iterator-配置文件 语句
[edit protocols oam ethernet connectivity-fault-management performance-monitoring]
为 VPLS 连接配置一个更新器。有关详细说明,请参阅 配置 Iterator 配置文件。 - 作为更新器配置的一部分,在
statistical-frame-loss
层次结构级别包含 测量类型 语句[edit protocols oam ethernet connectivity-fault-management performance-monitoring sla-iterator-profiles profile-name]
选项。 - 启用路由器后,可以通过发出
show oam ethernet connectivity-fault-management sla-iterator-statistics sla-iterator identifier maintenance-domain name maintenance-association name local-mep identifier remote-mep identifier
命令来显示 VPLS 连接的统计帧丢失情况。
另请参阅
管理 ETH-LM 统计信息
显示 ETH-LM 统计信息
目的
显示 ETH-LM 统计信息。
默认情况下, show oam ethernet connectivity-fault-management loss-statistics maintenance-domain md-name maintenance-association ma-name
命令显示指定 CFM 维护关联 (MA) 中指定 CFM 维护关联 (MD) 中的 MEP 的 ETH-LM 统计信息。
以下列表包含已增强以显示 ETH-LM 统计信息的 CFM 相关操作模式命令:
命令
show oam ethernet connectivity-fault-management interfaces detail
得到增强,可显示指定 CFM 维护关联 (MA) 中指定 CFM 维护域 (MD) 中的 ETH-DM 和 ETH-LM 统计信息。命令
show oam ethernet connectivity-fault-management mep-statistics
得到增强,可显示指定 CFM 维护域 (MD) 中指定 CFM 维护关联 (MA) 中的 ETH-DM 和 ETH-LM 统计信息和帧计数。命令
show oam ethernet connectivity-fault-management mep-database
得到增强,可显示指定 CFM 维护域 (MD) 中指定 CFM 维护关联 (MA) 中的 MEP 的 ETH-DM 和 ETH-LM 帧计数器。
行动
要显示连接到路由器上支持 CFM 的接口的所有 MEP 的 ETH-LM 统计信息:
user@host> show oam ethernet connectivity-fault-management loss-statistics
要显示为属于 MA
ma1
和 MDmd1
的 MEP 收集的 ETH-DM 统计信息:user@host> show oam ethernet connectivity-fault-management delay-statistics maintenance-domain md1 maintenance-association ma1
要显示 MA
ma1
中和 MDmd1
中 MEP 的 ETH-DM 统计信息和 ETH-DM 帧计数:user@host> show oam ethernet connectivity-fault-management mep-statistics maintenance-domain md1 maintenance-association ma1
要显示 MD
md1
内 MAma1
中所有 MEP 的 CFM 数据库信息(包括 ETH-DM 帧计数):user@host> show oam ethernet connectivity-fault-management mep-database maintenance-domain md1 maintenance-association ma1
另请参阅
示例:测量单标记 LMM/LMR PDU 的以太网帧损耗
此示例说明了如何为单标记损失测量消息 (LMM)/损失测量回复 (LMR) 协议数据单元 (PDU) 配置以太网帧丢失测量 (ETH-LM)。通过配置 ETH-LM,您可以测量网络中发生的以太网帧丢失。
要求
此示例使用以下硬件和软件组件:
两个配备 Rev-B 密集端口集中器 (DPC) 的 MX 系列 5G 通用路由平台
Junos OS 版本 14.2 或更高版本
概述和拓扑
Junos OS 支持在 MX 系列路由器的以太网物理接口上配置的维护关联端点 (MEP) 或 Rev-B 密集端口集中器 (DPC) 上的逻辑接口之间配置,从而支持以太网帧丢失测量 (ETH-LM)。此外,Y.1731 功能仅支持使用虚拟专用线路服务 (VPWS) 的端到端连接 ETH-LM。此示例说明了如何为输入和输出 VLAN 映射配置为的单标记 LMM/LMR PDU 配置 swap
ETH-LM。
图 1 显示了此示例中使用的拓扑。VPWS 服务在 MX-PE1 和 MX PE2 两个 MX 系列路由器之间配置。

MX-PE1 路由器有两个以太网接口 ge-5/0/4
和 ge-5/1/9
。上配置了虚拟 LAN (VLAN),接口 ge-5/0/4
上 ge-5/1/9
配置了 MPLS。该 ge-5/0/4.11
接口用于使用 MX-PE2 路由器配置第 2 层虚拟电路。UP MEP mep 2
连接到接口。ge-5/0/4.11
此外,还为 MX-PE1 路由器配置了三色监管器防火墙过滤器。
同样,MX-PE2 路由器有两个以太网接口 ge-8/0/8
和 ge-8/0/9
。上配置了虚拟 LAN (VLAN),接口 ge-8/0/8
上 ge-8/0/9
配置了 MPLS。该 ge-8/0/8.11
接口用于使用 MX-PE1 路由器配置第 2 层虚拟电路。UP MEP mep 1
连接到接口。ge-8/0/8.11
此外,还为 MX-PE2 路由器配置了三色监管器防火墙过滤器。
配置
CLI 快速配置
要为单标记的 LMM/LM PDU 快速配置 ETH-LM,请复制以下命令,删除所有换行符,然后将命令粘贴到每个设备的 CLI 中。
在路由器 PE1 上:
[edit] set interfaces ge-5/0/4 encapsulation flexible-ethernet-services set interfaces ge-5/0/4 unit 11 encapsulation vlan-ccc set interfaces ge-5/0/4 unit 11 layer2-policer input-three-color abc set interfaces ge-5/0/4 unit 11 family ccc set interfaces ge-5/1/9 enable set interfaces ge-5/1/9 unit 0 family inet address 12.1.1.1/24 set interfaces ge-5/1/9 unit 0 family mpls set interfaces lo0 unit 0 family inet address 4.4.4.4/32 set interfaces ge-5/0/4 flexible-vlan-tagging set interfaces ge-5/0/4 unit 11 vlan-id 2000 set interfaces ge-5/0/4 unit 11 input-vlan-map swap set interfaces ge-5/0/4 unit 11 input-vlan-map vlan-id 4094 set interfaces ge-5/0/4 unit 11 output-vlan-map swap set routing-options router-id 4.4.4.4 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 fxp0.0 disable set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols l2circuit neighbor 3.3.3.3 interface ge-5/0/4.11 virtual-circuit-id 1003 set protocols l2circuit neighbor 3.3.3.3 interface ge-5/0/4.11 no-control-word set protocols oam ethernet connectivity-fault-management performance-monitoring delegate-server-processing set protocols oam ethernet connectivity-fault-management maintenance-domain md level 4 set protocols oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma continuity-check interval 1s set protocols oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 2 interface ge-5/0/4.11 set protocols oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 2 direction up set protocols oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 2 remote-mep 1 set firewall three-color-policer abc logical-interface-policer set firewall three-color-policer abc two-rate color-blind set firewall three-color-policer abc two-rate committed-information-rate 10m set firewall three-color-policer abc two-rate committed-burst-size 1500 set firewall three-color-policer abc two-rate peak-information-rate 20m set firewall three-color-policer abc two-rate peak-burst-size 15k
在路由器 PE2 上:
[edit] set interfaces ge-8/0/8 encapsulation flexible-ethernet-services set interfaces ge-8/0/8 unit 11 encapsulation vlan-ccc set interfaces ge-8/0/8 unit 11 layer2-policer input-three-color abc set interfaces ge-8/0/8 unit 11 family ccc set interfaces ge-8/0/9 enable set interfaces ge-8/0/9 unit 0 family inet address 12.1.1.1/24 set interfaces ge-8/0/9 unit 0 family mpls set interfaces ae0 unit 0 family inet set interfaces lo0 unit 0 family inet address 3.3.3.3/32 set interfaces ge-8/0/8 flexible-vlan-tagging set interfaces ge-8/0/8 unit 11 vlan-id 2000 set interfaces ge-8/0/8 unit 11 input-vlan-map swap set interfaces ge-8/0/8 unit 11 input-vlan-map vlan-id 4094 set interfaces ge-8/0/8 unit 11 output-vlan-map swap set routing-options router-id 3.3.3.3 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 fxp0.0 disable set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols l2circuit neighbor 4.4.4.4 interface ge-8/0/8.11 virtual-circuit-id 1003 set protocols l2circuit neighbor 3.3.3.3 interface ge-8/0/8.11 no-control-word set protocols oam ethernet connectivity-fault-management maintenance-domain md level 4 set protocols oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma continuity-check interval 1s set protocols oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 1 interface ge-8/0/8.11 set protocols oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 1 direction up set protocols oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 1 remote-mep 2 set firewall three-color-policer abc logical-interface-policer set firewall three-color-policer abc two-rate color-blind set firewall three-color-policer abc two-rate committed-information-rate 10m set firewall three-color-policer abc two-rate committed-burst-size 1500 set firewall three-color-policer abc two-rate peak-information-rate 20m set firewall three-color-policer abc two-rate peak-burst-size 15k
配置路由器 PE1
逐步过程
要配置路由器 PE1:
配置接口。
[edit] user@PE1# edit interfaces [edit interfaces] user@PE1# set ge-5/0/4 encapsulation flexible-ethernet-services user@PE1# set ge-5/0/4 unit 11 encapsulation vlan-ccc user@PE1# set ge-5/0/4 unit 11 layer2-policer input-three-color abc user@PE1# set ge-5/0/4 unit 11 family ccc user@PE1# set ge-5/1/9 enable user@PE1# set ge-5/1/9 unit 0 family inet address 12.1.1.1/24 user@PE1# set ge-5/1/9 unit 0 family mpls user@PE1# set lo0 unit 0 family inet address 4.4.4.4/32
配置 VLAN。
[edit interfaces] user@PE1# set ge-5/0/4 flexible-vlan-tagging user@PE1# set ge-5/0/4 unit 11 vlan-id 2000 user@PE1# set ge-5/0/4 unit 11 input-vlan-map swap user@PE1# set ge-5/0/4 unit 11 input-vlan-map vlan-id 4094 user@PE1# set ge-5/0/4 unit 11 output-vlan-map swap
配置路由器标识符以识别路由设备。
[edit] user@PE1# edit routing-options [edit routing-options] user@PE1# set router-id 4.4.4.4
配置 MPLS、OSPF 和 LDP 协议。
[edit] user@PE1# edit protocols [edit protocols] user@PE1# set mpls interface all user@PE1# set mpls interface fxp0.0 disable user@PE1# set ospf area 0.0.0.0 interface all user@PE1# set ospf area 0.0.0.0 interface fxp0.0 disable user@PE1# set ldp interface all user@PE1# set ldp interface fxp0.0 disable
配置第 2 层电路。
[edit protocols] user@PE1# set l2circuit neighbor 3.3.3.3 interface ge-5/0/4.11 virtual-circuit-id 1003 user@PE1# set l2circuit neighbor 3.3.3.3 interface ge-5/0/4.11 no-control-word
配置 MEP。
[edit protocols] user@PE1# set oam ethernet connectivity-fault-management performance-monitoring delegate-server-processing user@PE1# set oam ethernet connectivity-fault-management maintenance-domain md level 4 user@PE1# set oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma continuity-check interval 1s user@PE1# set oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 2 interface ge-5/0/4.11 user@PE1# set oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 2 direction up user@PE1# set oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 2 remote-mep 1
配置防火墙。
[edit] user@PE1# edit firewall [edit firewall] user@PE1# set three-color-policer abc logical-interface-policer user@PE1# set three-color-policer abc two-rate color-blind user@PE1# set three-color-policer abc two-rate committed-information-rate 10m user@PE1# set three-color-policer abc two-rate committed-burst-size 1500 user@PE1# set three-color-policer abc two-rate peak-information-rate 20m user@PE1# set three-color-policer abc two-rate peak-burst-size 15k
提交配置。
[edit] user@PE1# commit
结果
在配置模式下,输入 show interfaces
、 show protocols
、 show routing-options
和 show firewall
命令,以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明,以更正配置。
user@PE1# show interfaces interfaces { ge-5/0/4 { flexible-vlan-tagging; encapsulation flexible-ethernet-services; unit 11 { encapsulation vlan-ccc; vlan-id 2000; input-vlan-map { swap; vlan-id 4094; } output-vlan-map swap; layer2-policer { input-three-color abc; } family ccc; } } ge-5/1/9 { enable; unit 0 { family inet { address 12.1.1.1/24; } family mpls; } } lo0 { unit 0 { family inet { address 4.4.4.4/32; } } } }
user@PE1# show protocols protocols { mpls { interface all; interface fxp0.0 { disable; } } ospf { area 0.0.0.0 { interface all; interface fxp0.0 { disable; } } } ldp { interface all; interface fxp0.0 { disable; } } l2circuit { neighbor 3.3.3.3 { interface ge-5/0/4.11 { virtual-circuit-id 1003; no-control-word; } } } oam { ethernet { connectivity-fault-management { performance-monitoring { delegate-server-processing; } maintenance-domain md { level 4; maintenance-association ma { continuity-check { interval 1s; } mep 2 { interface ge-5/0/4.11; direction up; remote-mep 1; } } } } } } }
user@PE1# show routing-options routing-options { router-id 4.4.4.4; }
user@PE1# show firewall firewall { three-color-policer abc { logical-interface-policer; two-rate { color-blind; committed-information-rate 10m; committed-burst-size 1500; peak-information-rate 20m; peak-burst-size 15k; } } }
配置路由器 PE2
逐步过程
要配置路由器 PE2:
配置接口。
[edit] user@PE2# edit interfaces [edit interfaces] user@PE2# set ge-8/0/8 encapsulation flexible-ethernet-services user@PE2# set ge-8/0/8 unit 11 encapsulation vlan-ccc user@PE2# set ge-8/0/8 unit 11 layer2-policer input-three-color abc user@PE2# set ge-8/0/8 unit 11 family ccc user@PE2# set ge-8/0/9 enable user@PE2# set ge-8/0/9 unit 0 family inet address 12.1.1.1/24 user@PE2# set ge-8/0/9 unit 0 family mpls user@PE2# set ae0 unit 0 family inet user@PE2# set lo0 unit 0 family inet address 3.3.3.3/32
配置 VLAN。
[edit interfaces] user@PE2# set ge-8/0/8 flexible-vlan-tagging user@PE2# set ge-8/0/8 unit 11 vlan-id 2000 user@PE2# set ge-8/0/8 unit 11 input-vlan-map swap user@PE2# set ge-8/0/8 unit 11 input-vlan-map vlan-id 4094 user@PE2# set ge-8/0/8 unit 11 output-vlan-map swap
配置路由器标识符以识别路由设备。
[edit] user@PE2# edit routing-options [edit routing-options] user@PE2# set router-id 3.3.3.3
配置 MPLS、OSPF 和 LDP 协议。
[edit] user@PE2# edit protocols [edit protocols] user@PE2# set mpls interface all user@PE2# set mpls interface fxp0.0 disable user@PE2# set ospf area 0.0.0.0 interface all user@PE2# set ospf area 0.0.0.0 interface fxp0.0 disable user@PE2# set ldp interface all user@PE2# set ldp interface fxp0.0 disable
配置第 2 层电路。
[edit protocols] user@PE2# set l2circuit neighbor 4.4.4.4 interface ge-8/0/8.11 virtual-circuit-id 1003 user@PE2# set l2circuit neighbor 3.3.3.3 interface ge-8/0/8.11 no-control-word
配置 MEP。
[edit protocols] user@PE2# set oam ethernet connectivity-fault-management maintenance-domain md level 4 user@PE2# set oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma continuity-check interval 1s user@PE2# set oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 1 interface ge-8/0/8.11 user@PE2# set oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 1 direction up user@PE2# set oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 1 remote-mep 2
配置防火墙。
[edit] user@PE2# edit firewall [edit firewall] user@PE2# set three-color-policer abc logical-interface-policer user@PE2# set three-color-policer abc two-rate color-blind user@PE2# set three-color-policer abc two-rate committed-information-rate 10m user@PE2# set three-color-policer abc two-rate committed-burst-size 1500 user@PE2# set three-color-policer abc two-rate peak-information-rate 20m user@PE2# set three-color-policer abc two-rate peak-burst-size 15k
提交配置。
[edit] user@PE2# commit
结果
在配置模式下,输入 show interfaces
、 show protocols
、 show routing-options
和 show firewall
命令,以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明,以更正配置。
user@PE2# show interfaces interfaces { ge-8/0/8 { flexible-vlan-tagging; encapsulation flexible-ethernet-services; unit 11 { encapsulation vlan-ccc; vlan-id 2000; input-vlan-map { swap; vlan-id 4094; } output-vlan-map swap; layer2-policer { input-three-color abc; } family ccc; } } ge-8/0/9 { unit 0 { family inet { address 12.1.1.2/24; } family mpls; } } ae0 { unit 0 { family inet; } } lo0 { unit 0 { family inet { address 3.3.3.3/32; } } } }
user@PE2# show protocols protocols { mpls { interface all; interface fxp0.0 { disable; } } ospf { area 0.0.0.0 { interface all; interface fxp0.0 { disable; } } } ldp { interface all; interface fxp0.0 { disable; } } l2circuit { neighbor 4.4.4.4 { interface ge-8/0/8.11 { virtual-circuit-id 1003; no-control-word; } } } oam { ethernet { connectivity-fault-management { maintenance-domain md { level 4; maintenance-association ma { continuity-check { interval 1s; } mep 1 { interface ge-8/0/8.11; direction up; remote-mep 2; } } } } } } }
user@PE2# show routing-options routing-options { router-id 3.3.3.3; }
user@PE2# show firewall firewall { three-color-policer abc { logical-interface-policer; two-rate { color-blind; committed-information-rate 10m; committed-burst-size 1500; peak-information-rate 20m; peak-burst-size 15k; } } }
验证
要开始监控以太网帧丢失,请发出 monitor ethernet loss-measurement maintenance-domain md maintenance-association ma mep 1
命令。帧丢失是通过收集适用于入口和出口服务帧的计数器值来计算的,其中计数器在一对 MEP 之间维护传输和接收的数据帧计数。将损失测量统计数据作为命令的 monitor ethernet loss-measurement
输出进行检索。您还可以发出 show oam ethernet connectivity-fault-management interfaces detail ge-5/0/4.11
命令来显示 ETH-LM 统计信息。
查看 ETH-LM
目的
查看 ETH-LM 统计数据。
行动
在操作模式下,输入 show oam ethernet connectivity-fault-management interfaces detail ge-5/0/4.11
命令。
user@PE1> show oam ethernet connectivity-fault-management interfaces detail ge-5/0/4.11 Interface name: ge-5/0/4.11 , Interface status: Active, Link status: Up Maintenance domain name: md, Format: string, Level: 4 Maintenance association name: ma, Format: string Continuity-check status: enabled, Interval: 1s, Loss-threshold: 3 frames Interface status TLV: none, Port status TLV: none Connection Protection TLV: no MEP identifier: 2, Direction: up, MAC address: 00:24:dc:9b:96:76 MEP status: running Defects: Remote MEP not receiving CCM : no Erroneous CCM received : no Cross-connect CCM received : no RDI sent by some MEP : no Some remote MEP's MAC in error state : no Statistics: CCMs sent : 36 CCMs received out of sequence : 0 LBMs sent : 0 Valid in-order LBRs received : 0 Valid out-of-order LBRs received : 0 LBRs received with corrupted data : 0 LBRs sent : 0 LTMs sent : 0 LTMs received : 0 LTRs sent : 0 LTRs received : 0 Sequence number of next LTM request : 0 1DMs sent : 0 Valid 1DMs received : 0 Invalid 1DMs received : 0 Out of sync 1DMs received : 0 DMMs sent : 0 Valid DMMs received : 0 Invalid DMMs received : 0 DMRs sent : 0 Valid DMRs received : 0 Invalid DMRs received : 0 LMMs sent : 10 Valid LMMs received : 0 Invalid LMMs received : 0 LMRs sent : 0 Valid LMRs received : 10 Invalid LMRs received : 0 SLMs sent : 0 Valid SLMs received : 0 Invalid SLMs received : 0 SLRs sent : 0 Valid SLRs received : 0 Invalid SLRs received : 0 Remote MEP count: 1 Identifier MAC address State Interface 1 00:05:85:76:e5:30 ok ge-5/0/4.11
含义
将显示以太网接口的详细信息和统计信息。此输出表示 ge-5/0/4.11
接口处于活动状态,其链路状态为 up
。它的维护域名是 md
,其级别是 4
。接口的 ge-5/0/4.11
MEP 标识符指示为 2
,其方向为 up
。在统计信息部分下,输出指示 10
已发送LMM,接口 10
已接收有效的LMR。
示例:测量双标记 LMM/LMR PDU 的以太网帧损耗
此示例说明了如何为双标记损失测量消息 (LMM)/损失测量回复 (LMR) 协议数据单元 (PDU) 配置以太网帧丢失测量 (ETH-LM)。通过配置 ETH-LM,您可以测量网络中发生的以太网帧丢失。
要求
此示例使用以下硬件和软件组件:
两个配备 Rev-B 密集端口集中器 (DPC) 的 MX 系列 5G 通用路由平台
Junos OS 版本 14.2 或更高版本
概述和拓扑
Junos OS 支持在 MX 系列路由器的以太网物理接口上配置的维护关联端点 (MEP) 或 Rev-B 密集端口集中器 (DPC) 上的逻辑接口之间配置,从而支持以太网帧丢失测量 (ETH-LM)。此外,Y.1731 功能仅支持使用虚拟专用线路服务 (VPWS) 的端到端连接 ETH-LM。此示例说明了如何为输入和输出 VLAN 映射配置为的双标记 LMM/LMR PDU 配置 swap-swap
ETH-LM。
图 2 显示了此示例中使用的拓扑。VPWS 服务配置在两个 MX Sereies 路由器、MX-PE1 和 MX PE2 之间。

MX-PE1 路由器有两个以太网接口 ge-5/0/4
和 ge-5/1/9
。上配置了虚拟 LAN (VLAN),接口 ge-5/0/4
上 ge-5/1/9
配置了 MPLS。该 ge-5/0/4.11
接口用于使用 MX-PE2 路由器配置第 2 层虚拟电路。UP MEP mep 2
连接到接口。ge-5/0/4.11
此外,还为 MX-PE1 路由器配置了三色监管器防火墙过滤器。
同样,MX-PE2 路由器有两个以太网接口 ge-8/0/8
和 ge-8/0/9
。上配置了虚拟 LAN (VLAN),接口 ge-8/0/8
上 ge-8/0/9
配置了 MPLS。该 ge-8/0/8.11
接口用于使用 MX-PE1 路由器配置第 2 层虚拟电路。UP MEP mep 1
连接到接口。ge-8/0/8.11
此外,还为 MX-PE2 路由器配置了三色监管器防火墙过滤器。
配置
CLI 快速配置
要为双标记的 LMM/LM PDU 快速配置 ETH-LM,请复制以下命令,删除所有换行符,然后将命令粘贴到每个设备的 CLI 中。
在路由器 PE1 上:
[edit] set interfaces ge-5/0/4 encapsulation flexible-ethernet-services set interfaces ge-5/0/4 unit 11 encapsulation vlan-ccc set interfaces ge-5/0/4 unit 11 layer2-policer input-three-color abc set interfaces ge-5/0/4 unit 11 family ccc set interfaces ge-5/1/9 enable set interfaces ge-5/1/9 unit 0 family inet address 12.1.1.1/24 set interfaces ge-5/1/9 unit 0 family mpls set interfaces lo0 unit 0 family inet address 4.4.4.4/32 set interfaces ge-5/0/4 flexible-vlan-tagging set interfaces ge-5/0/4 unit 11 vlan-tags outer 2000 inner 1000 set interfaces ge-5/0/4 unit 11 input-vlan-map swap-swap set interfaces ge-5/0/4 unit 11 input-vlan-map vlan-id 4094 set interfaces ge-5/0/4 unit 11 input-vlan-map inner-vlan-id 4093 set interfaces ge-5/0/4 unit 11 output-vlan-map swap-swap set routing-options router-id 4.4.4.4 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 fxp0.0 disable set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols l2circuit neighbor 3.3.3.3 interface ge-5/0/4.11 virtual-circuit-id 1003 set protocols l2circuit neighbor 3.3.3.3 interface ge-5/0/4.11 no-control-word set protocols oam ethernet connectivity-fault-management performance-monitoring delegate-server-processing set protocols oam ethernet connectivity-fault-management maintenance-domain md level 4 set protocols oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma continuity-check interval 1s set protocols oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 2 interface ge-5/0/4.11 set protocols oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 2 direction up set protocols oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 2 remote-mep 1 set firewall three-color-policer abc logical-interface-policer set firewall three-color-policer abc two-rate color-blind set firewall three-color-policer abc two-rate committed-information-rate 10m set firewall three-color-policer abc two-rate committed-burst-size 1500 set firewall three-color-policer abc two-rate peak-information-rate 20m set firewall three-color-policer abc two-rate peak-burst-size 15k
在路由器 PE2 上:
[edit] set interfaces ge-8/0/8 encapsulation flexible-ethernet-services set interfaces ge-8/0/8 unit 11 encapsulation vlan-ccc set interfaces ge-8/0/8 unit 11 layer2-policer input-three-color abc set interfaces ge-8/0/8 unit 11 family ccc set interfaces ge-8/0/9 enable set interfaces ge-8/0/9 unit 0 family inet address 12.1.1.1/24 set interfaces ge-8/0/9 unit 0 family mpls set interfaces ae0 unit 0 family inet set interfaces lo0 unit 0 family inet address 3.3.3.3/32 set interfaces ge-8/0/8 flexible-vlan-tagging set interfaces ge-8/0/8 unit 11 vlan-tags outer 2000 inner 1000 set interfaces ge-8/0/8 unit 11 input-vlan-map swap-swap set interfaces ge-8/0/8 unit 11 input-vlan-map vlan-id 4094 set interfaces ge-8/0/8 unit 11 input-vlan-map inner-vlan-id 4093 set interfaces ge-8/0/8 unit 11 output-vlan-map swap-swap set routing-options router-id 3.3.3.3 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 fxp0.0 disable set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols l2circuit neighbor 4.4.4.4 interface ge-8/0/8.11 virtual-circuit-id 1003 set protocols l2circuit neighbor 3.3.3.3 interface ge-8/0/8.11 no-control-word set protocols oam ethernet connectivity-fault-management maintenance-domain md level 4 set protocols oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma continuity-check interval 1s set protocols oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 1 interface ge-8/0/8.11 set protocols oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 1 direction up set protocols oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 1 remote-mep 2 set firewall three-color-policer abc logical-interface-policer set firewall three-color-policer abc two-rate color-blind set firewall three-color-policer abc two-rate committed-information-rate 10m set firewall three-color-policer abc two-rate committed-burst-size 1500 set firewall three-color-policer abc two-rate peak-information-rate 20m set firewall three-color-policer abc two-rate peak-burst-size 15k
配置路由器 PE1
逐步过程
要配置路由器 PE1:
配置接口。
[edit] user@PE1# edit interfaces [edit interfaces] user@PE1# set ge-5/0/4 encapsulation flexible-ethernet-services user@PE1# set ge-5/0/4 unit 11 encapsulation vlan-ccc user@PE1# set ge-5/0/4 unit 11 layer2-policer input-three-color abc user@PE1# set ge-5/0/4 unit 11 family ccc user@PE1# set ge-5/1/9 enable user@PE1# set ge-5/1/9 unit 0 family inet address 12.1.1.1/24 user@PE1# set ge-5/1/9 unit 0 family mpls user@PE1# set lo0 unit 0 family inet address 4.4.4.4/32
配置 VLAN。
[edit interfaces] user@PE1# set ge-5/0/4 flexible-vlan-tagging user@PE1# set ge-5/0/4 unit 11 vlan-tags outer 2000 inner 1000 user@PE1# set ge-5/0/4 unit 11 input-vlan-map swap-swap user@PE1# set ge-5/0/4 unit 11 input-vlan-map vlan-id 4094 user@PE1# set ge-5/0/4 unit 11 input-vlan-map inner-vlan-id 4093 user@PE1# set ge-5/0/4 unit 11 output-vlan-map swap-swap
配置路由器标识符以识别路由设备。
[edit] user@PE1# edit routing-options [edit routing-options] user@PE1# set router-id 4.4.4.4
配置 MPLS、OSPF 和 LDP 协议。
[edit] user@PE1# edit protocols [edit protocols] user@PE1# set mpls interface all user@PE1# set mpls interface fxp0.0 disable user@PE1# set ospf area 0.0.0.0 interface all user@PE1# set ospf area 0.0.0.0 interface fxp0.0 disable user@PE1# set ldp interface all user@PE1# set ldp interface fxp0.0 disable
配置第 2 层电路。
[edit protocols] user@PE1# set l2circuit neighbor 3.3.3.3 interface ge-5/0/4.11 virtual-circuit-id 1003 user@PE1# set l2circuit neighbor 3.3.3.3 interface ge-5/0/4.11 no-control-word
配置 MEP。
[edit protocols] user@PE1# set oam ethernet connectivity-fault-management performance-monitoring delegate-server-processing user@PE1# set oam ethernet connectivity-fault-management maintenance-domain md level 4 user@PE1# set oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma continuity-check interval 1s user@PE1# set oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 2 interface ge-5/0/4.11 user@PE1# set oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 2 direction up user@PE1# set oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 2 remote-mep 1
配置防火墙。
[edit] user@PE1# edit firewall [edit firewall] user@PE1# set three-color-policer abc logical-interface-policer user@PE1# set three-color-policer abc two-rate color-blind user@PE1# set three-color-policer abc two-rate committed-information-rate 10m user@PE1# set three-color-policer abc two-rate committed-burst-size 1500 user@PE1# set three-color-policer abc two-rate peak-information-rate 20m user@PE1# set three-color-policer abc two-rate peak-burst-size 15k
提交配置。
[edit] user@PE1# commit
结果
在配置模式下,输入 show interfaces
、 show protocols
、 show routing-options
和 show firewall
命令,以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明,以更正配置。
user@PE1# show interfaces interfaces { ge-5/0/4 { flexible-vlan-tagging; encapsulation flexible-ethernet-services; unit 11 { encapsulation vlan-ccc; vlan-tags outer 2000 inner 1000; input-vlan-map { swap-swap; vlan-id 4094; inner-vlan-id 4093; } output-vlan-map swap-swap; layer2-policer { input-three-color abc; } family ccc; } } ge-5/1/9 { enable; unit 0 { family inet { address 12.1.1.1/24; } family mpls; } } lo0 { unit 0 { family inet { address 4.4.4.4/32; } } } }
user@PE1# show protocols protocols { mpls { interface all; interface fxp0.0 { disable; } } ospf { area 0.0.0.0 { interface all; interface fxp0.0 { disable; } } } ldp { interface all; interface fxp0.0 { disable; } } l2circuit { neighbor 3.3.3.3 { interface ge-5/0/4.11 { virtual-circuit-id 1003; no-control-word; } } } oam { ethernet { connectivity-fault-management { performance-monitoring { delegate-server-processing; } maintenance-domain md { level 4; maintenance-association ma { continuity-check { interval 1s; } mep 2 { interface ge-5/0/4.11; direction up; remote-mep 1; } } } } } } }
user@PE1# show routing-options routing-options { router-id 4.4.4.4; }
user@PE1# show firewall firewall { three-color-policer abc { logical-interface-policer; two-rate { color-blind; committed-information-rate 10m; committed-burst-size 1500; peak-information-rate 20m; peak-burst-size 15k; } } }
配置路由器 PE2
逐步过程
要配置路由器 PE2:
配置接口。
[edit] user@PE2# edit interfaces [edit interfaces] user@PE2# set ge-8/0/8 encapsulation flexible-ethernet-services user@PE2# set ge-8/0/8 unit 11 encapsulation vlan-ccc user@PE2# set ge-8/0/8 unit 11 layer2-policer input-three-color abc user@PE2# set ge-8/0/8 unit 11 family ccc user@PE2# set ge-8/0/9 enable user@PE2# set ge-8/0/9 unit 0 family inet address 12.1.1.1/24 user@PE2# set ge-8/0/9 unit 0 family mpls user@PE2# set ae0 unit 0 family inet user@PE2# set lo0 unit 0 family inet address 3.3.3.3/32
配置 VLAN。
[edit interfaces] user@PE2# set ge-8/0/8 flexible-vlan-tagging user@PE2# set ge-8/0/8 unit 11 vlan-tags outer 2000 inner 1000 user@PE2# set ge-8/0/8 unit 11 input-vlan-map swap-swap user@PE2# set ge-8/0/8 unit 11 input-vlan-map vlan-id 4094 user@PE2# set ge-8/0/8 unit 11 input-vlan-map inner-vlan-id 4093 user@PE2# set ge-8/0/8 unit 11 output-vlan-map swap-swap
配置路由器标识符以识别路由设备。
[edit] user@PE2# edit routing-options [edit routing-options] user@PE2# set router-id 3.3.3.3
配置 MPLS、OSPF 和 LDP 协议。
[edit] user@PE2# edit protocols [edit protocols] user@PE2# set mpls interface all user@PE2# set mpls interface fxp0.0 disable user@PE2# set ospf area 0.0.0.0 interface all user@PE2# set ospf area 0.0.0.0 interface fxp0.0 disable user@PE2# set ldp interface all user@PE2# set ldp interface fxp0.0 disable
配置第 2 层电路。
[edit protocols] user@PE2# set l2circuit neighbor 4.4.4.4 interface ge-8/0/8.11 virtual-circuit-id 1003 user@PE2# set l2circuit neighbor 3.3.3.3 interface ge-8/0/8.11 no-control-word
配置 MEP。
[edit protocols] user@PE2# set oam ethernet connectivity-fault-management maintenance-domain md level 4 user@PE2# set oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma continuity-check interval 1s user@PE2# set oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 1 interface ge-8/0/8.11 user@PE2# set oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 1 direction up user@PE2# set oam ethernet connectivity-fault-management maintenance-domain md maintenance-association ma mep 1 remote-mep 2
配置防火墙。
[edit] user@PE2# edit firewall [edit firewall] user@PE2# set three-color-policer abc logical-interface-policer user@PE2# set three-color-policer abc two-rate color-blind user@PE2# set three-color-policer abc two-rate committed-information-rate 10m user@PE2# set three-color-policer abc two-rate committed-burst-size 1500 user@PE2# set three-color-policer abc two-rate peak-information-rate 20m user@PE2# set three-color-policer abc two-rate peak-burst-size 15k
提交配置。
[edit] user@PE2# commit
结果
在配置模式下,输入 show interfaces
、 show protocols
、 show routing-options
和 show firewall
命令,以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明,以更正配置。
user@PE2# show interfaces interfaces { ge-8/0/8 { flexible-vlan-tagging; encapsulation flexible-ethernet-services; unit 11 { encapsulation vlan-ccc; vlan-tags outer 2000 inner 1000; input-vlan-map { swap-swap; vlan-id 4094; inner-vlan-id 4093; } output-vlan-map swap-swap; layer2-policer { input-three-color abc; } family ccc; } } ge-8/0/9 { unit 0 { family inet { address 12.1.1.2/24; } family mpls; } } ae0 { unit 0 { family inet; } } lo0 { unit 0 { family inet { address 3.3.3.3/32; } } } }
user@PE2# show protocols protocols { mpls { interface all; interface fxp0.0 { disable; } } ospf { area 0.0.0.0 { interface all; interface fxp0.0 { disable; } } } ldp { interface all; interface fxp0.0 { disable; } } l2circuit { neighbor 4.4.4.4 { interface ge-8/0/8.11 { virtual-circuit-id 1003; no-control-word; } } } oam { ethernet { connectivity-fault-management { maintenance-domain md { level 4; maintenance-association ma { continuity-check { interval 1s; } mep 1 { interface ge-8/0/8.11; direction up; remote-mep 2; } } } } } } }
user@PE2# show routing-options routing-options { router-id 3.3.3.3; }
user@PE2# show firewall firewall { three-color-policer abc { logical-interface-policer; two-rate { color-blind; committed-information-rate 10m; committed-burst-size 1500; peak-information-rate 20m; peak-burst-size 15k; } } }
验证
要启动以太网帧丢失测量会话,请发出 monitor ethernet loss-measurement maintenance-domain md maintenance-association ma mep 1
命令。帧丢失是通过收集适用于入口和出口服务帧的计数器值来计算的,其中计数器在一对 MEP 之间维护传输和接收的数据帧计数。将损失测量统计数据作为命令的 monitor ethernet loss-measurement
输出进行检索。您还可以发出 show oam ethernet connectivity-fault-management interfaces detail ge-5/0/4.11
命令来显示 ETH-LM 统计信息。
查看 ETH-LM
目的
查看 ETH-LM 统计数据。
行动
在操作模式下,输入 show oam ethernet connectivity-fault-management interfaces detail ge-5/0/4.11
命令。
user@PE1> show oam ethernet connectivity-fault-management interfaces detail ge-5/0/4.11 Interface name: ge-5/0/4.11 , Interface status: Active, Link status: Up Maintenance domain name: md, Format: string, Level: 4 Maintenance association name: ma, Format: string Continuity-check status: enabled, Interval: 1s, Loss-threshold: 3 frames Interface status TLV: none, Port status TLV: none Connection Protection TLV: no MEP identifier: 2, Direction: up, MAC address: 00:24:dc:9b:96:76 MEP status: running Defects: Remote MEP not receiving CCM : no Erroneous CCM received : no Cross-connect CCM received : no RDI sent by some MEP : no Some remote MEP's MAC in error state : no Statistics: CCMs sent : 59 CCMs received out of sequence : 0 LBMs sent : 0 Valid in-order LBRs received : 0 Valid out-of-order LBRs received : 0 LBRs received with corrupted data : 0 LBRs sent : 0 LTMs sent : 0 LTMs received : 0 LTRs sent : 0 LTRs received : 0 Sequence number of next LTM request : 0 1DMs sent : 0 Valid 1DMs received : 0 Invalid 1DMs received : 0 Out of sync 1DMs received : 0 DMMs sent : 0 Valid DMMs received : 0 Invalid DMMs received : 0 DMRs sent : 0 Valid DMRs received : 0 Invalid DMRs received : 0 LMMs sent : 10 Valid LMMs received : 0 Invalid LMMs received : 0 LMRs sent : 0 Valid LMRs received : 10 Invalid LMRs received : 0 SLMs sent : 0 Valid SLMs received : 0 Invalid SLMs received : 0 SLRs sent : 0 Valid SLRs received : 0 Invalid SLRs received : 0 Remote MEP count: 1 Identifier MAC address State Interface 1 00:05:85:76:e5:30 ok ge-5/0/4.11
含义
将显示以太网接口的详细信息和统计信息。此输出表示 ge-5/0/4.11
接口处于活动状态,其链路状态为 up
。它的维护域名是 md
,其级别是 4
。接口的 ge-5/0/4.11
MEP 标识符指示为 2
,其方向为 up
。在统计信息部分下,输出指示 10
已发送LMM,接口 10
已接收有效的LMR。