素材来源:华为路由器配置指南
一边学习一边整理试验笔记,并与大家分享,侵权即删,谢谢支持!
附上汇总贴:玩转华为ENSP模拟器系列 | 合集_COCOgsta的博客-CSDN博客_ensp实验大全
目标
配置按需的单端丢包统计并查看结果
组网模型
配置思路
- 创建一条伪线业务。
- 使能CFM功能。
- 创建维护域MD,维护联盟MA并关联伪线。
- 为MA配置MEP。
- 在该发送设备上配置测试实例并指定测试内容。
操作步骤
- PE1节点配置
创建一条伪线业务
PE1:
interface LoopBack0
ip address 1.1.1.135 255.255.255.255
mpls lsr-id 1.1.1.135
mpls
mpls l2vpn
mpls ldp
mpls ldp remote-peer 1.1.1.136
remote-ip 1.1.1.136
interface Ethernet1/0/0
ip address 125.0.0.1 255.255.255.0
mpls
mpls ldp
ospf 1
area 0.0.0.0
network 1.1.1.135 0.0.0.0
network 125.0.0.0 0.0.0.255
interface Ethernet1/0/1.1
vlan-type dot1q 1
mpls l2vc 1.1.1.136 13560 control-word raw
使能CFM功能
PE1:
cfm enable
创建维护域MD,维护联盟MA并关联伪线
PE1:
cfm md md1
ma ma1
map mpls l2vc 1.1.1.136 13560 raw
为MA配置MEP
PE1:
cfm md md1
ma ma1
mep mep-id 1 interface Ethernet1/0/1.1 vlan 1 inward
mep ccm-send mep-id 1 enable
remote-mep mep-id 2
remote-mep ccm-receive mep-id 2 enable
在该发送设备上配置测试实例并指定测试内容为按需的单端丢包检测并设置检测次数和间隔
PE1:
cfm md md1
ma ma1
test-id 1 mep 1 remote-mep 2
loss-measure single-ended send test-id 1 interval 1000 count 2
- PE2节点配置
创建一条伪线业务
PE2:
interface LoopBack0
ip address 1.1.1.136 255.255.255.255
mpls lsr-id 1.1.1.136
mpls
mpls l2vpn
mpls ldp
mpls ldp remote-peer 1.1.1.135
remote-ip 1.1.1.135
interface Ethernet1/0/0
ip address 125.0.0.2 255.255.255.0
mpls
mpls ldp
ospf 1
area 0.0.0.0
network 1.1.1.136 0.0.0.0
network 125.0.0.0 0.0.0.255
interface Ethernet1/0/1.1
vlan-type dot1q 1
mpls l2vc 1.1.1.135 13560 control-word raw
使能CFM功能
PE2:
cfm enable
创建维护域MD,维护联盟MA并关联伪线
PE2:
cfm md md1
ma ma1
map mpls l2vc 1.1.1.135 13560 raw
为MA配置MEP
PE2:
cfm md md1
ma ma1
mep mep-id 2 interface Ethernet1/0/1.1 vlan 1 inward
mep ccm-send mep-id 2 enable
remote-mep mep-id 1
remote-mep ccm-receive mep-id 1 enable
test-id 1 mep 2
loss-measure single-ended receive test-id 1
- 配置验证
在PE1上查看CFM的远端MEP状态
[~PE1-md-md1-ma-ma1]dis cfm remote-mep
The total number of RMEPs is : 1
The status of RMEPs : 1 up, 0 down, 0 disable
--------------------------------------------------
MD Name : md1
Level : 0
MA Name : ma1
RMEP ID : 2
VLAN ID : --
VSI Name : --
L2VC Peer IP : 1.1.1.136
L2VC ID : 13560 raw
L2VPN Name : --
CE ID : --
CE Offset : --
L2TPV3 Tunnel Name : --
L2TPV3 Local Connection Name : --
CCC Name : --
EVPN-Instance Name : --
Bridge-domain ID : --
MAC : 707b-e8da-1656
CCM Receive : enabled
Trigger-If-Down : disabled
CFM Status : up
Alarm Status : none
Interface TLV : --
Port Status TLV : --
Chassis ID : --
Management Address : --
[~PE1-md-md1-ma-ma1]
在PE1上查看单端丢包检测结果
[~PE1-md-md1-ma-ma1]dis y1731 statistic-type single-loss test-id 1
Latest single-ended loss statistics of test-id 1:
--------------------------------------------------------------------------------
Index Local-loss Local-loss ratio Remote-loss Remote-loss ratio
--------------------------------------------------------------------------------
1 0 0.0000% 0 0.0000%
2 0 0.0000% 0 0.0000%
--------------------------------------------------------------------------------
Average Local-loss : 0 Average Local-loss Ratio : 0.0000%
Maximum Local-loss : 0 Maximum Local-loss Ratio : 0.0000%
Minimum Local-loss : 0 Minimum Local-loss Ratio : 0.0000%
Average Remote-loss : 0 Average Remote-loss Ratio : 0.0000%
Maximum Remote-loss : 0 Maximum Remote-loss Ratio : 0.0000%
Minimum Remote-loss : 0 Minimum Remote-loss Ratio : 0.0000%
[~PE1-md-md1-ma-ma1]