Page 1
H3C S6530X Switch Series TAP Configuration Guide New H3C Technologies Co., Ltd. http://www.h3c.com Software version: Release 8307Pxx Document version: 6W100-20240313...
Page 2
The information in this document is subject to change without notice. All contents in this document, including statements, information, and recommendations, are believed to be accurate, but they are presented without warranty of any kind, express or implied. H3C shall not be liable for technical or editorial errors or omissions contained herein.
Preface This configuration guide describes the TAP fundamentals and configuration procedures. This preface includes the following topics about the documentation: • Audience. • Conventions. • Documentation feedback. Audience This documentation is intended for: • Network planners. • Field technical support and servicing engineers. •...
Symbols Convention Description An alert that calls attention to important information that if not understood or followed WARNING! can result in personal injury. An alert that calls attention to important information that if not understood or followed CAUTION: can result in data loss, data corruption, or damage to hardware or software. An alert that calls attention to essential information.
Contents Configuring TAP ···························································································· 1 About TAP ·························································································································································· 1 How TAP works ·········································································································································· 1 TAP deployment mode ······························································································································· 2 Restrictions and guidelines: TAP configuration·································································································· 3 TAP tasks at a glance ········································································································································ 3 Prerequisites for TAP configuration ··················································································································· 4 Enabling TAP globally ········································································································································ 4 Configuring a traffic class ···································································································································...
Configuring TAP About TAP The growing scale of data center networks places more and more stringent requirements on security and performance. Monitoring network traffic and extracting data from the traffic is an important aspect to be addressed. The test access point (TAP) feature can copy and forward traffic in real time without interrupting the traffic.
Figure 1 TAP workflow A packet enters TAP device Matches the criteria? No TAP Editing actions exist? processing Execute editing actions Execute redirecting action Copy the packet Send a copy to each monitoring device TAP deployment mode A TAP device can be deployed in the following modes: •...
Figure 2 Deployment modes IP network IP network Monitoring device Monitoring device Direct mode Indirect mode Restrictions and guidelines: TAP configuration In a TAP policy, you must configure the action of redirecting packets to a monitoring group, and you can configure packet editing actions as needed. If both the redirecting action and a packet editing action are configured, the packet editing action is executed before the redirecting action.
Configuring an outer VLAN tag deleting action Configuring an outer VLAN tag adding action Configuring an IP or MAC address marking action Configuring a timestamp and Ethernet header adding action Configuring a packet truncation action Configuring a tunnel header stripping action ...
Configuring a traffic behavior Configuring an M:N copying action About this task This feature allows the device to forward packets it receives from multiple (M) interfaces to multiple (N) data monitoring devices (Server A and Server B), as shown in Figure Figure 3 Network diagram Port 1...
Figure 4 Network diagram Port 1 Port 3 Device Server Port 2 Procedure Enter system view. system-view Create a traffic behavior and enter traffic behavior view. traffic behavior behavior-name Configure a VLAN ID marking action. Choose one option as needed: Configure a CVLAN ID marking action.
By default, no outer VLAN tag deleting action is configured. Configure an action of redirecting packets to a monitoring group. redirect monitoring-group group-id By default, no action of redirecting packets to a monitoring group is configured. Configuring an outer VLAN tag adding action About this task In some scenarios, the device receives packets with different CVLAN IDs on different interfaces.
system-view Create a traffic behavior and enter traffic behavior view. traffic behavior behavior-name Configure an IP or MAC address marking action. Choose one option as needed: Configure a destination IPv4 address marking action. remark destination-ip ipv4-address By default, no destination IPv4 address marking action is configured. Configure a source IPv4 address marking action.
Figure 8 Network diagram ETH Header ETH Header ETH Header Port 2 Port 4 Device Server Procedure Enter system view. system-view Create a traffic behavior and enter traffic behavior view. traffic behavior behavior-name Configure a timestamp and Ethernet header adding action. timestamp-over-ether destination-mac mac-address source-mac mac-address ethtype-id ethtype-id By default, no timestamp and Ethernet header adding action is configured.
redirect monitoring-group group-id By default, no action of redirecting packets to a monitoring group is configured. Return to system view. quit Set the packet length after truncation. qos truncation length length The default setting is 128 bytes. Configuring a tunnel header stripping action About this task In some scenarios, the data monitoring device (the server) cannot parse GRE, NVGRE, or VXLAN packets.
Task Command For more information about this command, see flow mirroring commands in ACL and QoS Command Reference. display traffic behavior user-defined [ behavior-name ] [ slot slot-number ] Display traffic behavior configuration. For more information about this command, see flow mirroring commands in ACL and QoS Command Reference.
[DeviceD-monitoring-group-1] quit Create a traffic class named classifier_tap, and configure the traffic class to match all packets. [DeviceD] traffic classifier classifier_tap [DeviceD-classifier-classifier_tap] if-match any [DeviceD-classifier-classifier_tap] quit Create a traffic behavior named behavior_tap, and configure an action of redirecting packets to monitoring group 1. [DeviceD] traffic behavior behavior_tap [DeviceD-behavior-behavior_tap] redirect monitoring-group 1 [DeviceD-behavior-behavior_tap] quit...
Page 20
Figure 15 Network diagram Device B Device C Device A XGE1/0/1 XGE1/0/2 XGE1/0/3 XGE1/0/4 Bridge-Aggregation 1 XGE1/0/5 Device D Procedure Enable TAP globally. <DeviceB> system-view [DeviceB] tap enable Configure an aggregate interface: # Create a Layer 2 aggregate interface named Bridge-Aggregation 1. [DeviceB] interface bridge-aggregation 1 [DeviceB-Bridge-Aggregation1] quit # Assign Ten-GigabitEthernet 1/0/3, Ten-GigabitEthernet 1/0/4, and Ten-GigabitEthernet 1/0/5...
Page 21
[DeviceB-acl-ipv4-adv-3001] rule permit ip source 192.168.1.1 0 destination 192.168.2.1 0 [DeviceB-acl-ipv4-adv-3001] quit # Create a traffic class named classifier1, and use ACL 3001 as the match criterion. [DeviceB] traffic classifier classifier1 [DeviceB-classifier-classifier1] if-match acl 3001 [DeviceB-classifier-classifier1] quit # Create IPv4 advanced ACL 3002, and configure a rule to match packets with source IP address 192.168.2.1 and destination IP address 192.168.1.1.
Example: Configuring VLAN ID marking Network configuration As shown in Figure 16, Device C is a TAP device. Configure VLAN ID marking on Device C to meet the following requirements: • Mark CVLAN 10 for packets received on Ten-GigabitEthernet 1/0/1. •...
# Create a TAP policy named policy_tap1, and associate traffic class classifier_tap with traffic behavior behavior_tap1 in the TAP policy. [DeviceC] qos tap policy policy_tap1 [DeviceC-qospolicy-policy_tap1] classifier classifier_tap behavior behavior_tap1 [DeviceC-qospolicy-policy_tap1] quit # Create a TAP policy named policy_tap2, and associate traffic class classifier_tap with traffic behavior behavior_tap2 in the TAP policy.
[DeviceC-monitoring-group-1] quit Create a traffic class named classifier_tap, and configure the traffic class to match all packets. [DeviceC] traffic classifier classifier_tap [DeviceC-classifier-classifier_tap] if-match any [DeviceC-classifier-classifier_tap] quit Create a traffic behavior named behavior_tap, and configure an outer VLAN tag deleting action and an action of redirecting packets to monitoring group 1. [DeviceC] traffic behavior behavior_tap [DeviceC-behavior-behavior_tap] strip-header top-most-vlan [DeviceC-behavior-behavior_tap] redirect monitoring-group 1...
Enable TAP globally. <DeviceC> system-view [DeviceC] tap enable Create monitoring group 1, and assign Ten-GigabitEthernet 1/0/3 to the monitoring group. [DeviceC] monitoring-group 1 [DeviceC-monitoring-group-1] monitoring-port ten-gigabitethernet 1/0/3 [DeviceC-monitoring-group-1] quit Create a traffic class named classifier_tap, and configure the traffic class to match all packets. [DeviceC] traffic classifier classifier_tap [DeviceC-classifier-classifier_tap] if-match any [DeviceC-classifier-classifier_tap] quit...
Enable TAP globally. <DeviceB> system-view [DeviceB] tap enable Create monitoring group 1, and assign Ten-GigabitEthernet 1/0/2 to the monitoring group. [DeviceB] monitoring-group 1 [DeviceB-monitoring-group-1] monitoring-port ten-gigabitethernet 1/0/2 [DeviceB-monitoring-group-1] quit Create a traffic class named classifier_tap, and configure the traffic class to match all packets. [DeviceB] traffic classifier classifier_tap [DeviceB-classifier-classifier_tap] if-match any [DeviceB-classifier-classifier_tap] quit...
Page 27
Figure 20 Network diagram Device A XGE1/0/2 XGE1/0/4 Device B Device D Server Device C Procedure Enable TAP globally. <DeviceD> system-view [DeviceD] tap enable Create monitoring group 1, and assign Ten-GigabitEthernet 1/0/4 to the monitoring group. [DeviceD] monitoring-group 1 [DeviceD-monitoring-group-1] monitoring-port ten-gigabitethernet 1/0/4 [DeviceD-monitoring-group-1] quit Configure a traffic class.
[DeviceD] traffic behavior behavior_tap3 [DeviceD-behavior-behavior_tap3] timestamp-over-ether destination-mac 0050-ba27-bed4 source-mac 0050-ba27-bed3 ethtype-id ff [DeviceD-behavior-behavior_tap3] redirect monitoring-group 1 [DeviceD-behavior-behavior_tap2] quit Configure TAP policies: # Create a TAP policy named policy_tap1, and associate traffic class classifier_tap with traffic behavior behavior_tap1 in the TAP policy. [DeviceD] qos tap policy policy_tap1 [DeviceD-qospolicy-policy_tap1] classifier classifier_tap behavior behavior_tap1 [DeviceD-qospolicy-policy_tap1] quit...
Procedure Enable TAP globally. <DeviceB> system-view [DeviceB] tap enable Create monitoring group 1, and assign Ten-GigabitEthernet 1/0/2 to the monitoring group. [DeviceB] monitoring-group 1 [DeviceB-monitoring-group-1] monitoring-port ten-gigabitethernet 1/0/2 [DeviceB-monitoring-group-1] quit Configure a traffic class. # Create IPv4 advanced ACL 3001, and configure a rule to match TCP packets with source IP address 10.0.0.1 and mask 255.255.255.0.
Page 30
Figure 22 Network diagram XGE1/0/1 XGE1/0/2 Device A Device B Server Procedure Enable TAP globally. <DeviceB> system-view [DeviceB] tap enable Create monitoring group 1, and assign Ten-GigabitEthernet 1/0/2 to the monitoring group. [DeviceB] monitoring-group 1 [DeviceB-monitoring-group-1] monitoring-port ten-gigabitethernet 1/0/2 [DeviceB-monitoring-group-1] quit Create a traffic class named classifier_tap, and configure the traffic class to match NVGRE packets with VSID FFFF28.
Need help?
Do you have a question about the S6530X Series and is the answer not in the manual?
Questions and answers