海康威视违停球机掉头取证功能配置

首先,登录球机web端,依次进入
应用仓库->智能交通->常用配置->球机规则配置界面启用检测场景1,并按照实际填写场景名称和方向。如需多个检测场景则参考场景1后依次启用场景2、3、4并配置。

启用检测场景

2、 控制球机云台转动及倍率调整到合适角度,使画面下边缘覆盖2~3车道宽度(最多不超过4车道,确保车辆在画面下边缘1/4处车牌横向不小于80像素)。且检测场景中包含掉头前后的行驶车道。此时球机倍率约4倍,垂直方向T值5~10范围,画面远处露出地平线即可。

控制球机云台转动及倍率调整到合适角度

3、选择车道区域检测并添加车道,在左测画面中调整车道线和实际车道线贴合,车道线上下延长覆盖需检测区域,注意车道规则要求包含掉头前后两个方向的车道。触发线是抓拍识别车牌位置,通常放在画面下1/4处,需保证触发线位置车牌横向80~100像素满足牌识要求。

4、 按照车道情况设置【方向】和【车道线属性】,注意相邻车道属性必须一致(如车道1右车道线/车道2左车道线,车道2右车道线/车道3左车道线),且掉头禁跨线必须设置为实线或者黄线;方向设置为车辆正常行驶的方向(车辆自上而下行驶称为下行);否则规则无法触发。

按照车道情况设置【方向】和【车道线属性】

5、选择掉头检测功能并启用,勾选布防车道,灵敏度参数保持默认即可。选择掉头检测功能并启用

方向设置为车辆正常行驶的方向

6、进入球机场景布防界面,启用巡航计划并将检测场景添加到布防时间中。启用巡航计划7、进入配置->图像->显示设置中,场景选择【道路】,默认抓拍快门上限为1/150适用于城市道路,拖车速较快或者高速公路,快门速度提升至1/250~1/350。选择掉头检测功能并启用

8、配置完成后测试验证是否有抓拍数据上传。

海康威视违停球机压线/变道/逆行/机占非等取证功能配置

首先,登录球机web端,依次进入
应用仓库->智能交通->常用配置->球机规则配置界面启用检测场景1,填写场景名称和方向。如需多个检测场景则参考场景1后依次启用场景2、3、4并配置。

启用检测场景

 

2、 控制球机云台上下左右转动和倍率到合适角度:参考依据是画面下边缘覆盖2~3车道(400W分辨率覆盖3车道,200W覆盖2车道),此时球机倍率约2~3倍,垂直方向T值5~10范围,画面远处露出地平线即可。如图所示:

控制球机云台上下左右转动和倍率到合适角度

3、按照检测功能选择多边形区域或车道区域检测(推荐优先选车道区域)。按照道实际车道数添加车道,并在左右画面中调整车道线和实际车道线贴合,车道线上下延长覆盖检测区域。车道最低不少于2个,单个车道无法触发。

触发线是抓拍识别车牌位置,通常放在画面下1/4处,需保证触发线位置车牌横向80~100像素满足牌识要求

4、按照车道情况设置【方向】和【车道线属性】,注意相邻车道属性必须一致(如车道1右车道线/车道2左车道线,车道2右车道线/车道3左车道线),方向设置为车辆正常行驶的方向(车辆自上而下行驶称为下行)。否则规则无法正常触发。

 

5、选择需要使用的违章检测功能并启用,布防车道与布防多边形二选一(与绘制的规则对应),并勾选对应的车道或区域,否则检测功能不生效。灵敏度参数保持默认即可。各功能差异如下

压线:取证图抓拍张数可设置为3或4张,只支持车道区域检测。

变道:取证图只能设置为4张,需要包含变道前、中、后的状态以及车牌特写图。支持车道区域和多边形区域检测,推荐优先使用车道检测。

逆行:取证图抓拍张数可设置为3或4张,只支持车道区域检测。

机占非:取证图抓拍张数可设置为2~4张,可设置机占非的持续时间。同时支持根据车牌颜色过滤抓拍数据。只支持车道区域检测。

选择需要使用的违章检测功能并启用

 

6、进入球机场景布防界面,启用巡航计划并将检测场景添加到布防时间中。

进入球机场景布防界面

7、进入配置->图像->显示设置中,场景选择【道路】,默认抓拍快门上限为1/150适用于城市道路,拖车速较快或者高速公路,快门速度提升至1/250~1/350。

默认抓拍快门上限为1/150适用于城市道路

若违章不容易触发可修改配置模拟,如逆行检测修改车道方向与实际相反、变道检测修改车道线属性为实线来模拟触发。

 

海康威视违停球机违停检测抓拍配置指导

首先,登录球机web端
登录球机

1、进入智能交通->球机规则配置界面,启用当前检测场景,控制云台转到到需要检测的区域。

2、单击右侧【绘制区域】在当前场景中绘制违停检测多边形区域,规则框通常画在路侧与路面保持平行,避免全屏绘制规则框。一个场景中支持绘制多个检测区域,单场景大检测距离100米,超过100米的路段需设置两个或多个场景轮训检测。区域框属性保持默认即可。

3、启用违停功能并设置【触发时间】参数。触发时间是指车辆停稳后时间达到设置值即开始抓拍事件报警图(也称为短信预警图),时间越长车辆越难触发,通常保持默认10s即可。在公交车容易停留的路段可适当延长时间避免频繁触发抓拍。

【违停事件牌识】来用设置违停事件报警图(也称为短信预警图)是否识别车牌。若不勾选,违停事件报警图在检测场景抓拍一张图上传,不识别车牌;若勾选则违停事件报警图将变倍拉近抓一张图上传,并识别车牌。保持默认勾选即可。

4、 在【违停抓拍图片配置】中设置违停取证图的类型和违停时长。违停取证图默认为四合一形式上传,每一张图类型和抓图时间点根据业务需求设置。违停总时长=多张取证图间隔总和,如下图配置间隔为是60 60 60,则违停时间是180s。即车辆停留超过180s被判定为违停,取证图抓拍完并上传。
违停抓拍图片配置

image.png

5、根据需求选择布防的违停车辆类型和车牌颜色,默认全部勾选。最后需要勾选布防的多边形区域,保存配置参数。

6、设置完检测规则后切换到场景布防界面,单击蓝色布防时间条,选择设置,将需要检测的场景添加进布防时间内并设置停留时间,建议每个【场景停留时间】不小于取证时长,否则多场景交叉取证时,容易造成取证录像混乱。

切换到场景布防界面

7、勾选【启用巡航计划】并保存。巡航计划是布防的使能开关,即使只有一个检测场景也需要添加到布防时间段并启用巡航计划,否则检测功能不生效。配置完成后可用SDKdemo布防测试是否有违停抓拍数据上传。

 

H3C网管交换机 PVST生成树典型配置举例

一、组网需求
• Device A 和 Device B 为汇聚层设备,Device C 和 Device D 为接入层设备。
• 通过配置 PVST,使 VLAN 10、20、30 和 40 中的报文分别按照其各自 VLAN 所对应的生成树转发。
• 由于 VLAN 10、20 和 30 在汇聚层设备终结、VLAN 40 在接入层设备终结,因此配置 VLAN10 和 20 的根桥为 Device A,VLAN 30 的根桥为 Device B,VLAN 40 的根桥为 Device C。

二、 组网图
PVST 典型配置组网图

三、配置步骤
(1) 配置 VLAN 和端口
请按照上图 在 Device A 和 Device B 上分别创建 VLAN 10、20 和 30,在 Device C 上创建 VLAN10、20 和 40,在 Device D 上创建 VLAN 20、30 和 40;将各设备的各端口配置为 Trunk 端口并允许相应的 VLAN 通过,具体配置过程略。

(2) 配置 Device A
# 配置生成树的工作模式为 PVST 模式。
<DeviceA> system-view
[DeviceA] stp mode pvst

# 配置本设备为 VLAN 10 和 VLAN 20 的根桥。
[DeviceA] stp vlan 10 20 root primary

# 全局开启生成树协议,并开启 VLAN 10、20 和 30 中的生成树协议。
[DeviceA] stp global enable
[DeviceA] stp vlan 10 20 30 enable

(3) 配置 Device B
# 配置生成树的工作模式为 PVST 模式。
<DeviceB> system-view
[DeviceB] stp mode pvst

# 配置本设备为 VLAN 30 的根桥。
[DeviceB] stp vlan 30 root primary

# 全局开启生成树协议,并开启 VLAN 10、20 和 30 中的生成树协议。
[DeviceB] stp global enable
[DeviceB] stp vlan 10 20 30 enable

(4) 配置 Device C
# 配置生成树的工作模式为 PVST 模式。
<DeviceC> system-view
[DeviceC] stp mode pvst

# 配置本设备为生成树 VLAN 40 的根桥。
[DeviceC] stp vlan 40 root primary

# 全局开启生成树协议,并开启 VLAN 10、20 和 40 中的生成树协议。
[DeviceC] stp global enable
[DeviceC] stp vlan 10 20 40 enable

(5) 配置 Device D
# 配置生成树的工作模式为 PVST 模式。
<DeviceD> system-view
[DeviceD] stp mode pvst

# 全局开启生成树协议,并开启 VLAN 20、30 和 40 中的生成树协议。
[DeviceD] stp global enable
[DeviceD] stp vlan 20 30 40 enable

四、 验证配置
当网络拓扑稳定后,通过使用 display stp brief 命令可以查看各设备上生成树的简要信息。例如:
# 查看 Device A 上生成树的简要信息。
[DeviceA] display stp brief
查看 Device A 上生成树的简要信息

# 查看 Device B 上生成树的简要信息。
[DeviceB] display stp brief
查看 Device B 上生成树的简要信息

# 查看 Device C 上生成树的简要信息。
[DeviceC] display stp brief
查看 Device C 上生成树的简要信息

# 查看 Device D 上生成树的简要信息。
[DeviceD] display stp brief
查看 Device D 上生成树的简要信息

根据上述显示信息,可以绘出各 VLAN 所对应 MSTI 的拓扑,如下图所示。
各 VLAN 所对应生成树的拓扑图

H3C网管交换机 MSTP 生成树典型配置举例

一、组网需求
• 网络中所有设备都属于同一个 MST 域。Device A 和 Device B 为汇聚层设备,Device C 和Device D 为接入层设备。
• 通过配置 MSTP,使不同 VLAN 的报文按照不同的 MSTI 转发:VLAN 10 的报文沿 MSTI 1转发,VLAN 30 沿 MSTI 3 转发,VLAN 40 沿 MSTI 4 转发,VLAN 20 沿 MSTI 0 转发。
• 由于 VLAN 10 和 VLAN 30 在汇聚层设备终结、VLAN 40 在接入层设备终结,因此配置 MSTI 1 和 MSTI 3 的根桥分别为 Device A 和 Device B,MSTI 4 的根桥为 Device C。

二、 组网图
MSTP 典型配置组网图

三、 配置准备
请在 VXLAN 网络内配置路由协议,确保 VTEP 之间路由可达。

四、配置步骤
(1) 配置 VLAN 和端口
请按照上图 在 Device A 和 Device B 上分别创建 VLAN 10、20 和 30,在 Device C 上创建 VLAN10、20 和 40,在 Device D 上创建 VLAN 20、30 和 40;将各设备的各端口配置为 Trunk 端口并允许相应的 VLAN 通过,具体配置过程略。

(2) 配置 Device A
# 配置 MST 域的域名为 example,将 VLAN 10、30、40 分别映射到 MSTI 1、3、4 上,并配置MSTP 的修订级别为 0。
<DeviceA> system-view
[DeviceA] stp region-configuration
[DeviceA-mst-region] region-name example
[DeviceA-mst-region] instance 1 vlan 10
[DeviceA-mst-region] instance 3 vlan 30
[DeviceA-mst-region] instance 4 vlan 40
[DeviceA-mst-region] revision-level 0

# 激活 MST 域的配置。
[DeviceA-mst-region] active region-configuration
[DeviceA-mst-region] quit

# 配置本设备为 MSTI 1 的根桥。
[DeviceA] stp instance 1 root primary

# 全局开启生成树协议。
[DeviceA] stp global enable

(3) 配置 Device B
# 配置 MST 域的域名为 example,将 VLAN 10、30、40 分别映射到 MSTI 1、3、4 上,并配置MSTP 的修订级别为 0。
<DeviceB> system-view
[DeviceB] stp region-configuration
[DeviceB-mst-region] region-name example
[DeviceB-mst-region] instance 1 vlan 10
[DeviceB-mst-region] instance 3 vlan 30
[DeviceB-mst-region] instance 4 vlan 40
[DeviceB-mst-region] revision-level 0

# 激活 MST 域的配置。
[DeviceB-mst-region] active region-configuration
[DeviceB-mst-region] quit

# 配置本设备为 MSTI 3 的根桥。
[DeviceB] stp instance 3 root primary

# 全局开启生成树协议。
[DeviceB] stp global enable

(4) 配置 Device C
# 配置 MST 域的域名为 example,将 VLAN 10、30、40 分别映射到 MSTI 1、3、4 上,并配置MSTP 的修订级别为 0。
<DeviceC> system-view
[DeviceC] stp region-configuration
[DeviceC-mst-region] region-name example
[DeviceC-mst-region] instance 1 vlan 10
[DeviceC-mst-region] instance 3 vlan 30
[DeviceC-mst-region] instance 4 vlan 40
[DeviceC-mst-region] revision-level 0

# 激活 MST 域的配置。
[DeviceC-mst-region] active region-configuration
[DeviceC-mst-region] quit

# 配置本设备为 MSTI 4 的根桥。
[DeviceC] stp instance 4 root primary

# 全局开启生成树协议。
[DeviceC] stp global enable

(5) 配置 Device D
# 配置 MST 域的域名为 example,将 VLAN 10、30、40 分别映射到 MSTI 1、3、4 上,并配置MSTP 的修订级别为 0。
<DeviceD> system-view
[DeviceD] stp region-configuration
[DeviceD-mst-region] region-name example
[DeviceD-mst-region] instance 1 vlan 10
[DeviceD-mst-region] instance 3 vlan 30
[DeviceD-mst-region] instance 4 vlan 40
[DeviceD-mst-region] revision-level 0

# 激活 MST 域的配置。
[DeviceD-mst-region] active region-configuration
[DeviceD-mst-region] quit

# 全局开启生成树协议。
[DeviceD] stp global enable

四、 验证配置
注:在本例中,假定 Device B 的根桥 ID 最小,因此该设备将在 MSTI 0 中被选举为根桥。当网络拓扑稳定后,通过使用 display stp brief 命令可以查看各设备上生成树的简要信息。例如:
# 查看 Device A 上生成树的简要信息。
[DeviceA] display stp brief
查看 Device A 上生成树的简要信息

# 查看 Device B 上生成树的简要信息。
[DeviceB] display stp brief
查看 Device B 上生成树的简要信息

# 查看 Device C 上生成树的简要信息。
[DeviceC] display stp brief
查看 Device C 上生成树的简要信息

# 查看 Device D 上生成树的简要信息。
[DeviceD] display stp brief
查看 Device D 上生成树的简要信息

根据上述显示信息,可以绘出各 VLAN 所对应 MSTI 的拓扑,如下图所示。
各 VLAN 所对应 MSTI 的拓扑图

H3C网管交换机VXLAN网络下的环路检测典型配置举例

一、组网需求
Device A、Device B 作为 VXLAN 网络的 VTEP,在其上配置环路检测功能,使系统能够自动禁止出现环路的 AC 进行 MAC 地址学习同时将其阻塞,并通过打印日志信息来通知用户检查网络。

二、 组网图
VXLAN 网络下的环路检测基本功能配置组网图

三、 配置准备
请在 VXLAN 网络内配置路由协议,确保 VTEP 之间路由可达。

四、配置步骤
配置 Device A
# 配置 VSI,VXLAN ID 和 Tunnel。
<DeviceA> system-view
[DeviceA] l2vpn enable
[DeviceA] interface tunnel 0 mode vxlan
[DeviceA-Tunnel0] source 1.1.1.1
[DeviceA-Tunnel0] destination 2.2.2.2
[DeviceA-Tunnel0] quit
[DeviceA] vsi 1
[DeviceA-vsi-1] vxlan 1
[DeviceA-vsi-1-vxlan-1] tunnel 0
[DeviceA-vsi-1-vxlan-1] quit
# 关闭 STP 功能。
[DeviceA] undo stp global enable
# 配置 AC。
[DeviceA] interface ten-gigabitethernet 1/0/1
[DeviceA-Ten-GigabitEthernet1/0/1] service-instance 1
[DeviceA-Ten-GigabitEthernet1/0/1-srv1] encapsulation s-vid 10
[DeviceA-Ten-GigabitEthernet1/0/1-srv1] xconnect vsi 1
[DeviceA-Ten-GigabitEthernet1/0/1-srv1] quit
# 开启环路检测功能。
[DeviceA] vsi 1
[DeviceA-vsi-1] loopback-detection enable
# 配置环路检测的处理模式为 Block 模式。
[DeviceA-vsi-1] loopback-detection action block
# 配置环路检测的时间间隔为 35 秒。
[DeviceA-vsi-1] loopback-detection interval-time 35
# 配置环路检测的优先级为 1。
[DeviceA-vsi-1] loopback-detection priority 1
(2) 配置 Device B
# 配置 VSI,VXLAN ID 和 Tunnel。
<DeviceB> system-view
[DeviceB] l2vpn enable
[DeviceB] interface Tunnel 0 mode vxlan
[DeviceB-Tunnel0] source 2.2.2.2
[DeviceB-Tunnel0] destination 1.1.1.1
[DeviceB-Tunnel0] quit
[DeviceB] vsi 1
[DeviceB-vsi-1] vxlan 1
[DeviceB-vsi-1-vxlan-1] tunnel 0
[DeviceB-vsi-1-vxlan-1] quit
# 关闭 STP 功能。
[DeviceB] undo stp global enable
# 配置 AC。
[DeviceB] interface ten-gigabitethernet 1/0/1
[DeviceB-Ten-GigabitEthernet1/0/1] service-instance 1
[DeviceB-Ten-GigabitEthernet1/0/1-srv1] encapsulation s-vid 10
[DeviceB-Ten-GigabitEthernet1/0/1-srv1] xconnect vsi 1
[DeviceB-Ten-GigabitEthernet1/0/1-srv1] quit
# 开启环路检测功能。
[DeviceB] vsi 1
[DeviceB-vsi-1] loopback-detection enable
# 配置环路检测的处理模式为 Block 模式。
[DeviceB-vsi-1] loopback-detection action block
# 配置环路检测的时间间隔为 35 秒。
[DeviceB-vsi-1] loopback-detection interval-time 35
# 配置 VSI 的环路检测优先级值为 6。
[DeviceB-vsi-1] loopback-detection priority 6

四、 验证配置
配置完成后,Device A 的 AC(Ten-GigabitEthernet1/0/1 接口上的以太网服务实例 1)在一个环路
检测时间间隔内检测到了环路,打印了如下日志信息:
打印了如下日志信息
# 显示 Device A 上环路检测的配置和运行情况
[DeviceA] display loopback-detection
显示 Device A 上环路检测的配置和运行情况

# 显示 Device B 上环路检测的配置和运行情况。
[DeviceB] display loopback-detection
显示 Device B 上环路检测的配置和运行情况

由此可见,Device A 和 Device B 都在各自的 AC(Ten-GigabitEthernet1/0/1 接口上的以太网服务实例 1)上检测到了环路,并且 Device B 阻塞存在环路的 AC。这是由于 Device A 的优先级较高,所以仅显示环路信息,未触发环路保护动作(环路检测处理模式字段的显示有特殊标识“*”)。

H3C网管交换机 M-LAG 应用环路检测配置举例

一、组网需求
在 M-LAG 组网环境中部署环路检测,以便在网络中存在环路时设备可以自动关闭设备上出现环路的端口,并及时通知用户检查网络环境。如下图 所示,Device A 和 Device B 组成 M-LAG 系统,同时部署环路检测。Device C、M-LAG 系统、Device D 和 Device E 组成一个物理上的环路。

二、 组网图
DRNI 应用环路检测配置组网图

三、配置步骤
(1) 配置 Device A# 创建 VLAN 100。
<DeviceA> system-view
[DeviceA] vlan 100
[DeviceA-vlan100] quit

# 配置 M-LAG 系统配置。
[DeviceA] m-lag system-mac 1-1-1
[DeviceA] m-lag system-number 1
[DeviceA] m-lag system-priority 123

# 配置 Keepalive 报文的目的 IP 地址和源 IP 地址。
[DeviceA] m-lag keepalive ip destination 1.1.1.1 source 1.1.1.2

# 配置端口 Ten-GigabitEthernet1/0/6 工作在三层模式,并配置 IP 地址为 Keepalive 报文的源 IP 地址。
[DeviceA] interface ten-gigabitethernet 1/0/6
[DeviceA-Ten-GigabitEthernet1/0/6] port link-mode route
[DeviceA-Ten-GigabitEthernet1/0/6] ip address 1.1.1.2 24
[DeviceA-Ten-GigabitEthernet1/0/6] quit

# 配置 Keepalive 链路接口为 M-LAG 保留接口。
[DeviceA] m-lag mad exclude interface ten-gigabitethernet 1/0/6

# 创建动态二层聚合接口 3,并配置该接口为 peer-link 口。
[DeviceA] interface bridge-aggregation 3
[DeviceA-Bridge-Aggregation3] link-aggregation mode dynamic
[DeviceA-Bridge-Aggregation3] port m-lag peer-link 1
[DeviceA-Bridge-Aggregation3] quit

# 将端口 Ten-GigabitEthernet1/0/5 加入到聚合组 3 中。
[DeviceA] interface ten-gigabitethernet 1/0/5
[DeviceA-Ten-GigabitEthernet1/0/5] port link-aggregation group 3
[DeviceA-Ten-GigabitEthernet1/0/5] quit

# 配置二层聚合接口 3 为 Trunk 端口,并允许 VLAN 100 的报文通过。
[DeviceA] interface bridge-aggregation 3
[DeviceA-Bridge-Aggregation3] port link-type trunk
[DeviceA-Bridge-Aggregation3] port trunk permit vlan 100
[DeviceA-Bridge-Aggregation3] quit

# 创建动态二层聚合接口 4,并配置该接口为 M-LAG 接口 4。
[DeviceA] interface bridge-aggregation 4
[DeviceA-Bridge-Aggregation4] link-aggregation mode dynamic
[DeviceA-Bridge-Aggregation4] port m-lag group 4
[DeviceA-Bridge-Aggregation4] quit

# 分别将端口 Ten-GigabitEthernet1/0/1 和 Ten-GigabitEthernet1/0/2 加入到聚合组 4 中。
[DeviceA] interface ten-gigabitethernet 1/0/1
[DeviceA-Ten-GigabitEthernet1/0/1] port link-aggregation group 4
[DeviceA-Ten-GigabitEthernet1/0/1] quit
[DeviceA] interface ten-gigabitethernet 1/0/2
[DeviceA-Ten-GigabitEthernet1/0/2] port link-aggregation group 4
[DeviceA-Ten-GigabitEthernet1/0/2] quit

# 配置二层聚合接口 4 为 Trunk 端口,并允许 VLAN 100 的报文通过。
[DeviceA] interface bridge-aggregation 4
[DeviceA-Bridge-Aggregation4] port link-type trunk
[DeviceA-Bridge-Aggregation4] port trunk permit vlan 100
[DeviceA-Bridge-Aggregation4] quit

# 创建动态二层聚合接口 5,并配置该接口为 M-LAG 接口 5。
[DeviceA] interface bridge-aggregation 5
[DeviceA-Bridge-Aggregation5] link-aggregation mode dynamic
[DeviceA-Bridge-Aggregation5] port m-lag group 5
[DeviceA-Bridge-Aggregation5] quit

# 分别将端口 Ten-GigabitEthernet1/0/3 和 Ten-GigabitEthernet1/0/4 加入到聚合组 5 中。
[DeviceA] interface ten-gigabitethernet 1/0/3
[DeviceA-Ten-GigabitEthernet1/0/3] port link-aggregation group 5
[DeviceA-Ten-GigabitEthernet1/0/3] quit
[DeviceA] interface ten-gigabitethernet 1/0/4
[DeviceA-Ten-GigabitEthernet1/0/4] port link-aggregation group 5
[DeviceA-Ten-GigabitEthernet1/0/4] quit

# 配置二层聚合接口 5 为 Trunk 端口,并允许 VLAN 100 的报文通过。
[DeviceA] interface bridge-aggregation 5
[DeviceA-Bridge-Aggregation5] port link-type trunk
[DeviceA-Bridge-Aggregation5] port trunk permit vlan 100
[DeviceA-Bridge-Aggregation5] quit

# 关闭 STP 功能。
[DeviceA] undo stp global enable

# 全局开启 VLAN 100 内的环路检测功能,配置环路检测处理模式为 shutdown,环路检测的时间间隔为 35 秒。
[DeviceA] loopback-detection global enable vlan 100
[DeviceA] loopback-detection global action shutdown
[DeviceA] loopback-detection interval-time 35

(2) 配置 Device B
配置Device B的M-LAG系统编号为2,Keepalive报文的目的IP地址为1.1.1.2,源IP地址为1.1.1.1。其他配置与 Device A 类似,不再赘述。

(3) 配置 Device C
# 关闭 STP 功能。
<DeviceC> system-view
[DeviceC] undo stp global enable

# 创建 VLAN 100。
[DeviceC] vlan 100
[DeviceC-vlan100] quit

# 创建二层聚合接口 4,并配置该接口为动态聚合模式。
[DeviceC] interface bridge-aggregation 4
[DeviceC-Bridge-Aggregation4] link-aggregation mode dynamic
[DeviceC-Bridge-Aggregation4] quit

# 分别将端口 Ten-GigabitEthernet1/0/1~Ten-GigabitEthernet1/0/4 加入到聚合组 4 中。
[DeviceC] interface range ten-gigabitethernet 1/0/1 to ten-gigabitethernet 1/0/4
[DeviceC-if-range] port link-aggregation group 4
[DeviceC-if-range] quit

# 配置二层聚合接口 4 为 Trunk 端口,并允许 VLAN 100 的报文通过。
[DeviceC] interface bridge-aggregation 4
[DeviceC-Bridge-Aggregation4] port link-type trunk
[DeviceC-Bridge-Aggregation4] port trunk permit vlan 100
[DeviceC-Bridge-Aggregation4] quit

# 配置端口 Ten-GigabitEthernet1/0/5 为 Trunk 端口,并允许 VLAN 100 的报文通过。
[DeviceC] interface ten-gigabitethernet 1/0/5
[DeviceC-Ten-GigabitEthernet1/0/5] port link-type trunk
[DeviceC-Ten-GigabitEthernet1/0/5] port trunk permit vlan 100
[DeviceC-Ten-GigabitEthernet1/0/5] quit

(4) 配置 Device D
# 关闭 STP 功能。
<DeviceD> system-view
[DeviceD] undo stp global enable

# 创建 VLAN 100。
[DeviceD] vlan 100
[DeviceD-vlan100] quit

# 创建二层聚合接口 5,并配置该接口为动态聚合模式。
[DeviceD] interface bridge-aggregation 5
[DeviceD-Bridge-Aggregation5] link-aggregation mode dynamic
[DeviceD-Bridge-Aggregation5] quit

# 分别将端口 Ten-GigabitEthernet1/0/1~Ten-GigabitEthernet1/0/4 加入到聚合组 5 中。
[DeviceD] interface range ten-gigabitethernet 1/0/1 to ten-gigabitethernet 1/0/4
[DeviceD-if-range] port link-aggregation group 5
[DeviceD-if-range] quit

# 配置二层聚合接口 5 为 Trunk 端口,并允许 VLAN 100 的报文通过。
[DeviceD] interface bridge-aggregation 5
[DeviceD-Bridge-Aggregation5] port link-type trunk
[DeviceD-Bridge-Aggregation5] port trunk permit vlan 100
[DeviceD-Bridge-Aggregation5] quit

# 配置端口 Ten-GigabitEthernet1/0/5 为 Trunk 端口,并允许 VLAN 100 的报文通过。
[DeviceD] interface ten-gigabitethernet 1/0/5
[DeviceD-Ten-GigabitEthernet1/0/5] port link-type trunk
[DeviceD-Ten-GigabitEthernet1/0/5] port trunk permit vlan 100
[DeviceD-Ten-GigabitEthernet1/0/5] quit

(5) 配置 Device E
# 关闭 STP 功能。
<DeviceE> system-view
[DeviceE] undo stp global enable

# 创建 VLAN 100。
[DeviceE] vlan 100
[DeviceE-vlan100] quit

# 配置端口 Ten-GigabitEthernet1/0/1 和 Ten-GigabitEthernet1/0/2 为 Trunk 端口,并允许 VLAN 100的报文通过。
[DeviceE] interface ten-gigabitethernet 1/0/1
[DeviceE-Ten-GigabitEthernet1/0/1] port link-type trunk
[DeviceE-Ten-GigabitEthernet1/0/1] port trunk permit vlan 100
[DeviceE-Ten-GigabitEthernet1/0/1] quit
[DeviceE] interface ten-gigabitethernet 1/0/2
[DeviceE-Ten-GigabitEthernet1/0/2] port link-type trunk
[DeviceE-Ten-GigabitEthernet1/0/2] port trunk permit vlan 100
[DeviceE-Ten-GigabitEthernet1/0/2] quit

四、 验证配置
当配置完成后,系统在一个环路检测时间间隔内在 Device A 的 M-LAG 接口 4 和 M-LAG 接口 5 上都检测到了环路,于是将这两个 M-LAG 接口自动关闭,并打印了如下日志信息:
验证配置
使用 display loopback-detection 命令可以查看 Device A 上环路检测的配置和运行情况:

# 查看 Device A 上环路检测的配置和运行情况。
查看 Device A 上环路检测的配置和运行情况
由此可见,Device A 上显示在聚合组 4 和聚合组 5 上检测到环路,由于环路检测功能运行在Shutdown 模式下,聚合组 4 和聚合组 5 上出现环路后均已被自动关闭,因此设备打印的日志信息显示这两个聚合组上的环路已消除。此时,使用 display interface 命令分别查看 Device A 上聚合组 4 和聚合组 5 的状态信息:

# 显示 Device A 上聚合组 4 的状态信息。显示 Device A 上聚合组 4 的状态信息

# 显示 Device A 上聚合组 5 的状态信息
显示 Device A 上聚合组 5 的状态信息
由此可见,聚合组 4 和聚合组 5 均已被环路检测模块自动关闭。
Device B 上的现象和 Device A 上一致。

H3C网管交换机环路检测 VLAN-block 处理模式配置举例

一、组网需求
• 三台设备 Device A、Device B 和 Device C 组成一个物理上的环形网络。
• 通过在 Device A 上开启环路检测功能,并采用 VLAN-block 模式,使系统能够自动阻塞 Device  A 上出现环路的 VLAN,并通过打印日志信息来通知用户检查网络。

二、 组网图
环路检测 VLAN-block 处理模式配置组网图

三、配置步骤
(1) 配置 Device A
# 创建 VLAN 100,指定 VLAN 100 为保护 VLAN,并全局开启该 VLAN 内的环路检测功能。
<DeviceA> system-view
[DeviceA] vlan 100
[DeviceA–vlan100] quit
[DeviceA] loopback-detection protected-vlan 100
[DeviceA] loopback-detection global enable vlan 100

# 配置端口 Ten-GigabitEthernet1/0/1 和 Ten-GigabitEthernet1/0/2 为 Trunk 类型,并允许VLAN 100 通过。
[DeviceA] interface ten-gigabitethernet 1/0/1
[DeviceA-Ten-GigabitEthernet1/0/1] port link-type trunk
[DeviceA-Ten-GigabitEthernet1/0/1] port trunk permit vlan 100
[DeviceA-Ten-GigabitEthernet1/0/1] quit
[DeviceA] interface ten-gigabitethernet 1/0/2
[DeviceA-Ten-GigabitEthernet1/0/2] port link-type trunk
[DeviceA-Ten-GigabitEthernet1/0/2] port trunk permit vlan 100
[DeviceA-Ten-GigabitEthernet1/0/2] quit

# 配置端口 Ten-GigabitEthernet1/0/1 和 Ten-GigabitEthernet1/0/2 的环路检测处理模式为VLAN-block 模式。
[DeviceA] interface ten-gigabitethernet 1/0/1
[DeviceA-Ten-GigabitEthernet1/0/1] undo stp enable
[DeviceA-Ten-GigabitEthernet1/0/1] loopback-detection action vlan-block
[DeviceA-Ten-GigabitEthernet1/0/1] quit
[DeviceA] interface ten-gigabitethernet 1/0/2
[DeviceA-Ten-GigabitEthernet1/0/2] undo stp enable
[DeviceA-Ten-GigabitEthernet1/0/2] loopback-detection action vlan-block
[DeviceA-Ten-GigabitEthernet1/0/2] quit

# 配置环路检测的时间间隔为 35 秒。
[DeviceA] loopback-detection interval-time 35

(2) 配置 Device B
# 创建 VLAN 100。
<DeviceB> system-view
[DeviceB] vlan 100
[DeviceB–vlan100] quit

# 配置端口 Ten-GigabitEthernet1/0/1 和 Ten-GigabitEthernet1/0/2 为 Trunk 类型,并允许VLAN 100 通过。
[DeviceB] interface ten-gigabitethernet 1/0/1
[DeviceB-Ten-GigabitEthernet1/0/1] port link-type trunk
[DeviceB-Ten-GigabitEthernet1/0/1] port trunk permit vlan 100
[DeviceB-Ten-GigabitEthernet1/0/1] quit
[DeviceB] interface ten-gigabitethernet 1/0/2
[DeviceB-Ten-GigabitEthernet1/0/2] port link-type trunk
[DeviceB-Ten-GigabitEthernet1/0/2] port trunk permit vlan 100
[DeviceB-Ten-GigabitEthernet1/0/2] quit

(3) 配置 Device C
# 创建 VLAN 100。
<DeviceC> system-view
[DeviceC] vlan 100
[DeviceC–vlan100] quit

# 配置端口 Ten-GigabitEthernet1/0/1 和 Ten-GigabitEthernet1/0/2 为 Trunk 类型,并允许VLAN 100 通过。
[DeviceC] interface ten-gigabitethernet 1/0/1
[DeviceC-Ten-GigabitEthernet1/0/1] port link-type trunk
[DeviceC-Ten-GigabitEthernet1/0/1] port trunk permit vlan 100
[DeviceC-Ten-GigabitEthernet1/0/1] quit
[DeviceC] interface ten-gigabitethernet 1/0/2
[DeviceC-Ten-GigabitEthernet1/0/2] port link-type trunk
[DeviceC-Ten-GigabitEthernet1/0/2] port trunk permit vlan 100
[DeviceC-Ten-GigabitEthernet1/0/2] quit

四、 验证配置
当配置完成后,系统在一个环路检测时间间隔内在 Device A 的端口 Ten-GigabitEthernet1/0/1 和Ten-GigabitEthernet1/0/2 上都检测到了环路,并打印了如下日志信息。
 验证配置
# 显示 Device A 上环路检测的配置和运行情况。
显示 Device A 上环路检测的配置和运行情况
由此可见,Device A 在端口 Ten-GigabitEthernet1/0/1 和 Ten-GigabitEthernet1/0/2 上检测到环路。由于环路检测功能运行在 VLAN-block 模式下,端口 Ten-GigabitEthernet1/0/1 和Ten-GigabitEthernet1/0/2 上出现环路后 VLAN 100 均已被阻塞,因此设备打印的日志信息显示这两个端口上的环路已消除。

H3C网管交换机环路检测典型配置举例

一、组网需求
• 三台设备 Device A、Device B 和 Device C 组成一个物理上的环形网络。
• 通过在 Device A 上配置环路检测功能,使系统能够自动关闭 Device A 上出现环路的端口,并通过打印日志信息来通知用户检查网络。

二、 组网图
环路检测典型组网图

三、配置步骤
(1) 配置 Device A
# 创建 VLAN 100,并全局开启该 VLAN 内的环路检测功能。
<DeviceA> system-view
[DeviceA] vlan 100
[DeviceA–vlan100] quit
[DeviceA] loopback-detection global enable vlan 100

# 配置端口 Ten-GigabitEthernet1/0/1 和 Ten-GigabitEthernet1/0/2 为 Trunk 类型,并允许 VLAN 100
通过。
[DeviceA] interface ten-gigabitethernet 1/0/1
[DeviceA-Ten-GigabitEthernet1/0/1] port link-type trunk
[DeviceA-Ten-GigabitEthernet1/0/1] port trunk permit vlan 100
[DeviceA-Ten-GigabitEthernet1/0/1] quit
[DeviceA] interface ten-gigabitethernet 1/0/2
[DeviceA-Ten-GigabitEthernet1/0/2] port link-type trunk
[DeviceA-Ten-GigabitEthernet1/0/2] port trunk permit vlan 100
[DeviceA-Ten-GigabitEthernet1/0/2] quit

# 全局配置环路检测的处理模式为 Shutdown 模式。
[DeviceA] loopback-detection global action shutdown

# 配置环路检测的时间间隔为 35 秒。
[DeviceA] loopback-detection interval-time 35

(2) 配置 Device B
# 创建 VLAN 100。
<DeviceB> system-view
[DeviceB] vlan 100
[DeviceB–vlan100] quit

# 配置端口 Ten-GigabitEthernet1/0/1 和 Ten-GigabitEthernet1/0/2 为 Trunk 类型,并允许 VLAN 100
通过。
[DeviceB] interface ten-gigabitethernet 1/0/1
[DeviceB-Ten-GigabitEthernet1/0/1] port link-type trunk
[DeviceB-Ten-GigabitEthernet1/0/1] port trunk permit vlan 100
[DeviceB-Ten-GigabitEthernet1/0/1] quit
[DeviceB] interface ten-gigabitethernet 1/0/2
[DeviceB-Ten-GigabitEthernet1/0/2] port link-type trunk
[DeviceB-Ten-GigabitEthernet1/0/2] port trunk permit vlan 100
[DeviceB-Ten-GigabitEthernet1/0/2] quit

(3) 配置 Device C
# 创建 VLAN 100。
<DeviceC> system-view
[DeviceC] vlan 100
[DeviceC–vlan100] quit

# 配置端口 Ten-GigabitEthernet1/0/1 和 Ten-GigabitEthernet1/0/2 为 Trunk 类型,并允许 VLAN 100
通过。
[DeviceC] interface ten-gigabitethernet 1/0/1
[DeviceC-Ten-GigabitEthernet1/0/1] port link-type trunk
[DeviceC-Ten-GigabitEthernet1/0/1] port trunk permit vlan 100
[DeviceC-Ten-GigabitEthernet1/0/1] quit
[DeviceC] interface ten-gigabitethernet 1/0/2
[DeviceC-Ten-GigabitEthernet1/0/2] port link-type trunk
[DeviceC-Ten-GigabitEthernet1/0/2] port trunk permit vlan 100
[DeviceC-Ten-GigabitEthernet1/0/2] quit

四、 验证配置
当配置完成后,系统在一个环路检测时间间隔内在 Device A 的端口 Ten-GigabitEthernet1/0/1 和
Ten-GigabitEthernet1/0/2 上都检测到了环路,于是将这两个端口自动关闭,并打印了如下日志信息
验证配置
使用 display loopback-detection 命令可以查看 Device A 上环路检测的配置和运行情况:
# 显示 Device A 上环路检测的配置和运行情况。
查看 Device A 上环路检测的配置和运行情况
由此可见,Device A 上显示在端口 Ten-GigabitEthernet1/0/1 和 Ten-GigabitEthernet1/0/2 上检测到环路,由于 环 路 检 测 功能运行在 Shutdown 模式下,端口 Ten-GigabitEthernet1/0/1 和Ten-GigabitEthernet1/0/2 上出现环路后均已被自动关闭,因此设备打印的日志信息显示这两个端口上的环路已消除 。 此时, 使 用 display interface 命 令 分 别 查 看 Device A 上 端 口Ten-GigabitEthernet1/0/1 和 Ten-GigabitEthernet1/0/2 的状态信息:

# 显示 Device A 上端口 Ten-GigabitEthernet1/0/1 的状态信息。
显示 Device A 上端口 Ten-GigabitEthernet1/0/1 的状态信息

# 显示 Device A 上端口 Ten-GigabitEthernet1/0/2 的状态信息。
显示 Device A 上端口 Ten-GigabitEthernet1/0/2 的状态信息

由此可见,端口 Ten-GigabitEthernet1/0/1 和 Ten-GigabitEthernet1/0/2 均已被环路检测模块自动关闭。

H3C网管交换机基于协议的VLAN典型配置举例

一、组网需求
如下图所示,实验室网络中大部分主机运行 IPv4 网络协议,另外为了教学需要还部署了 IPv6 实验局,因此,有些主机运行 IPv6 网络协议。为了避免互相干扰,将 VLAN 100 与 IPv4 协议、ARP 协议关联,VLAN 200 与 IPv6 协议关联,通过协议 VLAN 将 IPv4 流量和 IPv6 流量二层互相隔离。

二、 组网图
基于协议的 VLAN 组网图

三、配置步骤
(1) 配置 Device
# 创建 VLAN 100,将端口 GigabitEthernet1/0/3 加入 VLAN 100。
<Device> system-view
[Device] vlan 100
[Device-vlan100] description protocol VLAN for IPv4
[Device-vlan100] port gigabitethernet 1/0/3
[Device-vlan100] quit

# 创建 VLAN 200,将端口 GigabitEthernet1/0/4 加入 VLAN 200。
[Device] vlan 200
[Device-vlan200] description protocol VLAN for IPv6
[Device-vlan200] port gigabitethernet 1/0/4

# 将 IPv6 协议报文划分到 VLAN 200 中传输。
[Device-vlan200] protocol-vlan 1 ipv6
[Device-vlan200] quit

# 将 IPv4 协议报文和采用 Ethernet II 封装格式的 ARP 协议报文(ARP 报文对应的封装格式为Ethernet II)划分到 VLAN 100 中传输。
[Device] vlan 100
[Device-vlan100] protocol-vlan 1 ipv4
[Device-vlan100] protocol-vlan 2 mode ethernetii etype 0806
[Device-vlan100] quit

# 配置端口GigabitEthernet1/0/1为Hybrid端口,允许VLAN 100、200通过,并且在发送VLAN 100、200 的报文时不携带 VLAN Tag。
[Device] interface gigabitethernet 1/0/1
[Device-GigabitEthernet1/0/1] port link-type hybrid
[Device-GigabitEthernet1/0/1] port hybrid vlan 100 200 untagged

# 配置端口 GigabitEthernet1/0/1 与 VLAN 100 的协议模板 1(即 IPv4 协议模板)、协议模板 2(即ARP 协议模板)和 VLAN 200 的协议模板 1(即 IPv6 协议模板)进行绑定。
[Device-GigabitEthernet1/0/1] port hybrid protocol-vlan vlan 100 1 to 2
[Device-GigabitEthernet1/0/1] port hybrid protocol-vlan vlan 200 1
[Device-GigabitEthernet1/0/1] quit

# 配置端口GigabitEthernet1/0/2为Hybrid端口,允许VLAN 100、200通过,并且在发送VLAN 100、200 的报文时不携带 VLAN Tag。
[Device] interface gigabitethernet 1/0/2
[Device-GigabitEthernet1/0/2] port link-type hybrid
[Device-GigabitEthernet1/0/2] port hybrid vlan 100 200 untagged

# 配置端口 GigabitEthernet1/0/2 与 VLAN 100 的协议模板 1(即 IPv4 协议模板)、协议模板 2(即ARP 协议模板)和 VLAN 200 的协议模板 1(即 IPv6 协议模板)进行绑定。
[Device-GigabitEthernet1/0/2] port hybrid protocol-vlan vlan 100 1 to 2
[Device-GigabitEthernet1/0/2] port hybrid protocol-vlan vlan 200 1
[Device-GigabitEthernet1/0/2] quit

(2) L2 switch A 和 L2 switch B 采用缺省配置

(3) 配置 Host 和 Server
将 IPv4 Host A、IPv4 Host B 和 IPv4 Server 配置在一个网段,比如 192.168.100.0/24;将 IPv6 Host  A、IPv6 Host B 和 IPv6 Server 配置在一个网段,比如 2001::1/64。

四、显示与验证
(1) 通过 ping 命令查看
VLAN 100 内的主机和服务器能够互相 Ping 通;VLAN 200 内的主机和服务器能够互相 Ping 通。但 VLAN 100 内的主机/服务器与 VLAN 200 内的主机/服务器之间会 Ping 失败。
(2) 通过显示信息查看
# 查看所有协议 VLAN 的信息。
[Device] display protocol-vlan vlan all
查看所有协议 VLAN 的信息

# 查看所有端口关联的协议 VLAN 的信息。
[Device] display protocol-vlan interface all
查看所有端口关联的协议 VLAN 的信息

ICP备案号:晋ICP备18007549号-1
站长微信:15534641008