Dell Networking SONiC - 基于流的镜像

Summary: 本文介绍如何在 Dell Networking SONiC 上配置基于流的监测。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

在当前文章中,您可以找到有关如何在 Dell Networking SONiC 上配置基于流的镜像的说明。

基于流的端口镜像使用情形示例:
使用监视策略将一个交换机端口、多个交换机端口、整个 VLAN 或端口通道上选择的网络数据包拷贝发送到 CPU。
 
注意:将流量发送到 CPU 时,请小心并应用入口数据包筛选器以避免 CPU 过载。
 
提醒:基于流的镜像在 Dell Networking SONiC 4.0.3 上进行了测试。

在下面的示例中,我们共享使用 src=any 流量筛选配置基于流的镜像会话的步骤,dst=10.0.20.1

可以根据需要添加其他筛选器,必须将筛选器添加到访问列表中。 
 

配置镜像会话 

在下面的示例中,使用 mirror-session 命令,使用表单: mirror-session session-name
show running-configuration mirror-session
!
mirror-session 2
destination CPU direction both


设置名为 TEST 的访问列表

show running-configuration ip access-list TEST
!
ip access-list TEST
seq 10 permit ip any host 10.0.20.1 << in current case we would copy traffic with src any to dst 10.0.20.1 to CPU , additional port filters could be applied here.


设置名为 FLOW-MAP 的类别映射

show running-configuration class-map FLOW-MAP
!
class-map FLOW-MAP match-type acl
 match access-group ip TEST


设置策略映射 FLOW-POLICY

show running-configuration policy-map FLOW-POLICY
!
policy-map FLOW-POLICY type monitoring
class FLOW-MAP priority 99
  set mirror-session 2


将策略映射应用到物理接口以太网 6

show running-configuration interface Ethernet 6
!
interface Ethernet6
service-policy type monitoring in FLOW-POLICY 

现在,我们可以在应用上述 cfg 的传输交换机上运行 tcpdump,并查看数据包/其内容。
DELLSONiC# exit 
admin@DELLSONiC:~$ sudo tcpdump -i any host 10.0.20.1

Affected Products

Enterprise SONiC Distribution, PowerSwitch E3200-ON Series, Dell EMC Networking N3200-ON, PowerSwitch S5212F-ON, PowerSwitch S5224F-ON, PowerSwitch S5232F-ON, PowerSwitch S5248F-ON, PowerSwitch S5296F-ON, PowerSwitch Z9264F-ON, PowerSwitch Z9332F-ON , PowerSwitch Z9432F-ON ...
Article Properties
Article Number: 000216195
Article Type: How To
Last Modified: 17 Oct 2023
Version:  3
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.