- Table of Contents
-
- 15-Network Management and Monitoring Configuration Guide
- 00-Preface
- 01-System maintenance and debugging configuration
- 02-NQA configuration
- 03-iNQA configuration
- 04-iFIT configuration
- 05-SRPM configuration
- 06-NTP configuration
- 07-PTP configuration
- 08-Network synchronization configuration
- 09-SNMP configuration
- 10-RMON configuration
- 11-NETCONF configuration
- 12-CWMP configuration
- 13-EAA configuration
- 14-Process monitoring and maintenance configuration
- 15-Sampler configuration
- 16-Mirroring configuration
- 17-NetStream configuration
- 18-IPv6 NetStream configuration
- 19-TCP connection trace configuration
- 20-Performance management configuration
- 21-Fast log output configuration
- 22-Flow log configuration
- 23-Information center configuration
- 24-Packet capture configuration
- 25-Flow monitor configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
18-IPv6 NetStream configuration | 338.27 KB |
Restrictions and guidelines: NetStream
IPv6 NetStream tasks at a glance
Enabling IPv6 NetStream (system view)
Enabling IPv6 NetStream (interface view)
Enabling IPv6 NetStream for an SRv6 TE policy
Enabling archiving of cached IPv6 NetStream entries
Configuring IPv6 NetStream mirroring
Configuring IPv6 NetStream flow mirroring
Configuring IPv6 NetStream sampling settings
Configuring IPv6 NetStream sampling rate
Configuring standard mode for IPv6 NetStream sampling
Configuring the RFC 7011 IPv6 NetStream template format
Configuring the IPv6 NetStream data export format
Configuring the refresh rate for IPv6 NetStream version 9 or version 10 template
Configuring MPLS-aware IPv6 NetStream
Enabling IPv6 NetStream statistics collection for the payload packets in SRv6-tunneled packets
Configuring IPv6 NetStream flow aging
Configuring periodical flow aging
Configuring the IPv6 NetStream data export
Configuring the IPv6 NetStream traditional data export
Configuring the IPv6 NetStream aggregation data export
Display and maintenance commands for IPv6 NetStream
IPv6 NetStream configuration examples
Example: Configuring IPv6 NetStream traditional data export (IPv6 NetStream flow mirroring)
Example: Configuring IPv6 NetStream traditional data export (IPv6 NetStream port mirroring)
Example: Configuring IPv6 NetStream aggregation data export (IPv6 NetStream flow mirroring)
Example: Configuring IPv6 NetStream aggregation data export (IPv6 NetStream port mirroring)
Configuring IPv6 NetStream
About IPv6 NetStream
IPv6 NetStream is an accounting technology that provides statistics on a per-flow basis. An IPv6 flow is defined by the following 8-tuple elements:
· Destination IPv6 address.
· Source IPv6 address.
· Destination port number.
· Source port number.
· Protocol number.
· Traffic class.
· Flow label.
· Input or output interface.
IPv6 NetStream architecture
A typical IPv6 NetStream system includes the following elements:
· NetStream data exporter—A device configured with IPv6 NetStream. The NDE provides the following functions:
¡ Classifies traffic flows by using the 8-tuple elements.
¡ Collects data from the classified flows.
¡ Aggregates and exports the data to the NSC.
· NetStream collector—A program running in a Unix or Windows operating system. The NSC parses the packets received from the NDEs, and saves the data to its database.
· NetStream data analyzer—A network traffic analyzing tool. Based on the data in NSC, the NDA generates reports for traffic billing, network planning, and attack detection and monitoring. The NDA can collect data from multiple NSCs. Typically, the NDA features a Web-based system for easy operation.
NSC and NDA are typically integrated into a NetStream server.
Figure 1 IPv6 NetStream system
IPv6 NetStream flow aging
IPv6 NetStream uses flow aging to enable the NDE to export IPv6 NetStream data to NetStream servers. IPv6 NetStream creates an IPv6 NetStream entry for each flow for storing the flow statistics in the cache.
When a flow is aged out, the NDE performs the following operations:
· Exports the summarized data to NetStream servers in a specific format.
· Clears IPv6 NetStream entry information in the cache.
IPv6 NetStream supports the following flow aging methods:
· Periodical aging.
· Forced aging.
· TCP FIN- and RST-triggered aging.
Periodical aging
Periodical aging uses the following methods:
· Inactive flow aging—A flow is inactive if no packet arrives for the IPv6 NetStream entry within the inactive flow aging timer. When the timer expires, the following events occur:
¡ The inactive flow entry is aged out.
¡ The statistics of the flow are sent to NetStream servers and are cleared in the cache. The statistics can no longer be displayed by using the display ipv6 netstream cache command.
This method ensures that inactive flow entries are cleared from the cache in a timely manner so new entries can be cached.
· Active flow aging—A flow is active if packets arrive for the IPv6 NetStream entry within the active flow aging timer. When the timer expires, the statistics of the active flow are exported to NetStream servers. The device continues to collect its statistics, which can be displayed by using the display ipv6 netstream cache command.
The active flow aging method periodically exports the statistics of active flows to NetStream servers.
Forced aging
To implement forced aging, use one of the following methods:
· Clear the IPv6 NetStream cache immediately. All entries in the cache are aged out and exported to NetStream servers.
· Specify the upper limit for cached entries and configure the system to take either of the following actions when the limit is reached:
¡ Age out the oldest entries.
¡ Disable creation of a new entry in the cache.
TCP FIN- and RST-triggered aging
TCP FIN- and RST-triggered aging is automatically performed when a TCP connection is terminated.
A TCP connection is terminated when a packet with a FIN or RST flag is received.
When a packet with a FIN or RST flag is recorded for a flow with an existing IPv6 NetStream entry, the entry is immediately aged out, exported, and cleared. However, when the first packet of a flow has a FIN or RST flag, a new IPv6 NetStream entry is created instead of being aged out.
TCP FIN- and RST-triggered aging is enabled by default, and is not user-configurable.
IPv6 NetStream data export
Traditional data export
IPv6 NetStream collects the statistics of each flow and exports the statistics to NetStream servers.
This method consumes a lot of bandwidth and CPU usage, and requires a large cache size. In addition, you do not need all of the data in most cases.
Aggregation data export
An IPv6 NetStream aggregation mode merges the flow statistics according to the aggregation criteria of the aggregation mode, and it sends the summarized data to NetStream servers. The IPv6 NetStream aggregation data export uses less bandwidth than the traditional data export.
Table 1 lists the available IPv6 NetStream aggregation modes. In each mode, the system merges multiple flows with the same values for all aggregation criteria into one aggregate flow. The system records the statistics for the aggregate flow. These aggregation modes work independently and can take effect concurrently.
Table 1 IPv6 NetStream aggregation modes
Aggregation mode |
Aggregation criteria |
AS aggregation |
· Source AS number · Destination AS number · Input interface index · Output interface index |
Protocol-port aggregation |
· Protocol number · Source port · Destination port |
Source-prefix aggregation |
· Source AS number · Source mask · Source prefix (source network address) · Input interface index |
Destination-prefix aggregation |
· Destination AS number · Destination mask · Destination prefix (destination network address) · Output interface index |
Source-prefix and destination-prefix aggregation |
· Source AS number · Source mask · Source prefix (source network address) · Input interface index · Destination AS number · Destination mask · Destination prefix (destination network address) · Output interface index |
BGP-nexthop |
· BGP next hop · Output interface index |
If IPv6 packets are not forwarded according to the BGP routing table, the AS number or BGP next hop cannot be obtained.
IPv6 NetStream data export format
IPv6 NetStream exports data in the version 9 or version 10 format.
Both formats are template-based and support exporting the IPv6 NetStream aggregation data and collecting statistics about BGP next hop and MPLS packets.
The version 10 export format is compliant with the IPFIX standard.
IPv6 NetStream mirroring
IPv6 NetStream mirroring copies packets that pass through the device to an IPv6 NetStream module for collecting traffic statistics. The forwarding performance of the device is not affected.
IPv6 NetStream mirroring has the following types:
· IPv6 NetStream flow mirroring—Copies the packets that meet specific QoS match criteria to an IPv6 NetStream module.
· IPv6 NetStream port mirroring—Copies the packets passing through an interface to an IPv6 NetStream module.
IPv6 NetStream sampling
IPv6 NetStream sampling collects statistics on fewer packets and is useful when the network has a large amount of traffic. IPv6 NetStream on sampled traffic lessens the impact on the device's performance. For more information about sampling, see "Configuring samplers."
Protocols and standards
RFC 5101, Specification of the IP Flow Information Export (IPFIX) Protocol for the Exchange of IP Traffic Flow Information
Restrictions and guidelines: NetStream
NetStream flow mirroring
The device supports inbound, outbound, and sampled NetStream flow mirroring. For NetStream sampling to operate correctly, configure the same sampling rate calculation method for the samplers used by NetStream flow mirroring.
For the mirroring configuration to take effect, you must specify the sampler sampler-name option in the mirror-to command if you use the command to mirror inbound or outbound traffic on specified cards.
NetStream flow mirroring supports mirroring traffic only to the local interface module you access.
NetStream port mirroring
Only Layer 2 and Layer 3 Ethernet interfaces on the following cards support NetStream port mirroring. For NetStream sampling to operate correctly, configure the same sampling rate calculation method for the samplers used by NetStream port mirroring.
Card category |
Cards |
CEPC |
CEPC-XP4LX, CEPC-XP24LX, CEPC-XP48RX, CEPC-CP4RX, CEPC-CP4RXA, CEPC-CP4RX-L, CEPC-CQ8L, CEPC-CQ8LA, CEPC-CQ8L1A, CEPC-CQ8L3A, CEPC-CQ16L1, CEPC-DQ2L1-G |
CSPEX |
CSPEX-1304X, CSPEX-1404X, CSPEX-1502X, CSPEX-1504X, CSPEX-1504XA, CSPEX-1602X, CSPEX-1602XA, CSPEX-1804X, CSPEX-1512X, CSPEX-1612X, CSPEX-1812X, CSPEX-1502XA, CSPEX-1802X, CSPEX-1802XA, CSPEX-1812X-E, CSPEX-2304X-G, CSPEX-2304X-LG, CSPEX-2612XA, CSPEX-2612X3A |
SPE |
RX-SPE200, RX-SPE200-E |
Only POS interfaces, serial interfaces, MP-group interfaces, HDLC link bundle interfaces, ATM interfaces and their subinterfaces, and Layer 3 Ethernet subinterfaces on the following cards support NetStream port mirroring. For NetStream sampling to operate correctly, configure the same sampling rate calculation method for the samplers used by NetStream port mirroring.
Card category |
Cards |
CEPC |
CEPC-CQ8L, CEPC-CQ8LA, CEPC-CQ8L1A, CEPC-CQ8L3A, CEPC-CQ16L1, CEPC-DQ2L1-G |
CSPEX |
CSPEX-1502XA, CSPEX-1802X, CSPEX-1802XA, CSPEX-1812X-E, CSPEX-2304X-G, CSPEX-2304X-LG, CSPEX-2612XA, CSPEX-2612X3A |
SPE |
RX-SPE200-E |
NetStream sampling supports the following methods:
· User-based NetStream sampling.
To configure user-based NetStream sampling, use the authorization-attribute netstream-sampler or aaa authorize user-name netstream-sampler command. For more information about the commands, see AAA commands in BRAS Services Command Reference.
· Port mirroring sampling.
· Flow mirroring sampling.
NetStream sampling follows these guidelines:
· For the following cards, if you configure multiple types of sampling methods on an interface, all the methods take effect.
Card category |
Cards |
CEPC |
CEPC-CQ8L, CEPC-CQ8LA, CEPC-CQ8L1A, CEPC-CQ8L3A, CEPC-CQ16L1, CEPC-DQ2L1-G |
CSPEX |
CSPEX-1502XA, CSPEX-1802X, CSPEX-1802XA, CSPEX-1812X-E, CSPEX-2304X-G, CSPEX-2304X-LG, CSPEX-2612XA, CSPEX-2612X3A |
SPE |
RX-SPE200-E |
· For the following cards, the above-mentioned sampling methods are in descending order of priority. If you configure multiple sampling methods on an interface, the sampling method with the highest priority takes effect.
Card category |
Cards |
CEPC |
CEPC-XP4LX, CEPC-XP24LX, CEPC-XP48RX, CEPC-CP4RX, CEPC-CP4RXA, CEPC-CP4RX-L |
CSPEX |
CSPEX-1304X, CSPEX-1404X, CSPEX-1502X, CSPEX-1504X, CSPEX-1504XA, CSPEX-1602X, CSPEX-1602XA, CSPEX-1804X, CSPEX-1512X, CSPEX-1612X, CSPEX-1812X |
SPE |
RX-SPE200 |
· If a QoS policy with a redirect-to-CPU action is applied to the outbound direction of an interface, the NetStream sampling does not take effect on packets matching the QoS action.
· The device supports NetStream only in the outbound direction on an MPLS TE tunnel interface.
· NetStream sampling does not collect statistics for the outbound direction of specific interfaces on the following cards when the interfaces send data packets (such as NQA probe packets and ICMP packets). Such interfaces include VLAN interfaces, Layer 3 aggregate interfaces, Layer 3 aggregate subinterfaces, Layer 3 Ethernet interfaces, and Layer 3 Ethernet subinterfaces.
Card category |
Cards |
CEPC |
CEPC-XP4LX, CEPC-XP24LX, CEPC-XP48RX, CEPC-CP4RX, CEPC-CP4RXA, CEPC-CP4RX-L, CEPC-CQ8L, CEPC-CQ8LA, CEPC-CQ8L1A, CEPC-CQ8L3A, CEPC-CQ16L1, CEPC-DQ2L1-G |
CSPEX |
CSPEX-1304X, CSPEX-1404X, CSPEX-1502X, CSPEX-1504X, CSPEX-1504XA, CSPEX-1602X, CSPEX-1602XA, CSPEX-1804X, CSPEX-1512X, CSPEX-1612X, CSPEX-1812X, CSPEX-1502XA, CSPEX-1802X, CSPEX-1802XA, CSPEX-1812X-E, CSPEX-2304X-G, CSPEX-2304X-LG, CSPEX-2612XA, CSPEX-2612X3A |
SPE |
RX-SPE200, RX-SPE200-E |
IPv6 NetStream tasks at a glance
To configure IPv6 NetStream flow mirroring, perform the following tasks:
1. Enabling IPv6 NetStream (system view)
2. (Optional.) Enabling IPv6 NetStream for an SRv6 TE policy
3. (Optional.) Enabling archiving of cached IPv6 NetStream entries
4. Configuring IPv6 NetStream mirroring
5. (Optional.) Configuring the RFC 7011 IPv6 NetStream template format
6. (Optional.) Configuring the IPv6 NetStream data export format
7. (Optional.) Configuring the refresh rate for IPv6 NetStream version 9 or version 10 template
8. (Optional.) Configuring MPLS-aware IPv6 NetStream
9. (Optional.) Enabling IPv6 NetStream statistics collection for the payload packets in SRv6-tunneled packets
10. (Optional.) Configuring IPv6 NetStream flow aging
¡ Configuring periodical flow aging
¡ Configuring forced flow aging
11. Configuring the IPv6 NetStream data export
a. Configuring the IPv6 NetStream traditional data export
b. (Optional.) Configuring the IPv6 NetStream aggregation data export
To configure IPv6 NetStream port mirroring, perform the following tasks:
12. Enabling IPv6 NetStream (interface view)
13. (Optional.) Enabling IPv6 NetStream for an SRv6 TE policy
14. (Optional.) Enabling archiving of cached IPv6 NetStream entries
15. (Optional.) Configuring IPv6 NetStream
¡ Configuring IPv6 NetStream sampling rate
¡ Configuring standard mode for IPv6 NetStream sampling
16. (Optional.) Configuring the RFC 7011 IPv6 NetStream template format
17. (Optional.) Configuring the IPv6 NetStream data export format
18. (Optional.) Configuring the refresh rate for IPv6 NetStream version 9 or version 10 template
19. (Optional.) Configuring MPLS-aware IPv6 NetStream
20. (Optional.) Enabling IPv6 NetStream statistics collection for the payload packets in SRv6-tunneled packets
21. (Optional.) Configuring IPv6 NetStream flow aging
¡ Configuring periodical flow aging
¡ Configuring forced flow aging
22. Configuring the IPv6 NetStream data export
a. Configuring the IPv6 NetStream traditional data export
b. (Optional.) Configuring the IPv6 NetStream aggregation data export
Enabling IPv6 NetStream (system view)
Restrictions and guidelines
IPv6 NetStream in system view takes effect after IPv6 NetStream mirroring is configured.
Procedure
1. Enter system view.
system-view
2. Enable IPv6 NetStream.
ipv6 netstream
By default, IPv6 NetStream is disabled.
Enabling IPv6 NetStream (interface view)
Restrictions and guidelines
Do not enable IPv6 NetStream on an interface that has been assigned to an MP group or HDLC link bundle.
You can enable both IPv4 and IPv6 NetStream on an interface. If you enable both IPv4 and IPv6 NetStream on an interface, either specify the main keyword or do not specify it for both IPv4 and IPv6 NetStream simultaneously. To change the configuration of main keyword, first disable NetStream. Enable NetStream again after the configuration change.
If you do not specify the main keyword, you cannot enable IPv6 NetStream on both a main interface and its subinterfaces.
The main keyword is available only for Layer 3 Ethernet interfaces and ATM interfaces on the following cards:
Card category |
Cards |
CEPC |
CEPC-CQ8L, CEPC-CQ8LA, CEPC-CQ8L1A, CEPC-CQ8L3A, CEPC-CQ16L1, CEPC-DQ2L1-G |
CSPEX |
CSPEX-1502XA, CSPEX-1802X, CSPEX-1802XA, CSPEX-1812X-E, CSPEX-2304X-G, CSPEX-2304X-LG, CSPEX-2612XA, CSPEX-2612X3A |
SPE |
RX-SPE200-E |
Procedure
1. Enter system view.
system-view
2. Enter interface view.
interface interface-type interface-number
3. Enable IPv6 NetStream.
ipv6 netstream { inbound | outbound } [ main ]
By default, IPv6 NetStream is disabled.
Enabling IPv6 NetStream for an SRv6 TE policy
About this task
Perform this task on the ingress node for an SRv6 TE policy to enable IPv6 NetStream to collect statistics about the outgoing traffic forwarded based on that SRv6 TE policy. For more information about SRv6 TE policies, see Segment Routing Configuration Guide.
Restrictions and guidelines
Global IPv6 NetStream configuration does not take effect on IPv6 NetStream based on an SRv6 TE policy.
Procedure
1. Enter system view.
system-view
2. Enable IPv6 NetStream for an SRv6 TE policy.
ipv6 netstream outbound srv6-policy end-point ipv6 ipv6-address color color-value
By default, IPv6 NetStream is disabled for an SRv6 TE policy.
Enabling archiving of cached IPv6 NetStream entries
About this task
By default, archiving of cached IPv6 NetStream entries is disabled. IPv6 NetStream entries are cleared from the cache after they are exported to NetStream servers. You cannot view the exported IPv6 NetStream entry information.
This feature archives the cached IPv6 NetStream entries in binary format to a local file named netstream6.log when the entries are exported to NetStream servers. You can view the archived NetStream entries by using the display ipv6 netstream cache archive command.
If not enough storage space is available for archiving a new IPv6 NetStream entry, the system will overwrite the earliest entry with the new entry.
Restrictions and guidelines
This feature is applicable when a small number of IPv6 NetStream entries exist and no log server exists. If the device generates a large number of IPv6 NetStream entries, do not enable this feature. Otherwise, the device performance will be affected.
Procedure
1. Enter system view.
system-view
2. Enable archiving of cached NetStream entries.
ipv6 netstream cache archive enable
By default, archiving of cached IPv6 NetStream entries is disabled.
Configuring IPv6 NetStream mirroring
Configuring IPv6 NetStream flow mirroring
1. Enter system view.
system-view
2. Create a traffic class and enter traffic class view.
traffic classifier classifier-name [ operator { and | or } ]
3. Define a match criterion.
if-match [ not ] match-criteria
For more information about this command, see the QoS commands in ACL and QoS Command Reference.
4. Return to system view.
quit
5. Create a traffic behavior and enter traffic behavior view.
traffic behavior behavior-name
6. Configure a mirroring action for the traffic behavior. Choose the options to configure as needed:
¡ Mirror traffic to a slot.
In standalone mode:
mirror-to slot slot-number [ sampler sampler-name ]
In IRF mode:
mirror-to chassis chassis-number slot slot-number [ sampler sampler-name ]
By default, no mirroring actions are configured to mirror traffic to a slot.
For more information about these commands, see the mirroring commands in Network Management and Monitoring Command Reference.
¡ Mirror traffic to the slot where the traffic was received or sent out.
mirror-to local [ sampler sampler-name ]
By default, no mirroring actions are configured to mirror traffic to the slot where the traffic was received or sent out.
For more information about the mirror-to local command, see the mirroring commands in Network Management and Monitoring Command Reference.
7. Return to system view.
quit
8. Create a QoS policy and enter QoS policy view.
qos policy policy-name
By default, no QoS policy is configured.
9. Associate the traffic behavior with the traffic class in the QoS policy.
classifier classifier-name behavior behavior-name [ mode qppb-manipulation | insert-before before-classifier-name ] *
10. Apply the QoS policy.
For information about applying a QoS policy, see the QoS configuration in ACL and QoS Configuration Guide.
Support for QoS policy application depends on the device model.
Configuring IPv6 NetStream sampling settings
Configuring IPv6 NetStream sampling rate
Restrictions and guidelines
By default, IPv6 NetStream collects all data of target flows. If the flow traffic is heavy, IPv6 NetStream is resource-consuming and can cause high CPU usage, which impacts the device forwarding performance. IPv6 NetStream sampling is helpful to decrease the IPv6 NetStream traffic volume. If the collected statistics can basically reflect the network status, you can enable this feature and set a proper sampling rate. As a best practice, set the sampling rate to 1024. The higher the sampling rate, the less impact on device performance.
Procedure
1. Enter system view.
system-view
2. Create a sampler.
For more information about samplers, see "Configuring samplers."
3. Enter interface view.
interface interface-type interface-number
4. Configure the IPv6 NetStream sampler.
ip netstream { inbound | outbound } sampler sampler-name
By default, IPv6 NetStream sampler 1 is used.
Configuring standard mode for IPv6 NetStream sampling
About this task
To reduce the device load, perform this task to release the processor resources that IPv6 NetStream sampling occupies in high-performance mode.
This task takes effect on both IPv4 and IPv6 NetStream.
Restrictions and guidelines
Only the following cards support this feature:
Table 2 Compatible cards
Card type |
Card marks |
CEPC card |
CEPC-XP4LX, CEPC-XP24LX, CEPC-XP48RX, CEPC-CP4RX, CEPC-CP4RXA, CEPC-CP4RX-L, CEPC-CQ8L, CEPC-CQ8LA, CEPC-CQ8L1A, CEPC-CQ8L3A, CEPC-CQ16L1, CEPC-DQ2L1-G |
CSPEX card |
CSPEX-1304X, CSPEX-1404X, CSPEX-1502X, CSPEX-1504X, CSPEX-1504XA, CSPEX-1602X, CSPEX-1602XA, CSPEX-1804X, CSPEX-1512X, CSPEX-1612X, CSPEX-1812X, CSPEX-1502XA, CSPEX-1802X, CSPEX-1802XA, CSPEX-1812X-E, CSPEX-2304X-G, CSPEX-2304X-LG, CSPEX-2612XA, CSPEX-2612X3A |
SPE card |
RX-SPE200, RX-SPE200-E |
Procedure
1. Enter system view.
system-view
2. Switch high-performance mode to standard mode for IPv6 NetStream sampling.
flow standard-mode enable
By default, high-performance mode is enabled for IPv6 NetStream sampling.
For more information about this command, see NetStream configuration in "Configuring NetStream."
Configuring the RFC 7011 IPv6 NetStream template format
About this task
By default, IPv6 NetStream uses the H3C-defined template format to export data. This feature uses the template format defined by the RFC 7011 for data export.
Restrictions and guidelines
The IPv6 NetStream template format on the device must be consistent with that on the server.
Procedure
1. Enter system view.
system-view
2. Configure the IPv6 NetStream template to use the format defined by the RFC 7011.
ip netstream template rfc7011
By default, the IPv6 NetStream template uses the H3C format.
For more information about this command, see the NetStream commands in Network Management and Monitoring Command Reference.
Configuring the IPv6 NetStream data export format
About this task
When you configure the IPv6 NetStream data export format, you can also specify the following settings:
· Whether or not to export the BGP next hop and serial number information.
· How to export the autonomous system (AS) information: origin-as or peer-as.
¡ origin-as—Records the original AS numbers for the flow source and destination.
¡ peer-as—Records the peer AS numbers for the flow source and destination.
For example, as shown in Figure 2, a flow starts at AS 20, passes AS 21 through AS 23, and then reaches AS 24. IPv6 NetStream is enabled on the device in AS 22.
· Specify the origin-as keyword to export AS 20 as the source AS and AS 24 as the destination AS.
· Specify the peer-as keyword to export AS 21 as the source AS and AS 23 as the destination AS.
Figure 2 Recorded AS information varies by different keyword configurations
Procedure
1. Enter system view.
system-view
2. Configure the IPv6 NetStream data export format, and configure the AS, BGP next hop, and serial number export attributes.
¡ Configure the version 9 format.
ipv6 netstream export version 9 { origin-as | peer-as } [ bgp-nexthop ] [ serial-number ]
¡ Configure the version 10 format.
ipv6 netstream export version 10 [ origin-as | peer-as ] [ bgp-nexthop ] [ serial-number ]
By default:
¡ The version 9 format is used to export IPv6 NetStream data.
¡ The peer AS numbers for the flow source and destination are exported.
¡ The BGP next hop and serial number information is not exported.
Configuring the refresh rate for IPv6 NetStream version 9 or version 10 template
About this task
Version 9 and version 10 are template-based and support user-defined formats. An IPv6 NetStream device must send the updated template to NetStream servers regularly, because the servers do not permanently save templates.
For a NetStream server to use the correct version 9 or version 10 template, configure the time-based or packet count-based refresh rate. If both settings are configured, the template is sent when either of the conditions is met.
Procedure
1. Enter system view.
system-view
2. Configure the refresh rate for the IPv6 NetStream version 9 or version 10 template.
ipv6 netstream export template refresh-rate { packet packets | time minutes }
By default, the packet count-based refresh rate is 20 packets, and the time-based refresh interval is 30 minutes.
Configuring MPLS-aware IPv6 NetStream
About this task
An MPLS flow is identified by the same labels in the same position and the same 8-tuple elements. MPLS-aware NetStream collects and exports statistics on a maximum of three labels in the label stack, with or without IP fields.
Procedure
1. Enter system view.
system-view
2. Collect and export statistics on MPLS packets.
ip netstream mpls [ label-positions label-position1 [ label-position2 [ label-position3 ] ] ] [ no-ip-fields ]
By default, statistics of MPLS packets are not collected or exported.
Enabling IPv6 NetStream statistics collection for the payload packets in SRv6-tunneled packets
About this task
This feature enables IPv6 NetStream to collect statistics about the source IPv6 address, destination IPv6 address, protocol number, source port number, and destination port number of the payload packets in SRv6-tunneled packets. If you disable the feature, IPv6 NetStream collects statistics about the source IPv6 address, destination IPv6 address, protocol number, source port number, and destination port number of the outer header packets in SRv6-tunneled packets
Procedure
1. Enter system view.
system-view
2. Enable IPv6 NetStream statistics collection for the payload packets in SRv6-tunneled packets.
ipv6 netstream srv6 inner-packet
By default, IPv6 NetStream statistics collection is enabled for the payload packets in SRv6-tunneled packets.
Configuring IPv6 NetStream flow aging
Configuring periodical flow aging
1. Enter system view.
system-view
2. Set the aging timer for active flows.
ipv6 netstream timeout active minutes
By default, the aging timer is 30 minutes for active flows.
3. Set the aging timer for inactive flows.
ipv6 netstream timeout inactive seconds
By default, the aging timer is 30 seconds for inactive flows.
Configuring forced flow aging
1. Enter system view.
system-view
2. Set the upper limit for cached entries and specify the processing method when the limit is reached.
ipv6 netstream max-entry { max-entries | aging | disable-caching }
By default, a maximum of 2048000 IPv6 NetStream entries can be cached. The system will age out the oldsest entries when the number of caches entries reaches the upper limit.
3. Return to user view.
quit
4. Clear the cache, including the cached IPv6 NetStream entries and the related statistics.
reset ipv6 netstream statistics
Configuring the IPv6 NetStream data export
Configuring the IPv6 NetStream traditional data export
1. Enter system view.
system-view
2. Specify a destination host for IPv6 NetStream traditional data export.
In standalone mode:
ipv6 netstream export host { ipv4-address | ipv6-address } udp-port [ vpn-instance vpn-instance-name ] [ dscp dscp-value ] [ slot slot-number [ cpu cpu-number ] ]
In IRF mode:
ipv6 netstream export host { ipv4-address | ipv6-address } udp-port [ vpn-instance vpn-instance-name ] [ dscp dscp-value ] [ chassis chassis-number slot slot-number [ cpu cpu-number ] ]
By default, no destination host is specified.
3. (Optional.) Specify the source interface for IPv6 NetStream data packets sent to the NetStream servers.
ipv6 netstream export source interface interface-type interface-number
By default, no source interface is specified for IPv6 NetStream data packets. The packets take the IPv6 address of the output interface (interface that is connected to the NetStream server) as the source IPv6 address.
As a best practice, connect the management Ethernet interface to a NetStream server, and configure the interface as the source interface.
4. (Optional.) Limit the IPv6 NetStream data export rate.
ipv6 netstream export rate rate
By default, the data export rate is not limited.
Configuring the IPv6 NetStream aggregation data export
About this task
IPv6 NetStream aggregation merges the flow statistics according to the aggregation mode criteria, and stores the data in the cache. When an aggregation entry is aged out, the data is exported. For each IPv6 NetStream aggregation mode, you can specify different NetStream servers for IPv6 NetStream aggregation data export.
IPv6 NetStream aggregation data export requires less bandwidth for exporting IPv6 NetStream packets to NetStream servers.
Restrictions and guidelines
Configurations in IPv6 NetStream aggregation mode view apply only to the IPv6 NetStream aggregation data export. Configurations in system view apply to the IPv6 NetStream traditional data export. When no configuration in IPv6 NetStream aggregation mode view is provided, the configurations in system view apply to the IPv6 NetStream aggregation data export.
Procedure
1. Enter system view.
system-view
2. Specify an IPv6 NetStream aggregation mode and enter its view.
ipv6 netstream aggregation { as | bgp-nexthop | destination-prefix | prefix | protocol-port | source-prefix }
By default, no IPv6 NetStream aggregation mode is specified.
3. Enable the IPv6 NetStream aggregation mode.
enable
By default, the IPv6 NetStream aggregation is disabled.
4. Specify a destination host for IPv6 NetStream aggregation data export.
ipv6 netstream export host { ipv4-address | ipv6-address } udp-port [ vpn-instance vpn-instance-name ] [ dscp dscp-value ]
By default, no destination host is specified.
If you expect only IPv6 NetStream aggregation data, specify the destination host only in the related IPv6 NetStream aggregation mode view.
5. (Optional.) Specify the source interface for IPv6 NetStream data packets sent to the NetStream servers.
ipv6 netstream export source interface interface-type interface-number
By default, no source interface is specified for IPv6 NetStream data packets. The packets take the IPv6 address of the output interface as the source IPv6 address.
You can configure different source interfaces in different IPv6 NetStream aggregation mode views.
If no source interface is configured in IPv6 NetStream aggregation mode view, the source interface configured in system view applies.
Display and maintenance commands for IPv6 NetStream
Execute display commands in any view and reset commands in user view.
Task |
Command |
Display IPv6 NetStream entry information. |
In standalone mode: display ipv6 netstream cache [ verbose ] [ type { ip | ipl2 | l2 | mpls [ label-position1 label-value1 [ label-position2 label-value2 [ label-position3 label-value3 ] ] ] } ] [ destination destination-ip | destination-port destination-port | interface interface-type interface-number | protocol protocol | source source-ip | source-port source-port ] * [ arrived-time start-date start-time end-date end-time ] [ slot slot-number [ cpu cpu-number ] ] In IRF mode: display ipv6 netstream cache [ verbose ] [ type { ip | ipl2 | l2 | mpls [ label-position1 label-value1 [ label-position2 label-value2 [ label-position3 label-value3 ] ] ] } ] [ destination destination-ip | destination-port destination-port | interface interface-type interface-number | protocol protocol | source source-ip | source-port source-port ] * [ arrived-time start-date start-time end-date end-time ] [ chassis chassis-number slot slot-number [ cpu cpu-number ] ] |
Display the locally archived IPv6 NetStream entries. |
In standalone mode: display ipv6 netstream cache archive [ verbose ] [ type { ip | ipl2 | l2 | mpls [ label-position1 label-value1 [ label-position2 label-value2 [ label-position3 label-value3 ] ] ] } ] [ destination destination-ip | destination-port destination-port | interface interface-type interface-number | protocol protocol | source source-ip | source-port source-port ] * [ arrived-time start-date start-time end-date end-time ] [ slot slot-number [ cpu cpu-number ] ] In IRF mode: display ipv6 netstream cache archive [ verbose ] [ type { ip | ipl2 | l2 | mpls [ label-position1 label-value1 [ label-position2 label-value2 [ label-position3 label-value3 ] ] ] } ] [ destination destination-ip | destination-port destination-port | interface interface-type interface-number | protocol protocol | source source-ip | source-port source-port ] * [ arrived-time start-date start-time end-date end-time ] [ chassis chassis-number slot slot-number [ cpu cpu-number ] ] |
Display information about the IPv6 NetStream data export. |
In standalone mode: display ipv6 netstream export [ slot slot-number [ cpu cpu-number ] ] In IRF mode: display ipv6 netstream export [ chassis chassis-number slot slot-number [ cpu cpu-number ] ] |
Display IPv6 NetStream template information. |
In standalone mode: display ipv6 netstream template [ slot slot-number [ cpu cpu-number ] ] In IRF mode: display ipv6 netstream template [ chassis chassis-number slot slot-number [ cpu cpu-number ] ] |
Age out, export all IPv6 NetStream data, and clear the cache. |
reset ipv6 netstream statistics |
IPv6 NetStream configuration examples
Example: Configuring IPv6 NetStream traditional data export (IPv6 NetStream flow mirroring)
Network configuration
As shown in Figure 3, configure IPv6 NetStream on Router A to collect statistics on packets passing through Router A.
· Enable IPv6 NetStream for incoming traffic on Ten-GigabitEthernet 3/1/1.
· Configure Router A to export the IPv6 NetStream traditional data to UDP port 5000 of the NetStream server.
· Configure fixed sampling in the inbound direction of Ten-GigabitEthernet 3/1/1 and set the sampling rate to 8.
Procedure
# Assign an IP address to each interface, as shown in Figure 3. (Details not shown.)
# Configure sample 1 in fixed sampling mode, and set the sampling rate to 8.
<RouterA> system-view
[RouterA] sampler samp1 mode fixed packet-interval n-power 8
# Enable IPv6 NetStream globally.
[RouterA] ipv6 netstream
# Configure a QoS policy to mirror all IPv6 traffic to slot 3 by using the sampler samp1.
[RouterA] acl ipv6 advanced 3000
[RouterA-acl-ipv6-adv-3000] rule 0 permit ipv6
[RouterA-acl-ipv6-adv-3000] quit
[RouterA] traffic classifier ns_ipv6
[RouterA-classifier-ns_ipv6] if-match acl ipv6 3000
[RouterA-classifier-ns_ipv6] quit
[RouterA] traffic behavior ns_ipv6
[RouterA-behavior-ns_ipv6] mirror-to slot 3 sampler samp1
[RouterA-behavior-ns_ipv6] quit
[RouterA] qos policy ns_ipv6
[RouterA-qospolicy-ns_ipv6] classifier ns_ipv6 behavior ns_ipv6
[RouterA-qospolicy-ns_ipv6] quit
# Apply the QoS policy to the inbound direction of Ten-GigabitEthernet 3/1/1.
[RouterA] interface ten-gigabitethernet 3/1/1
[RouterA-Ten-GigabitEthernet 3/1/1] qos apply policy ns ipv6 inbound
[RouterA-Ten-GigabitEthernet 3/1/1] quit
# Specify 40::1 as the IP address of the destination host and UDP port 5000 as the export destination port number.
[RouterA] ipv6 netstream export host 40::1 5000
Verifying the configuration
# Display information about IPv6 NetStream entries.
[RouterA] display ipv6 netstream cache
IPv6 NetStream cache information:
Active flow timeout : 30 min
Inactive flow timeout : 30 sec
Max number of entries : 1331200
IPv6 active flow entries : 2
MPLS active flow entries : 0
IPL2 active flow entries : 0
IPv6 flow entries counted : 3
MPLS flow entries counted : 0
IPL2 flow entries counted : 0
Last statistics resetting time : Never
IPv6 packet size distribution (46 packets in total):
1-32 64 96 128 160 192 224 256 288 320 352 384 416 448 480
.000 .413 .434 .000 .152 .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
------------------------------------------------------------------------------
IP-other 1 0 0 12 21 30
UDP-other 2 0 0 3 15 30
Type DstIP(Port) SrcIP(Port) Pro TC FlowLbl If(Direct) Pkts
DstMAC(VLAN) SrcMAC(VLAN)
TopLblType(IP/MASK)Lbl-Exp-S-List
------------------------------------------------------------------------------
IP 40::1(23) 10::2(1746) 6 0 0x0 GE3/1/1(I) 23
IP 40::1(32768) 10::2(0) 58 0 0x0 GE3/1/1(I) 4
# Display information about the IPv6 NetStream data export.
[RouterA] display ipv6 netstream export
IPv6 export information:
Flow source interface : Not specified
Flow destination VPN instance : Not specified
Flow destination IPv6 address (UDP) : 40::1 (5000)
Version 9 exported flow number : 4
Version 9 exported UDP datagram number (failed): 4 (0)
Version 10 exported flow number : 0
Version 10 exported UDP datagram number (failed): 0 (0)
Example: Configuring IPv6 NetStream traditional data export (IPv6 NetStream port mirroring)
Network configuration
As shown in Figure 4, all routers in the network are running IPv6 EBGP. Configure IPv6 NetStream on Router A to meet the following requirements:
· Enable IPv6 NetStream for incoming traffic on Ten-GigabitEthernet 3/1/1.
· Configure the router to export IPv6 NetStream traditional data to UDP port 5000 of the NetStream server.
· Configure fixed sampling in the inbound direction of Ten-GigabitEthernet 3/1/1 and set the sampling rate to 8.
Procedure
# Assign an IP address to each interface, as shown in Figure 4. (Details not shown.)
# Configure sample 1 in fixed sampling mode, and set the sampling rate to 8.
<RouterA> system-view
[RouterA] sampler samp1 mode fixed packet-interval n-power 8
# Enable IPv6 NetStream for incoming traffic on Ten-GigabitEthernet 3/1/1.
[RouterA] interface ten-gigabitethernet 3/1/1
[RouterA-Ten-GigabitEthernet 3/1/1] ipv6 netstream inbound
# Use sampler 1 for inbound IPv6 NetStream sampling on Ten-GigabitEthernet 3/1/1.
[RouterA-Ten-GigabitEthernet 3/1/1] ip netstream inbound sampler samp1
[RouterA-Ten-GigabitEthernet 3/1/1] quit
# Specify 40::1 as the IP address of the destination host and UDP port 5000 as the export destination port number.
[RouterA] ipv6 netstream export host 40::1 5000
Verifying the configuration
# Display information about the IPv6 NetStream data export.
[RouterA] display ipv6 netstream cache
IPv6 NetStream cache information:
Active flow timeout : 30 min
Inactive flow timeout : 30 sec
Max number of entries : 1638400
IPv6 active flow entries : 2
MPLS active flow entries : 0
IPL2 active flow entries : 0
IPv6 flow entries counted : 0
MPLS flow entries counted : 0
IPL2 flow entries counted : 0
Last statistics resetting time : Never
IPv6 packet size distribution (1103746 packets in total):
1-32 64 96 128 160 192 224 256 288 320 352 384 416 448 480
.249 .694 .000 .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 .027 .000 .027 .000 .000 .000 .000 .000 .000 .000
Protocol Total Packets Flows Packets Active(sec) Idle(sec)
Flows /sec /sec /flow /flow /flow
--------------------------------------------------------------------------
TCP-Telnet 2656855 372 4 86 49 27
TCP-FTP 5900082 86 9 9 11 33
TCP-FTPD 3200453 1006 5 193 45 33
TCP-WWW 546778274 11170 887 12 8 32
TCP-other 49148540 3752 79 47 30 32
UDP-DNS 117240379 570 190 3 7 34
UDP-other 45502422 2272 73 30 8 37
ICMP 14837957 125 24 5 12 34
IP-other 77406 5 0 47 52 27
Type DstIP(Port) SrcIP(Port) Pro TC FlowLbl If(Direct) Pkts
DstMAC(VLAN) SrcMAC(VLAN)
TopLblType(IP/MASK)Lbl-Exp-S-List
--------------------------------------------------------------------------
IP 2001::1(1024) 2002::1(21) 6 0 0x0 GE3/1/1(I) 42996
# Display information about the IPv6 NetStream data export.
[RouterA] display ipv6 netstream export
IPv6 export information:
Flow source interface : Not specified
Flow destination VPN instance : Not specified
Flow destination IPv6 address (UDP) : 40::1 (5000)
Version 9 exported flow number : 10
Version 9 exported UDP datagram number (failed) : 10 (0)
Version 10 exported flow number : 0
Version 10 exported UDP datagram number (failed): 0 (0)
Example: Configuring IPv6 NetStream aggregation data export (IPv6 NetStream flow mirroring)
Network configuration
As shown in Figure 5, all routers in the network are running IPv6 EBGP. Configure IPv6 NetStream on the router to meet the following requirements:
· Export the IPv6 NetStream traditional data to port 5000 of the IPv6 NetStream server.
· Perform the IPv6 NetStream aggregation in the modes of AS, protocol-port, source-prefix, destination-prefix, and prefix.
· Export the aggregation data of different modes to UDP ports 2000, 3000, 4000, 6000, and 7000 on the IPv6 NetStream server.
· Collect incoming traffic statistics on Ten-GigabitEthernet 3/1/1.
· Configure fixed sampling in the inbound direction of Ten-GigabitEthernet 3/1/1and set the sampling rate to 8.
Restrictions and guidelines
Make sure the routers are reachable before configuring the following procedures.
Procedure
# Assign an IP address to each interface, as shown in Figure 5. (Details not shown.)
# Configure sampler samp1 in fixed sampling mode, and set the sampling rate to 8.
<RouterA> system-view
[RouterA] sampler samp1 mode fixed packet-interval n-power 8
# Enable IPv6 NetStream globally.
[RouterA] ipv6 netstream
# Configure a QoS policy to mirror all IPv6 traffic to slot 3 by using the sampler samp1.
[RouterA] acl ipv6 advanced 3000
[RouterA-acl-ipv6-adv-3000] rule 0 permit ipv6
[RouterA-acl-ipv6-adv-3000] quit
[RouterA] traffic classifier ns_ipv6
[RouterA-classifier-ns_ipv6] if-match acl ipv6 3000
[RouterA-classifier-ns_ipv6] quit
[RouterA] traffic behavior ns_ipv6
[RouterA-behavior-ns_ipv6] mirror-to slot 3 sampler samp1
[RouterA-behavior-ns_ipv6] quit
[RouterA] qos policy ns_ipv6
[RouterA-qospolicy-ns_ipv6] classifier ns_ipv6 behavior ns_ipv6
[RouterA-qospolicy-ns_ipv6] quit
# Apply the QoS policy to the inbound direction of Ten-GigabitEthernet 3/1/1.
[RouterA] interface ten-gigabitethernet 3/1/1
[RouterA-Ten-GigabitEthernet 3/1/1] qos apply policy ns_ipv6 inbound
[RouterA-Ten-GigabitEthernet 3/1/1] quit
# Specify 40::1 as the IP address of the destination host and UDP port 5000 as the export destination port number.
[RouterA] ipv6 netstream export host 40::1 5000
# Set the aggregation mode to AS, and specify the destination host for the aggregation data export.
[RouterA] ipv6 netstream aggregation as
[RouterA-ns6-aggregation-as] enable
[RouterA-ns6-aggregation-as] ipv6 netstream export host 40::1 2000
[RouterA-ns6-aggregation-as] quit
# Set the aggregation mode to protocol-port, and specify the destination host for the aggregation data export.
[RouterA] ipv6 netstream aggregation protocol-port
[RouterA-ns6-aggregation-protport] enable
[RouterA-ns6-aggregation-protport] ipv6 netstream export host 40::1 3000
[RouterA-ns6-aggregation-protport] quit
# Set the aggregation mode to source-prefix, and specify the destination host for the aggregation data export.
[RouterA] ipv6 netstream aggregation source-prefix
[RouterA-ns6-aggregation-srcpre] enable
[RouterA-ns6-aggregation-srcpre] ipv6 netstream export host 40::1 4000
[RouterA-ns6-aggregation-srcpre] quit
# Set the aggregation mode to destination-prefix, and specify the destination host for the aggregation data export.
[RouterA] ipv6 netstream aggregation destination-prefix
[RouterA-ns6-aggregation-dstpre] enable
[RouterA-ns6-aggregation-dstpre] ipv6 netstream export host 40::1 6000
[RouterA-ns6-aggregation-dstpre] quit
# Set the aggregation mode to prefix, and specify the destination host for the aggregation data export.
[RouterA] ipv6 netstream aggregation prefix
[RouterA-ns6-aggregation-prefix] enable
[RouterA-ns6-aggregation-prefix] ipv6 netstream export host 40::1 7000
[RouterA-ns6-aggregation-prefix] quit
Verifying the configuration
# Display information about the IPv6 NetStream data export.
[RouterA] display ipv6 netstream export
as aggregation export information:
Flow source interface : Not specified
Flow destination VPN instance : Not specified
Flow destination IPv6 address (UDP) : 40::1 (2000)
Version 9 exported flow number : 1
Version 9 exported UDP datagram number (failed): 1 (0)
Version 10 exported flow number : 0
Version 10 exported UDP datagram number (failed): 0 (0)
protocol-port aggregation export information:
Flow source interface : Not specified
Flow destination VPN instance : Not specified
Flow destination IPv6 address (UDP) : 40::1 (3000)
Version 9 exported flow number : 1
Version 9 exported UDP datagram number (failed): 1 (0)
Version 10 exported flow number : 0
Version 10 exported UDP datagram number (failed): 0 (0)
source-prefix aggregation export information:
Flow source interface : Not specified
Flow destination VPN instance : Not specified
Flow destination IPv6 address (UDP) : 40::1 (4000)
Version 9 exported flow number : 1
Version 9 exported UDP datagram number (failed): 1 (0)
Version 10 exported flow number : 0
Version 10 exported UDP datagram number (failed): 0 (0)
destination-prefix aggregation export information:
Flow source interface : Not specified
Flow destination VPN instance : Not specified
Flow destination IPv6 address (UDP) : 40::1 (6000)
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)
prefix aggregation export information:
Flow source interface : Not specified
Flow destination VPN instance : Not specified
Flow destination IPv6 address (UDP) : 40::1 (7000)
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)
IPv6 export information:
Flow source interface : Not specified
Flow destination VPN instance : Not specified
Flow destination IPv6 address (UDP) : 40::1 (5000)
Version 9 exported flow number : 6
Version 9 exported UDP datagram number (failed): 6 (0)
Version 10 exported flow number : 0
Version 10 exported UDP datagram number (failed): 0 (0)
Example: Configuring IPv6 NetStream aggregation data export (IPv6 NetStream port mirroring)
Network configuration
As shown in Figure 6, all routers in the network are running EBGP. Configure IPv6 NetStream on Router A to meet the following requirements:
· Export IPv6 NetStream traditional data to port 5000 of the IPv6 NetStream server.
· Perform IPv6 NetStream aggregation in the modes of AS, protocol-port, source-prefix, destination-prefix, and prefix.
· Export the aggregation data of different modes to UDP ports 2000, 3000, 4000, 6000, and 7000 on the IPv6 NetStream server.
· Configure fixed sampling in the inbound direction of Ten-GigabitEthernet 3/1/1 and set the sampling rate to 8.
Procedure
# Assign an IP address to each interface, as shown in Figure 6. (Details not shown.)
# Configure sample 1 in fixed sampling mode, and set the sampling rate to 8.
<RouterA> system-view
[RouterA] sampler samp1 mode fixed packet-interval n-power 8
# Enable IPv6 NetStream for incoming traffic on Ten-GigabitEthernet 3/1/1.
[RouterA] interface ten-gigabitethernet 3/1/1
[RouterA-Ten-GigabitEthernet 3/1/1] ipv6 netstream inbound
# Use sampler 1 for inbound IPv6 NetStream sampling on Ten-GigabitEthernet 3/1/1.
[RouterA-Ten-GigabitEthernet 3/1/1] ip netstream inbound sampler samp1
[RouterA-Ten-GigabitEthernet 3/1/1] quit
# Specify 40::1 as the IP address of the destination host and UDP port 5000 as the export destination port number.
[RouterA] ipv6 netstream export host 40::1 5000
# Set the aggregation mode to AS, and specify the destination host for the aggregation data export.
[RouterA] ipv6 netstream aggregation as
[RouterA-ns6-aggregation-as] enable
[RouterA-ns6-aggregation-as] ipv6 netstream export host 40::1 2000
[RouterA-ns6-aggregation-as] quit
# Set the aggregation mode to protocol-port, and specify the destination host for the aggregation data export.
[RouterA] ipv6 netstream aggregation protocol-port
[RouterA-ns6-aggregation-protport] enable
[RouterA-ns6-aggregation-protport] ipv6 netstream export host 40::1 3000
[RouterA-ns6-aggregation-protport] quit
# Set the aggregation mode to source-prefix, and specify the destination host for the aggregation data export.
[RouterA] ipv6 netstream aggregation source-prefix
[RouterA-ns6-aggregation-srcpre] enable
[RouterA-ns6-aggregation-srcpre] ipv6 netstream export host 40::1 4000
[RouterA-ns6-aggregation-srcpre] quit
# Set the aggregation mode to destination-prefix, and specify the destination host for the aggregation data export.
[RouterA] ipv6 netstream aggregation destination-prefix
[RouterA-ns6-aggregation-dstpre] enable
[RouterA-ns6-aggregation-dstpre] ipv6 netstream export host 40::1 6000
[RouterA-ns6-aggregation-dstpre] quit
# Set the aggregation mode to prefix, and specify the destination host for the aggregation data export.
[RouterA] ipv6 netstream aggregation prefix
[RouterA-ns6-aggregation-prefix] enable
[RouterA-ns6-aggregation-prefix] ipv6 netstream export host 40::1 7000
[RouterA-ns6-aggregation-prefix] quit
Verifying the configuration
# Display information about the IPv6 NetStream data export.
[RouterA] display ipv6 netstream export
as aggregation export information:
Flow source interface : Not specified
Flow destination VPN instance : Not specified
Flow destination IPv6 address (UDP) : 40::1 (2000)
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)
protocol-port aggregation export information:
Flow source interface : Not specified
Flow destination VPN instance : Not specified
Flow destination IPv6 address (UDP) : 40::1 (3000)
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)
source-prefix aggregation export information:
Flow source interface : Not specified
Flow destination VPN instance : Not specified
Flow destination IPv6 address (UDP) : 40::1 (4000)
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)
destination-prefix aggregation export information:
Flow source interface : Not specified
Flow destination VPN instance : Not specified
Flow destination IPv6 address (UDP) : 40::1 (6000)
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)
prefix aggregation export information:
Flow source interface : Not specified
Flow destination VPN instance : Not specified
Flow destination IPv6 address (UDP) : 40::1 (7000)
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)
IPv6 export information:
Flow source interface : Not specified
Flow destination VPN instance : Not specified
Flow destination IPv6 address (UDP) : 40::1 (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)