52-CFD典型配置举例
本章节下载: 52-CFD典型配置举例 (147.49 KB)
目 录
本章主要介绍了通过在网络中使用CFD功能,可以实现在二层网络中检测链路连通性,确认故障并确定故障发生的位置。
产品 |
软件版本 |
S5830V2&S5820V2系列以太网交换机 |
Release 2208P01,Release 2210 |
如图1所示,设备Device A、Device D、Device E由ISP 1管理,设备Device B、Device C由ISP 2管理。
现要求在该网络中配置CFD功能,实现检测链路连通性,确认故障并对故障进行定位。
图1 CFD组网示意图
· 为了较好的规划CFD功能所作用的区域,可以根据设备所属的ISP来划分MD,把同一ISP管理下的设备划分在同一MD中,并根据各MD的范围来确定MD的级别,确保低级别MD嵌套于高级别MD中。本案例将ISP 1划分为MD_A(level 5),将ISP 2划分为MD_B(level 3)。
· 为了较好的规划CFD功能所作用的区域,可以根据业务流量所属的VLAN来划分MA。
· 为了检测MD_A和MD_B中所有MA内的MEP之间的连通状态,需要开启CC功能。
· 在创建维护端点时,该维护端点ID必须已包含在对应服务实例的维护端点列表中,否则不能创建成功。
· 一个维护域内可以有多个维护集,但一个维护集只能与一个检测VLAN进行关联。
获取Device A~Device E的MAC地址,假定依次为0010-FC00-6511、0010-FC00-6512、0010-FC00-6513、0010-FC00-6514和0010-FC00-6515。
# 在Device A上开启CFD功能。
<DeviceA> system-view
[DeviceA] cfd enable
Device B~Device E的配置与Device A相同,配置过程略。
根据1.2.2 图1,在各设备上创建对应VLAN;配置各设备上相关端口的属性,并将其加入到对应的VLAN中。具体配置过程略。
根据组网图中每台设备上的端点所属的MD中的MA,共需要完成表2配置:
设备 |
MD |
MD级别 |
MA |
VLAN |
服务实例 |
Device A |
MD_A |
5 |
MA_A_1 |
20 |
1 |
MA_A_2 |
30 |
2 |
|||
Device B |
MD_B |
3 |
MA_B_1 |
20 |
3 |
Device C |
MD_B |
3 |
MA_B_1 |
20 |
3 |
Device D |
MD_A |
5 |
MA_A_1 |
20 |
1 |
MD_B |
3 |
MA_B_1 |
20 |
3 |
|
Device E |
MD_A |
5 |
MA_A_2 |
30 |
2 |
(1) Device A的配置
# 在Device A上创建级别为5的MD,MD名称为MD_A。
[DeviceA] cfd md MD_A level 5
# 创建服务实例1,该服务实例的MA名称为MA_A_1,且服务于VLAN 20。
[DeviceA] cfd service-instance 1 ma-id string MA_A_1 md MD_A vlan 20
# 创建服务实例2,该服务实例的MA名称为MA_A_2,且服务于VLAN 30。
[DeviceA] cfd service-instance 2 ma-id string MA_A_2 md MD_A vlan 30
Device B~Device E的配置与Device A相似。
(2) Device B的配置
[DeviceB] cfd md MD_B level 3
[DeviceB] cfd service-instance 3 ma-id string MA_B_1 md MD_B vlan 20
(3) Device C的配置
[DeviceC] cfd md MD_B level 3
[DeviceC] cfd service-instance 3 ma-id string MA_B_1 md MD_B vlan 20
(4) Device D的配置
[DeviceD] cfd md MD_A level 5
[DeviceD] cfd service-instance 1 ma-id string MA_A_1 md MD_A vlan 20
[DeviceD] cfd md MD_B level 3
[DeviceD] cfd service-instance 3 ma-id string MA_B_1 md MD_B vlan 20
(5) Device E的配置
[DeviceE] cfd md MD_A level 5
[DeviceE] cfd service-instance 2 ma-id string MA_A_2 md MD_A vlan 30
MEP ID分配如表3所示。
表3 MEP ID分配表
服务实例 |
设备 |
端口 |
MEP ID |
MEP 方向 |
1 |
DeviceA |
Ten-GigabitEthernet1/0/1 |
1001 |
内向MEP |
DeviceD |
Ten-GigabitEthernet1/0/2 |
1002 |
内向MEP |
|
2 |
DeviceA |
Ten-GigabitEthernet1/0/2 |
2001 |
内向MEP |
DeviceE |
Ten-GigabitEthernet1/0/1 |
2002 |
内向MEP |
|
3 |
DeviceB |
Ten-GigabitEthernet1/0/1 |
3001 |
内向MEP |
DeviceD |
Ten-GigabitEthernet1/0/1 |
3002 |
外向MEP |
基本配置过程如图2所示。
图2 MEP配置过程
(1) Device A的配置
# 在Device A的服务实例1和2内分别配置MEP列表。
[DeviceA] cfd meplist 1001 1002 service-instance 1
[DeviceA] cfd meplist 2001 2002 service-instance 2
# 在端口Ten-GigabitEthernet1/0/1上创建服务实例1内的内向MEP 1001。
[DeviceA] interface ten-gigabitethernet 1/0/1
[DeviceA-Ten-GigabitEthernet1/0/1] cfd mep 1001 service-instance 1 inbound
[DeviceA-Ten-GigabitEthernet1/0/1] quit
# 在端口Ten-GigabitEthernet1/0/2上创建服务实例2内的内向MEP 2001。
[DeviceA] interface ten-gigabitethernet 1/0/2
[DeviceA-Ten-GigabitEthernet1/0/2] cfd mep 2001 service-instance 2 inbound
[DeviceA-Ten-GigabitEthernet1/0/2] quit
Device B、Device D和Device E的配置与Device A相似。
(2) Device B的配置
[DeviceB] cfd meplist 3001 3002 service-instance 3
[DeviceB] interface ten-gigabitethernet 1/0/1
[DeviceB-Ten-GigabitEthernet1/0/1] cfd mep 3001 service-instance 3 inbound
[DeviceB-Ten-GigabitEthernet1/0/1] quit
(3) Device D的配置
[DeviceD] cfd meplist 1001 1002 service-instance 1
[DeviceD] cfd meplist 3001 3002 service-instance 3
[DeviceD] interface ten-gigabitethernet 1/0/2
[DeviceD-Ten-GigabitEthernet1/0/2] cfd mep 1002 service-instance 1 inbound
[DeviceD-Ten-GigabitEthernet1/0/2] quit
[DeviceD] interface ten-gigabitethernet 1/0/1
[DeviceD-Ten-GigabitEthernet1/0/1] cfd mep 3002 service-instance 3 outbound
[DeviceD-Ten-GigabitEthernet1/0/1] quit
(4) Device E的配置
[DeviceE] cfd meplist 2001 2002 service-instance 2
[DeviceE] interface ten-gigabitethernet 1/0/1
[DeviceE-Ten-GigabitEthernet1/0/1] cfd mep 2002 service-instance 2 inbound
[DeviceE-Ten-GigabitEthernet1/0/1] quit
MIP的配置是可选项,MIP可处理LTM及LBM报文,合理的配置MIP,将方便管理员对链路故障进行确认和定位。
# 在Device C的服务实例3内配置MIP的创建规则为Default规则。
[DeviceC] cfd mip-rule default service-instance 3
(1) Device A的配置
# 在端口Ten-GigabitEthernet1/0/1上开启服务实例1内MEP 1001的CCM报文发送功能。
[DeviceA] interface ten-gigabitethernet 1/0/1
[DeviceA-Ten-GigabitEthernet1/0/1] cfd cc service-instance 1 mep 1001 enable
[DeviceA-Ten-GigabitEthernet1/0/1] quit
# 在端口Ten-GigabitEthernet1/0/2上开启服务实例2内MEP 2001的CCM报文发送功能。
[DeviceA] interface ten-gigabitethernet 1/0/2
[DeviceA-Ten-GigabitEthernet1/0/2] cfd cc service-instance 2 mep 2001 enable
[DeviceA-Ten-GigabitEthernet1/0/2] quit
Device B、Device D和Device E的配置与Device A相似。
(2) Device B的配置
[DeviceB] interface ten-gigabitethernet 1/0/1
[DeviceB-Ten-GigabitEthernet1/0/1] cfd cc service-instance 3 mep 3001 enable
[DeviceB-Ten-GigabitEthernet1/0/1] quit
(3) Device D的配置
[DeviceD] interface ten-gigabitethernet 1/0/1
[DeviceD-Ten-GigabitEthernet1/0/1] cfd cc service-instance 3 mep 3002 enable
[DeviceD-Ten-GigabitEthernet1/0/1] interface ten-gigabitethernet 1/0/2
[DeviceD-Ten-GigabitEthernet1/0/2] cfd cc service-instance 1 mep 1002 enable
[DeviceD-Ten-GigabitEthernet1/0/2] quit
(4) Device E的配置
[DeviceE] interface ten-gigabitethernet 1/0/1
[DeviceE-Ten-GigabitEthernet1/0/1] cfd cc service-instance 2 mep 2002 enable
[DeviceE-Ten-GigabitEthernet1/0/1] quit
# 在Device A上察看服务实例1内MEP 1001的远端MEP的信息。
[DeviceA] display cfd remote-mep service-instance 1 mep 1001
MEP ID MAC address State Time MAC status
1002 0010-fc00-6514 OK 2013/02/01 12:54:52 UP
结果显示远端MEP运行状态正常。
# 在Device A上启用环回功能,检查服务实例1内MEP 1001到MEP 1002的链路状况。
[DeviceA] cfd loopback service-instance 1 mep 1001 target-mep 1002
Loopback to 0010-fc00-6514 with the sequence number start from 1001-43404:
Reply from 0010-fc00-6514: sequence number=1001-43404
Reply from 0010-fc00-6514: sequence number=1001-43405
Reply from 0010-fc00-6514: sequence number=1001-43406
Reply from 0010-fc00-6514: sequence number=1001-43407
Reply from 0010-fc00-6514: sequence number=1001-43408
Sent: 5 Received: 5 Lost: 0
结果显示服务实例1内的MEP 1001和MEP 1002间的链路无故障。
# 在Device B的服务实例3内查找MEP 3001到MEP 3002的路径。
[DeviceB] cfd linktrace service-instance 3 mep 3001 target-mep 3002
Linktrace to MEP 3002 with the sequence number 3001-43462:
MAC Address TTL Last Mac Relay Action
0010-fc00-6513 63 0010-fc00-6512 FDB
0010-fc00-6514 62 0010-fc00-6513 Hit
结果显示服务实例3内的MEP 3001找到了远端MEP 3002,且当MIP及远端MEP收到源MEP发送的LTM报文后,都向源MEP反馈LTR报文。源MEP从而获悉MEP 3001到MEP 3002链路的路径。
· Device A
#
cfd enable
cfd md MD_A index 1 level 5
cfd service-instance 1 ma-id string MA_A_1 ma-index 1 md MD_A vlan 20
cfd meplist 1001 to 1002 service-instance 1
cfd service-instance 2 ma-id string MA_A_2 ma-index 1 md MD_A vlan 30
cfd meplist 2001 to 2002 service-instance 2
#
vlan 20
#
vlan 30
#
interface Ten-GigabitEthernet1/0/1
port access vlan 20
cfd mep 1001 service-instance 1 inbound
cfd cc service-instance 1 mep 1001 enable
#
interface Ten-GigabitEthernet1/0/2
port access vlan 30
cfd mep 2001 service-instance 2 inbound
cfd cc service-instance 2 mep 2001 enable
#
interface Ten-GigabitEthernet1/0/3
port link-type trunk
port trunk permit vlan 20 30
· Device B
#
cfd enable
cfd md MD_B index 1 level 3
cfd service-instance 3 ma-id string MA_B_1 ma-index 1 md MD_B vlan 20
cfd meplist 3001 to 3002 service-instance 3
#
vlan 20
#
vlan 30
#
interface Ten-GigabitEthernet1/0/1
port link-type trunk
port trunk permit vlan 20 30
cfd mep 3001 service-instance 3 inbound
cfd cc service-instance 3 mep 3001 enable
#
interface Ten-GigabitEthernet1/0/2
port link-type trunk
port trunk permit vlan 20 30
#
interface Ten-GigabitEthernet1/0/3
port link-type trunk
port trunk permit vlan 20
#
interface Ten-GigabitEthernet1/0/4
port link-type trunk
port trunk permit vlan 30
· Device C
#
cfd enable
cfd md MD_B index 1 level 3
cfd service-instance 3 ma-id string MA_B_1 ma-index 1 md MD_B vlan 20
cfd mip-rule default service-instance 3
#
vlan 20
#
interface Ten-GigabitEthernet1/0/1
port link-type trunk
port trunk permit vlan 20
#
interface Ten-GigabitEthernet1/0/2
port link-type trunk
port trunk permit vlan 20
#
interface Ten-GigabitEthernet1/0/3
port link-type trunk
port trunk permit vlan 20
#
interface Ten-GigabitEthernet1/0/4
port link-type trunk
port trunk permit vlan 20
· Device D
#
cfd enable
cfd md MD_A index 1 level 5
cfd md MD_B index 2 level 3
cfd service-instance 1 ma-id string MA_A_1 ma-index 1 md MD_A vlan 20
cfd meplist 1001 to 1002 service-instance 1
cfd service-instance 3 ma-id string MA_B_1 ma-index 1 md MD_B vlan 20
cfd meplist 3001 to 3002 service-instance 3
#
vlan 20
#
interface Ten-GigabitEthernet1/0/1
port link-type trunk
port trunk permit vlan 20
cfd mep 3002 service-instance 3 outbound
cfd cc service-instance 3 mep 3002 enable
#
interface Ten-GigabitEthernet1/0/2
port access vlan 20
cfd mep 1002 service-instance 1 inbound
cfd cc service-instance 1 mep 1002 enable
· Device E
#
cfd enable
cfd md MD_A index 1 level 5
cfd service-instance 2 ma-id string MA_A_2 ma-index 1 md MD_A vlan 30
cfd meplist 2001 to 2002 service-instance 2
#
vlan 30
#
interface Ten-GigabitEthernet1/0/1
port access vlan 30
cfd mep 2002 service-instance 2 inbound
cfd cc service-instance 2 mep 2002 enable
#
interface Ten-GigabitEthernet1/0/2
port link-type trunk
port trunk permit vlan 30
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!