配置以太网帧丢失测量
使用本主题可了解有关帧丢失测量以及如何配置帧丢失测量的详细信息。
目前,损耗测量不适用于多 LU 卡(MPC3E 和 MPC4E),并且配置没有命令行界面限制。
为 VPLS 连接配置统计帧丢失测量
使用主动统计帧丢失测量,您可以监控 MX 系列路由器上的 VPLS 连接。统计帧丢失测量允许您监控以太网连接的质量,以符合服务级别协议 (SLA)。通过在迭代器上注册连接并启动对连接上的帧传输的定期 SLA 测量,可以监控在 MX 系列路由器上配置的点对点和多点对多点连接。
迭代器使用符合 ITU-Y.1731 标准的帧定期传输 SLA 测量数据包。迭代器为注册到它的每个连接发送定期测量数据包。这些测量周期以不重叠的方式传输,从而减少了对CPU的处理需求。测量数据包在源用户网络接口 (UNI) 端口和目标 UNI 端口之间交换,为每个 UNI 对提供一系列定时性能测量。帧丢失率 (FLR) 和连接可用性可以使用统计数据从这些测量值中计算出来。
以下步骤概述了如何为 VPLS 连接配置统计帧丢失测量:
- 要为 VPLS 连接配置主动 ETH-DM 测量,请参阅 配置路由器以支持 ETH-DM 会话的准则。
- 要为 VPLS 连接启用统计损失测量,请在层次结构级别使用
[edit protocols oam ethernet connectivity-fault-management performance-monitoring]
sla-iterator-profiles 语句为 VPLS 连接配置迭代器。有关详细说明,请参阅 配置迭代器配置文件。 - 作为迭代器配置的一部分,请在层次结构级别包含
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 维护域 (MD) 内指定 CFM 维护关联 (MA) 中 MEP 的 ETH-LM 统计信息。
以下列表包含与 CFM 相关的操作模式命令,这些命令已得到增强,可显示 ETH-LM 统计信息:
该
show oam ethernet connectivity-fault-management interfaces detail
命令已增强,可显示指定 CFM 维护域 (MD) 内指定 CFM 维护关联 (MA) 中 MEP 的 ETH-DM 和 ETH-LM 统计信息。该
show oam ethernet connectivity-fault-management mep-statistics
命令经过增强,可显示指定 CFM 维护域 (MD) 内指定 CFM 维护关联 (MA) 中 MEP 的 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
内的欧洲议会议员收集的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,您可以测量网络中发生的以太网帧损耗。
要求
此示例使用以下硬件和软件组件:
两个 MX 系列 5G 通用路由平台,配备 Rev-B 密集端口集中器 (DPC)
Junos OS 14.2 或更高版本
概述和拓扑
Junos OS 支持 MX 系列路由器中 Rev-B 密集端口集中器 (DPC) 上的以太网物理接口或逻辑接口上配置的维护关联端点 (MEP) 之间的以太网帧丢失测量 (ETH-LM)。此外,Y.1731 功能仅支持使用虚拟专用线服务 (VPWS) 的端到端连接的 ETH-LM。此示例说明如何为输入和输出 VLAN 映射配置为 swap
的单标记 LMM/LMR PDU 配置 ETH-LM。
图 1 显示了此示例中使用的拓扑。VPWS 服务在两个 MX 系列路由器(MX-PE1 和 MX PE2)之间配置。
![在两个 MX 系列路由器之间配置 VPWS 服务](../example/../../images/g042702.gif)
MX-PE1 路由器有两个以太网接口和 ge-5/0/4
ge-5/1/9
. 在 上 ge-5/0/4
配置了虚拟 LAN (VLAN),并在接口上 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
。在 上 ge-8/0/8
配置了虚拟 LAN (VLAN),并在接口上 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/LMR 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,您可以测量网络中发生的以太网帧损耗。
要求
此示例使用以下硬件和软件组件:
两个 MX 系列 5G 通用路由平台,配备 Rev-B 密集端口集中器 (DPC)
Junos OS 14.2 或更高版本
概述和拓扑
Junos OS 支持 MX 系列路由器中 Rev-B 密集端口集中器 (DPC) 上的以太网物理接口或逻辑接口上配置的维护关联端点 (MEP) 之间的以太网帧丢失测量 (ETH-LM)。此外,Y.1731 功能仅支持使用虚拟专用线服务 (VPWS) 的端到端连接的 ETH-LM。此示例说明如何为输入和输出 VLAN 映射配置为 swap-swap
的双标记 LMM/LMR PDU 配置 ETH-LM。
图 2 显示了此示例中使用的拓扑。VPWS 服务在两个 MX 系列路由器(MX-PE1 和 MX PE2)之间配置。
![在两个 MX 系列路由器之间配置 VPWS 服务](../example/../../images/g042702.gif)
MX-PE1 路由器有两个以太网接口和 ge-5/0/4
ge-5/1/9
. 在 上 ge-5/0/4
配置了虚拟 LAN (VLAN),并在接口上 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
。在 上 ge-8/0/8
配置了虚拟 LAN (VLAN),并在接口上 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/LMR 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。