- Table of Contents
-
- 02-Configuration Examples
- 01-H3C_AAA_Configuration_Examples
- 02-H3C_ACL_Configuration_Examples
- 03-H3C_IGMP_Configuration_Examples
- 04-H3C_IP_Source_Guard_Configuration_Examples
- 05-H3C_Ethernet_OAM_Configuration_Examples
- 06-H3C_NQA_Configuration_Examples
- 07-H3C_QinQ_Configuration_Examples
- 08-H3C_OSPF_Configuration_Examples
- 09-H3C_MPLS_TE_Configuration_Examples
- 10-H3C_OpenFlow_Configuration_Examples
- 11-H3C_NAT_Configuration_Examples
- 12-H3C_RBAC_Configuration_Examples
- 13-H3C_DHCP_Relay_Redundancy_Configuration_Examples
- 14-H3C_DLDP_Configuration_Examples
- 15-H3C_IS-IS_Configuration_Examples
- 16-H3C_MPLS_L3VPN_Configuration_Examples
- 17-H3C_SSH_Configuration_Examples
- 18-H3C_Login_Management_Configuration_Examples
- 19-H3C_SNMP_Configuration_Examples
- 20-H3C_Priority_Marking_and_Queue_Scheduling_Configuration_Examples
- 21-H3C_Multicast_VPN_Configuration_Examples
- 22-H3C_BGP_Configuration_Examples
- 23-H3C_HoVPN_Configuration_Examples
- 24-H3C_L2TP_Configuration_Examples
- 25-H3C_VRRP_Configuration_Examples
- 26-H3C_Traffic_Filtering_Configuration_Examples
- 27-H3C_Samplers_and_IPv4_NetStream_Configuration_Examples
- 28-H3C_MPLS_L2VPN_Configuration_Examples
- 29-H3C_NetStream_Configuration_Examples
- 30-H3C_Policy-Based_Routing_Configuration_Examples
- 31-H3C_Traffic_Policing_Configuration_Examples
- 32-H3C_BFD_Configuration_Examples
- 33-H3C_OSPFv3_Configuration_Examples
- 34-H3C_VPLS_Configuration_Examples
- 35-H3C_GTS_and_Rate_Limiting_Configuration_Examples
- 36-H3C_IPv6_IS-IS_Configuration_Examples
- 37-H3C_MPLS OAM_Configuration_Examples
- 38-H3C_BGP_Route_Selection_Configuration_Examples
- 39-H3C_IS-IS_Route_Summarization_Configuration_Examples
- 40-H3C_SRv6 Configuration Examples
- 41-H3C_Attack_Protection_Configuration_Examples
- 42-H3C_OSPF_Multi-Process_Configuration_Examples
- 43-H3C_OSPF_with_Multi-Instance_Configuration_Examples
- 44-H3C_ARP_Attack_Protection_Configuration_Examples
- 45-H3C_DHCPv6_Server_and_DHCPv6_Prefix_Client_Configuration_Examples
- 46-General QoS Configuration Examples
- 47-GRE Tunnel Establishment Using OSPF Configuration Examples
- 48-GRE Tunnel Establishment Using Static Routes Configuration Examples
- 49-QoS Configuration Examples for the Financial Industry
- Related Documents
-
Title | Size | Download |
---|---|---|
27-H3C_Samplers_and_IPv4_NetStream_Configuration_Examples | 74.66 KB |
Introduction
This document provides configuration examples of collaborating samplers with IPv4 NetStream.
Prerequisites
The configuration examples in this document were created and verified in a lab environment, and all the devices were started with the factory default configuration. When you are working on a live network, make sure you understand the potential impact of every command on your network.
This document assumes that you have basic knowledge of samplers and IPv4 NetStream.
General restrictions and guidelines
· NetStream flow mirroring supports mirroring traffic only to the current interface module.
Example: Configuring Samplers and IPv4 NetStream
Network configuration
As shown in Figure 1, configure a sampler and IPv4 NetStream as follows:
· Configure IPv4 NetStream on the router to collect statistics on incoming traffic.
· Configure the router to send IPv4 NetStream data to port 5000 on the NetStream server.
· Configure fixed sampling in the inbound direction to select the first packet out of 1001 packets on Ten-GigabitEthernet 0/0/15.
Procedures
1. Configure a sampler:
# Create sampler samperin in fixed sampling mode, and set the rate to 1001. The first packet out of 1001 packets is selected.
<Device> system-view
[Device] sampler samplerin mode fixed packet-interval 1001
2. Configure NetStream:
# Assign an IP address to Ten-GigabitEthernet 0/0/15.
[Device] interface ten-gigabitethernet 0/0/15
[Device-Ten-GigabitEthernet0/0/15] ip address 192.168.0.1 24
[Device-Ten-GigabitEthernet0/0/15] quit
# Assign an IP address to interface Ten-GigabitEthernet 0/0/16.
[Device] interface ten-gigabitethernet 0/0/16
[Device-Ten-GigabitEthernet0/0/16] ip address 10.0.0.1 24
[Device-Ten-GigabitEthernet0/0/16] quit
# Assign an IP address to interface Ten-GigabitEthernet 0/0/17.
[Device] interface ten-gigabitethernet 0/0/17
[Device-Ten-GigabitEthernet0/0/17] ip address 192.168.1.1 24
[Device-Ten-GigabitEthernet0/0/17] quit
[Device] ip netstream
# Configure QoS policy ns_ipv4_in with a flow mirroring action that uses sampler samperin.
[Device] acl advanced 3000
[Device-acl-ipv4-adv-3000] rule 0 permit ip
[Device-acl-ipv4-adv-3000] quit
[Device] traffic classifier ns_ipv4
[Device-classifier-ns_ipv4] if-match acl 3000
[Device-classifier-ns_ipv4] quit
[Device] traffic behavior ns_ipv4_in
[Device-behavior-ns_ipv4] mirror-to local sampler samplerin
[Device-behavior-ns_ipv4] quit
[Device] qos policy ns_ipv4_in
[Device-qospolicy-ns_ipv4] classifier ns_ipv4 behavior ns_ipv4_in
[Device-qospolicy-ns_ipv4] quit
# Apply QoS policy ns_ipv4_in to the inbound direction of Ten-GigabitEthernet 0/0/15.
[Device] interface ten-gigabitethernet 0/0/15
[Device-Ten-GigabitEthernet0/0/15] qos apply policy ns_ipv4_in inbound
[Device-Ten-GigabitEthernet0/0/15] quit
# Specify 192.168.1.2 as the IP address of the destination host and UDP port 5000 as the export destination port number.
[Device] ip netstream export host 192.168.1.2 5000
Verifying the configuration
1. Display configuration information for sampler samperin.
[Device] display sampler
Sampler name: samplerin
Mode: fixed; Packet-interval: 1001; IsNpower : N
2. Display the statistics about NetStream data:
# Display NetStream entry information.
[Device] display ip netstream cache verbose
IP NetStream cache information:
Active flow timeout : 30 min
Inactive flow timeout : 30 sec
Max number of entries : 460800
IP active flow entries : 1
MPLS active flow entries : 0
L2 active flow entries : 0
IPL2 active flow entries : 0
IP flow entries counted : 22
MPLS flow entries counted : 0
L2 flow entries counted : 0
IPL2 flow entries counted : 0
Last statistics resetting time : Never
IP packet size distribution (300 packets in total):
1-32 64 96 128 160 192 224 256 288 320 352 384 416 448 480
.000 .000 1.00 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000
512 544 576 1024 1536 2048 2560 3072 3584 4096 4608 >4608
.000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000
Protocol Total Packets Flows Packets Active(sec) Idle(sec)
Flows /sec /sec /flow /flow /flow
---------------------------------------------------------------------------
ICMP 22 0 0 13 1 30
Type DstIP(Port) SrcIP(Port) Pro ToS If(Direct) Pkts
DstMAC(VLAN) SrcMAC(VLAN)
TopLblType(IP/MASK) Lbl-Exp-S-List
---------------------------------------------------------------------------
IP 10.0.0.2(2048) 192.168.0.2(0) 1 0 XGE0/0/15(I) 5
TCPFlag: 0
DstMask: 32 SrcMask: 32 NextHop: 10.0.0.2
DstAS: 0 SrcAS: 0 BGPNextHop: 0.0.0.0
InVRF: 0
SamplerMode: 1 SamplerInt: 1001
Active: 0 Bytes/Pkt: 84
# Display information about the NetStream data export.
[Device] display ip netstream export
IP export information:
Flow source interface : Not specified
Flow destination VPN instance : Not specified
Flow destination IP address (UDP) : 192.168.1.2 (5000)
Version 5 exported flow number : 0
Version 5 exported UDP datagram number (failed) : 0 (0)
Version 9 exported flow number : 1
Version 9 exported UDP datagram number (failed) : 0 (0)
Version 10 exported flow number : 0
Version 10 exported UDP datagram number (failed): 0 (0)
IPL2 export information:
Flow source interface : Not specified
Flow destination VPN instance : Not specified
Flow destination IP address (UDP) : 192.168.1.2 (5000)
Version 9 exported flow number : 0
Version 9 exported UDP datagram number (failed) : 0 (0)
Version 10 exported flow number : 0
Version 10 exported UDP datagram number (failed): 0 (0)
Configuration files
#
sampler samplerin mode fixed packet-interval 1001
#
ip netstream
ip netstream export host 192.168.1.2 5000
#
traffic classifier ns_ipv4 operator and
if-match acl 3000
#
traffic behavior ns_ipv4_in
mirror-to local sampler samplerin
#
qos policy ns_ipv4_in
classifier ns_ipv4 behavior ns_ipv4_in
#
interface Ten-GigabitEthernet0/0/15
port link-mode route
ip address 192.168.0.1 255.255.255.0
qos apply policy ns_ipv4_in inbound
#
interface Ten-GigabitEthernet0/0/16
port link-mode route
ip address 10.0.0.1 255.255.255.0
#
interface Ten-GigabitEthernet0/0/17
port link-mode route
ip address 192.168.1.1 255.255.255.0
#
acl advanced 3000
rule 0 permit ip
#
Related documentation
· H3C CR16000-M1A Router Network Management and Monitoring Configuration Guide
· H3C CR16000-M1A Router Network Management and Monitoring Command Reference