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。
在下面的範例中,我們分享設定流量型鏡像會話的步驟,以及針對 src=any 的流量篩選,dst=10.0.20.1
可視需要新增其他篩選準則,且必須將篩選準則新增至存取清單。
流量型埠鏡像使用案例範例:
使用監視原則,將在一個交換器埠、多個交換器埠、整個 VLAN 或埠通道上選取的網路封包副本傳送至 CPU。
警示:將流量傳送至 CPU 時,請小心並套用入口封包篩選器,以避免 CPU 超載。
注意:在 Dell Networking SONiC 4.0.3 上測試過流量型鏡像。
在下面的範例中,我們分享設定流量型鏡像會話的步驟,以及針對 src=any 的流量篩選,dst=10.0.20.1
可視需要新增其他篩選準則,且必須將篩選準則新增至存取清單。
設定鏡像會話
在以下範例中,會使用鏡像會話命令,使用表單: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
設定原則對應流程原則
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.