No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

CX11x, CX31x, CX710 (Earlier Than V6.03), and CX91x Series Switch Modules V100R001C10 Configuration Guide 13

The documents describe the configuration of various services supported by the CX11x&CX31x&CX91x series switch modules The description covers configuration examples and function configurations.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configuring the NetStream

Configuring the NetStream

Configuring IPv4 Original Flow Statistics Exporting

After the IPv4 original flow statistics exporting is configured, the NDE collects statistics about IPv4 flows and exports the statistics about each flow to the NetStream server for further analysis.

Pre-configuration Taskss

Before configuring the IPv4 original flow statistics exporting, complete the following tasks:

  • Setting physical parameters of interfaces
  • Setting the link-layer attributes of each interface

Configuration Process

The configuration tasks of IPv4 original flows can be performed in any sequence.

Configuring NetStream Sampling

Context

You can set an interval for sampling packets so that only statistics about sampled packets are collected. The statistics show the flow status on the entire network. The sampling function reduces impact of NetStream on device performance.

Procedure

  1. Run the system-view command to enter the system view.
  2. NetStream sampling can be configured in two ways:

    • Configure NetStream sampling in the system view. The sampling configuration will take effect on all interfaces.

      Run the netstream sampler packet-interval { inbound | outbound } command to configure packet sampling on all interfaces.

      By default, packet sampling is not configured on all interfaces.

    • Configure NetStream sampling in the interface view. The sampling configuration will take effect on this interface.

      1. Run the interface interface-type interface-number command to enter the interface view.

      2. Run the netstream sampler random-packets packet-interval { inbound | outbound } command to configure packet sampling on the interface.

        By default, packet sampling is not configured on interfaces.

        IPv4 packet sampling configured in the system view takes effect on all interfaces on the device. If the function is configured in both the interface view and system view, the configuration in the interface view has priority.

  3. Run the commit command to commit the configuration.

Configuring NetStream Flow Aging

Context

When a NetStream flow is aged out, the device exports the flow statistics in the cache to the NSC.

NetStream flow aging modes include regular aging, FIN- and RST-based aging, byte-based aging, and forced aging. By default, the byte-based aging is enabled.

  • Regular aging

    • Active aging

      Active aging requires the device to periodically export statistics about the flows that persist for a long period. This aging mode is enabled on the device by default, and you only need to set the aging time.

    • Inactive aging

      Inactive aging clears unnecessary entries in the NetStream cache so that the system can fully leverage statistics entries. Inactive aging requires the device to export statistics about the flows that persist for a short period. Once adding packets to a flow stops, the device exports flow statistics to conserve memory space. This aging mode is enabled on the device by default, and you only need to set the aging time.

  • FIN- and RST-based aging

    An FIN or RST flag in a TCP packet indicates the termination of a TCP connection. When receiving a packet with the FIN or RST flag, the device immediately ages out the corresponding NetStream flow. It is recommended that you enable this mode.

  • Forced aging

    Forced aging is used when you require the latest statistics, but you do not satisfy with the existing aging conditions or some flows fail to age out due to an anomaly. You can forcibly age out all the flows in the cache and export the flow statistics.

Procedure

  • Configure regular aging.

    Configure active aging.

    1. Run the system-view command to enter the system view.
    2. Run the netstream timeout ip active active-interval command to set the active aging time of IPv4 flows.

      By default, the active aging time of IPv4 flows is 30 minutes.

    3. Run the commit command to commit the configuration.

    Configure inactive aging.

    1. Run the system-view command to enter the system view.
    2. Run the netstream timeout ip inactive inactive-interval command to set the inactive time of IPv4 flows.

      By default, the inactive aging time of IPv4 flows is 30 seconds.

    3. Run the commit command to commit the configuration.
  • Configure FIN- and RST-based aging.
    1. Run the system-view command to enter the system view.
    2. Run the netstream timeout ip tcp-session command to age NetStream flows according to the FIN or RST flag in the TCP packet header.

      By default, NetStream flows are not aged according to the FIN or RST flag in the TCP packet header.

    3. Run the commit command to commit the configuration.
  • Configure forced aging.
    1. Run the reset netstream cache ip slot slot-id command in the user view to forcibly age out all IPv4 flows on the device.

Configuring NetStream Original Flow Statistics Exporting

Context

Original flow statistics can be exported only when you have specified a source IP address and at least one destination IP address for the exported packets.

Procedure

  1. Run the system-view command to enter the system view.
  2. Run the netstream export ip source { ip-address | ipv6 ipv6-address } command to configure the source IP address for the exported packets carrying IPv4 original flow statistics.

    By default, the source IP address of the exported packets carrying IPv4 original flow statistics is not configured.

    If the source IP address is not specified, packets are not exported. The source address of the exported packets carrying IPv4 original flow statistics can be an IPv4 or IPv6 address. There must be a reachable route between the source IP address and destination IP address (NSC address). Two source IP addresses can be specified: one IPv4 address and one IPv6 address.

  3. Run the netstream export ip host { ip-address | ipv6 ipv6-address } port-number command to configure the destination IP address for the exported packets carrying IPv4 original flow statistics.

    By default, the destination IP address of the exported packets carrying IPv4 original flow statistics is not configured.

    You can configure two destination IP addresses to implement NSC backup. To configure a third destination IP address, run the undo netstream export ip host command to delete an existing one first; otherwise, the system displays a message indicating that the maximum number of IP addresses is exceeded and the configuration fails.

  4. Run the commit command to commit the configuration.

Configuring Versions for the Exported Packets

Context

The NDE exports NetStream flow statistics to the NSC. The version of exported packets must be the same as that configured on the NSC so that the NSC can parse the exported packets.

The exported packets in V5 have fixed format and are difficult to expand. The format of exported packets in V9 is defined in templates and is easy to expand. The statistics are exported flexibly.

V9 is supported by most NSCs for its advantages. It is recommended that you set the version of exported packets to V9.

The version of exported packets carrying IPv4 original flows must be set to V9 in the following situations:
  • Exported packets need to carry BGP next-hop information.

  • Exported packets need to carry 32-bit interface indexes.

Procedure

  1. Run the system-view command to enter the system view.
  2. Run the netstream export ip version { 5 [ origin-as | peer-as ] | 9 [ origin-as | peer-as ] [ bgp-nexthop ] } command to set the version of exported packets carrying IPv4 original flow statistics.

    By default, the packets carrying IPv4 original flow statistics are exported in the format of V5.

  3. (Optional) Run the netstream export ip template timeout-rate timeout-interval command to set the interval at which the template for exporting original flows in V9 format is refreshed.

    By default, the output template of IPv4 original flows is refreshed every 30 minutes.

  4. Run the commit command to commit the configuration.

Enabling NetStream Original Flow Statistics Collection on the Interface

Context

IPv4 original flow statistics can be exported only when you have enabled flow statistics collection on an interface.

Procedure

  1. Run the system-view command to enter the system view.
  2. Run the interface interface-type interface-number command to enter the interface view.
  3. Run the netstream { inbound | outbound } ip command to enable the NetStream function on the interface to collect statistics about IPv4 flows.

    By default, the NetStream function for IPv4 flows is disabled on the interface.

  4. Run the commit command to commit the configuration.

Checking the Configuration

Context

You can run commands to verify the configuration of IPv4 original flow statistics exporting.

Procedure

  • Run the display netstream cache ip origin [ { inbound | outbound } | destination interface interface-type interface-number | destination ip ip-address | destination port port-number | source interface interface-type interface-number | source ip ip-address | source port port-number | protocol protocol-type | tos tos-number ] * slot slot-id [ verbose ] command to check detailed NetStream statistics on IPv4 original flowsdetailed on the device.
  • Run the display netstream export ip template command to check the exported template information.
  • Run the display netstream statistics ip slot slot-id command to check NetStream statistics about IPv4 flows on the device.
  • Run the display netstream { all | global | interface interface-type interface-number } command to check the NetStream configuration.

Configuring IPv6 Original Flow Statistics Exporting

After the IPv6 original flow statistics exporting is configured, the NDE collects statistics about IPv6 flows and exports the statistics about each flow to the NetStream server for further analysis.

Pre-configuration Taskss

Before configuring the IPv6 original flow statistics exporting, complete the following tasks:

  • Setting physical parameters of interfaces
  • Setting the link-layer attributes of each interface

Configuration Process

The configuration tasks of IPv6 original flows can be performed in any sequence.

Configuring NetStream Sampling

Context

You can set an interval for sampling packets so that only statistics about sampled packets are collected. The statistics show the flow status on the entire network. The sampling function reduces impact of NetStream on device performance.

Procedure

  1. Run the system-view command to enter the system view.
  2. NetStream sampling can be configured in two ways:

    • Configure NetStream sampling in the system view. The sampling configuration will take effect on all interfaces.

      Run the netstream sampler packet-interval { inbound | outbound } command to configure packet sampling on all interfaces.

      By default, packet sampling is not configured on all interfaces.

    • Configure NetStream sampling in the interface view. The sampling configuration will take effect on this interface.

      1. Run the interface interface-type interface-number command to enter the interface view.

      2. Run the netstream sampler random-packets packet-interval { inbound | outbound } command to configure packet sampling on the interface.

        By default, packet sampling is not configured on interfaces.

        IPv4 packet sampling configured in the system view takes effect on all interfaces on the device. If the function is configured in both the interface view and system view, the configuration in the interface view has priority.

  3. Run the commit command to commit the configuration.

Configuring NetStream Flow Aging

Context

When a NetStream flow is aged out, the device exports the flow statistics in the cache to the NSC using NetStream packets of a specified version.

NetStream flow aging modes include regular aging, FIN- and RST-based aging, byte-based aging, and forced aging. By default, the byte-based aging is enabled.

  • Regular aging

    • Active aging

      Active aging requires the device to periodically export statistics about the flows that persist for a long period. This aging mode is enabled on the device by default, and you only need to set the aging time.

    • Inactive aging

      Inactive aging clears unnecessary entries in the NetStream cache so that the system can fully leverage statistics entries. Inactive aging requires the device to export statistics about the flows that persist for a short period. Once adding packets to a flow stops, the device exports flow statistics to conserve memory space. This aging mode is enabled on the device by default, and you only need to set the aging time.

  • FIN- and RST-based aging

    An FIN or RST flag in a TCP packet indicates the termination of a TCP connection. When receiving a packet with the FIN or RST flag, the device immediately ages out the corresponding NetStream flow. It is recommended that you enable this mode.

  • Forced aging

    Forced aging is used when you require the latest statistics, but you do not satisfy with the existing aging conditions or some flows fail to age out due to an anomaly. You can forcibly age out all the flows in the cache and export the flow statistics.

Procedure

  • Configure regular aging.

    Configure active aging.

    1. Run the system-view command to enter the system view.
    2. Run the netstream timeout ipv6 active active-interval command to set the active aging time of IPv6 flows.

      By default, the active aging time of IPv6 flows is 30 minutes.

    3. Run the commit command to commit the configuration.

    Configure inactive aging.

    1. Run the system-view command to enter the system view.
    2. Run the netstream timeout ipv6 inactive inactive-interval command to set the inactive time of IPv6 flows.

      By default, the inactive aging time of IPv6 flows is 30 seconds.

    3. Run the commit command to commit the configuration.
  • Configure FIN- and RST-based aging.
    1. Run the system-view command to enter the system view.
    2. Run the netstream timeout ipv6 tcp-session command to configure the NetStream flows to age according to the FIN or RST flag in the TCP packet header.

      By default, NetStream flows are not aged according to the FIN or RST flag in the TCP packet header.

    3. Run the commit command to commit the configuration.
  • Configure forced aging.
    1. Run the reset netstream cache ipv6 slot slot-id command in the user view to forcibly age out all IPv6 flows on the device.

Configuring NetStream Original Flow Statistics Exporting

Context

Original flow statistics can be exported only when you have specified a source IP address and at least one destination IP address for the exported packets.

Procedure

  1. Run the system-view command to enter the system view.
  2. Run the netstream export ipv6 source { ip-address | ipv6 ipv6-address } command to configure the source IP address for the exported packets carrying IPv6 original flow statistics.

    By default, the source IP address of the exported packets carrying IPv6 original flow statistics is not configured.

    If the source IP address is not specified, packets are not exported. The source address of the exported packets carrying IPv6 original flow statistics can be an IPv4 or IPv6 address. There must be a reachable route between the source IP address and destination IP address (NSC address). Two source IP addresses can be specified: one IPv4 address and one IPv6 address.

  3. Run the netstream export ipv6 host { ip-address | ipv6 ipv6-address } port-number command to configure the destination IP address for the exported packets carrying IPv6 original flow statistics.

    By default, the destination IP address of the exported packets carrying IPv6 original flow statistics is not configured.

    You can configure two destination IP addresses to implement NSC backup. To configure a third destination IP address, run the undo netstream export ipv6 host command to delete an existing one first; otherwise, the system displays a message indicating that the maximum number of IP addresses is exceeded and the configuration fails.

  4. Run the commit command to commit the configuration.

Configuring Versions for the Exported Packets

Procedure

  1. Run the system-view command to enter the system view.
  2. Run the netstream export ipv6 version 9 [ origin-as | peer-as ] [ bgp-nexthop ] command to set the version of the exported packets carrying IPv6 original flow statistics.

    By default, the version of exported IPv6 original flow statistics is not specified.

    The version of exported IPv6 original flow statistics is fixed as V9.

  3. (Optional) Run the netstream export ipv6 template timeout-rate timeout-interval command to set the interval at which the template for exporting IPv6 original flows in V9 format is refreshed.

    By default, the output template is refreshed every 30 minutes.

  4. Run the commit command to commit the configuration.

Enabling NetStream Original Flow Statistics Collection on the Interface

Context

IPv6 original flow statistics can be exported only when you have enabled flow statistics collection on an interface.

Procedure

  1. Run the system-view command to enter the system view.
  2. Run the interface interface-type interface-number command to enter the interface view.
  3. Run the netstream { inbound | outbound } ipv6 command to enable the NetStream function on the interface to collect statistics about IPv6 flows.

    By default, the NetStream function for IPv6 flows is disabled on the interface.

  4. Run the commit command to commit the configuration.

Checking the Configuration

Context

You can run commands to verify the configuration of IPv6 flow statistics exporting.

Procedure

  • Run the display netstream cache ipv6 origin [ { inbound | outbound } | destination interface interface-type interface-number | destination ipv6 ipv6-address | destination port port-number | source interface interface-type interface-number | source ipv6 ipv6-address | source port port-number | flowlabel flowlabel | protocol protocol-type | tos tos-number ] * slot slot-id [ verbose ] command to check detailed NetStream statistics on IPv6 original flows on the device.
  • Run the display netstream export ipv6 template command to check the exported template information.
  • Run the display netstream statistics ipv6 slot slot-id command to check NetStream statistics about IPv6 flows on the device.
  • Run the display netstream { all | global | interface interface-type interface-number } command to check the NetStream configuration.

Configuring IPv4 Aggregation Flow Statistics Exporting

After the IPv4 aggregation flow statistics exporting is configured, the NDE aggregates statistics about IPv4 flows with the same aggregation entries and exports flow statistics to the NetStream server for further analysis.

Pre-configuration Taskss

Before configuring the IPv4 aggregation flow statistics exporting, complete the following tasks:

  • Setting physical parameters of interfaces
  • Setting the link-layer attributes of each interface

Configuration Process

The configuration tasks can be performed in any sequence and are mandatory.

Configuring NetStream Sampling

Context

You can set an interval for sampling packets so that only statistics about sampled packets are collected. The statistics show the flow status on the entire network. The sampling function reduces impact of NetStream on device performance.

Procedure

  1. Run the system-view command to enter the system view.
  2. NetStream sampling can be configured in two ways:

    • Configure NetStream sampling in the system view. The sampling configuration will take effect on all interfaces.

      Run the netstream sampler packet-interval { inbound | outbound } command to configure packet sampling on all interfaces.

      By default, packet sampling is not configured on all interfaces.

    • Configure NetStream sampling in the interface view. The sampling configuration will take effect on this interface.

      1. Run the interface interface-type interface-number command to enter the interface view.

      2. Run the netstream sampler random-packets packet-interval { inbound | outbound } command to configure packet sampling on the interface.

        By default, packet sampling is not configured on interfaces.

        IPv4 packet sampling configured in the system view takes effect on all interfaces on the device. If the function is configured in both the interface view and system view, the configuration in the interface view has priority.

  3. Run the commit command to commit the configuration.

Configuring NetStream Flow Aging

Context

When a NetStream flow is aged out, the device exports the flow statistics in the cache to the NSC using NetStream packets of a specified version.

NetStream flow aging modes include regular aging, byte-based aging, and forced aging. By default, the byte-based aging is enabled.

  • Regular aging

    • Active aging

      Active aging requires the device to periodically export statistics about the flows that persist for a long period. This aging mode is enabled on the device by default, and you only need to set the aging time.

    • Inactive aging

      Inactive aging clears unnecessary entries in the NetStream cache so that the system can fully leverage statistics entries. Inactive aging requires the device to export statistics about the flows that persist for a short period. Once adding packets to a flow stops, the device exports flow statistics to conserve memory space. This aging mode is enabled on the device by default, and you only need to set the aging time.

  • Forced aging

    Forced aging is used when you require the latest statistics, but you do not satisfy with the existing aging conditions or some flows fail to age out due to an anomaly. You can forcibly age out all the original flows in the cache and export the flow statistics.

Procedure

  • Configure regular aging.

    Configure active aging.

    1. Run the system-view command to enter the system view.
    2. Run the netstream aggregation timeout ip active active-interval command to set the active aging time of IPv4 aggregation flows.

      By default, the active aging time of IPv4 aggregation flows is 5 minutes.

    3. Run the commit command to commit the configuration.

    Configure inactive aging.

    1. Run the system-view command to enter the system view.
    2. Run the netstream aggregation timeout ip inactive inactive-interval command to set the inactive time of IPv4 aggregation flows.

      By default, the inactive aging time of IPv4 aggregation flows is 300 seconds.

    3. Run the commit command to commit the configuration.
  • Configure forced aging.
    1. Run the reset netstream cache ip slot slot-id command in the user view to forcibly age out all IPv4 flows on the device.

Configuring NetStream Aggregation Flow Statistics Exporting

Context

Aggregation flow statistics can be exported only when you have specified a source address and at least one destination address and one destination UDP port number for the exported packets.

The device with NetStream aggregation flow statistics enabled can classify and aggregate original flows according to certain rules, and export the aged flows to the NSC. Aggregation of original flows will decrease network bandwidth, CPU usage, and memory space occupation.

Procedure

  1. Run the system-view command to enter the system view.
  2. Run the netstream aggregation ip { as | as-tos | bgp-nexthop-tos | destination-prefix | destination-prefix-tos | index-tos | prefix | prefix-tos | protocol-port | protocol-port-tos | source-prefix | source-prefix-tos | source-index-tos | vlan-id } command to configure a NetStream aggregation method and enter the NetStream aggregation view.

    For details about aggregation modes, see netstream aggregation ip in the Command Reference.

  3. (Optional) Run the mask { destination | source } minimum mask-length command to configure an aggregation mask.

    Be default, the aggregation mask is 24.

    The configured aggregation mask is valid for six aggregation modes: prefix, prefix-tos, destination-prefix, destination-prefix-tos, source-prefix, and source-prefix-tos, in which:

    • The parameter source is used in prefix, prefix-tos, source-prefix, and source-prefix-tos aggregation method.
    • The parameter destination is used in prefix, prefix-tos, destination-prefix, and destination-prefix-tos aggregation method.

  4. Run the netstream export ip source { ip-address | ipv6 ipv6-address } command to configure the source address for the exported packets carrying IPv4 aggregation flow statistics.

    By default, the source address of the exported packets carrying IPv4 aggregation flow statistics is not configured. After the aggregation method is set, the source address configured in the aggregation view is used first. If no source address is configured for an aggregation method , the source address configured by the netstream export ip source command in the system view is used.

    If the source address is not specified, packets are not exported. The source address of the exported packets carrying IPv4 aggregation flow statistics can be an IPv4 or IPv6 address. There must be a reachable route between the source address and destination address (NSC address). Two source addresses can be specified: one IPv4 address and one IPv6 address.

  5. Run the netstream export ip host { ip-address | ipv6 ipv6-address } port-number command to configure the destination address and destination UDP port for the exported packets carrying IPv4 aggregation flow statistics.

    By default, the destination address and UDP port number of the exported packets carrying IPv4 aggregation flow statistics is not configured.

    You can configure two destination addresses to implement NSC backup. To configure a third destination address, run the undo netstream export ip host command to delete an existing one first; otherwise, the system displays a message indicating that the maximum number of destination addresses is exceeded and the configuration fails.

    After the aggregation method is set, the destination address configured in the aggregation view is used first. If no destination address is configured for an aggregation method, the destination address configured by the netstream export ip host command in system view is used.

  6. Run the enable command to enable the NetStream aggregation function.

    By default, the aggregation function is disabled.

  7. Run the commit command to commit the configuration.

Configuring Versions for the Exported Packets

Context

The NDE exports NetStream flow statistics to the NSC. The version of exported packets must be the same as that configured on the NSC so that the NSC can parse the exported packets.

The exported packets in V8 have fixed format and are difficult to expand. The format of exported packets in V9 is defined in templates and is easy to expand. The statistics are exported flexibly.

V9 is supported by most NSCs for its advantages. It is recommended that you set the version of exported packets carrying aggregation flow statistics to V9.

Procedure

  1. Run the system-view command to enter the system view.
  2. Run the netstream aggregation ip { as | as-tos | bgp-nexthop-tos | destination-prefix | destination-prefix-tos | index-tos | prefix | prefix-tos | protocol-port | protocol-port-tos | source-prefix | source-prefix-tos | source-index-tos | vlan-id } command to enter the NetStream aggregation view.

    The aggregation view must be the same as the aggregation view in Configuring NetStream Aggregation Flow Statistics Exporting.

  3. Run the export version { 8 | 9 } command to set the version of exported packets carrying aggregation flow statistics.

    For the aggregation modes as, as-tos, destination-prefix, destination-prefix-tos, prefix, prefix-tos, protocol-port, protocol-port-tos, source-prefix, and source-prefix-tos, the default version is V8. You can specify the version of exported packets.

    For the aggregation modes vlan-id, bgp-nexthop-tos, index-tos, and source-index-tos the default version is fixed as V9, and these aggregation modes do not support the export version command.

  4. (Optional) Run the template timeout-rate timeout-interval command to set the interval at which the template for exporting aggregated flows in V9 format is refreshed.

    By default, the output template of aggregated flows is refreshed every 30 minutes.

  5. Run the commit command to commit the configuration.

Enabling NetStream Aggregation Flow Statistics Collection on the Interface

Context

Aggregation flow statistics can be exported only when you have enabled flow statistics collection on an interface.

Procedure

  1. Run the system-view command to enter the system view.
  2. Run the interface interface-type interface-number command to enter the interface view.
  3. Run the netstream { inbound | outbound } ip command to enable the NetStream function on the interface to collect statistics about IPv4 flows.

    By default, the NetStream function for IPv4 flows is disabled on the interface.

  4. Run the commit command to commit the configuration.

Checking the Configuration

Context

You can run commands to verify the configuration of aggregation flow statistics exporting.

Procedure

  • Run the display netstream cache ip aggregation { as | as-tos | bgp-nexthop-tos | destination-prefix | destination-prefix-tos | index-tos | prefix | prefix-tos | protocol-port | protocol-port-tos | source-index-tos | source-prefix | source-prefix-tos | vlan-id } slot slot-id [ verbose ] command to check detailed NetStream statistics on IPv4 aggregation flows on the device.
  • Run the display netstream export ip template command to check the exported template information.
  • Run the display netstream statistics ip slot slot-id command to check NetStream statistics about IPv4 flows on the device.
  • Run the display netstream { all | global | interface interface-type interface-number } command to check the NetStream configuration.

Configuring IPv6 Aggregation Flow Statistics Exporting

After the IPv6 aggregation flow statistics exporting is configured, the NDE aggregates statistics about IPv6 flows with the same aggregation entries and exports flow statistics to the NetStream server for further analysis.

Pre-configuration Tasks

Before configuring the IPv6 aggregation flow statistics exporting, complete the following tasks:

  • Setting physical parameters of interfaces
  • Configuring link layer attributes for interfaces

Configuration Process

The configuration tasks are mandatory and can be performed in any sequence. The function takes effect only when all configuration tasks are completed.

Configuring NetStream Sampling

Context

You can set an interval for sampling packets so that only statistics about sampled packets are collected. The statistics show the flow status on the entire network. The sampling function reduces impact of NetStream on device performance.

Procedure

  1. Run the system-view command to enter the system view.
  2. NetStream sampling can be configured in two ways:

    • Configure NetStream sampling in the system view. The sampling configuration will take effect on all interfaces.

      Run the netstream sampler packet-interval { inbound | outbound } command to configure packet sampling on all interfaces.

      By default, packet sampling is not configured on all interfaces.

    • Configure NetStream sampling in the interface view. The sampling configuration will take effect on this interface.

      1. Run the interface interface-type interface-number command to enter the interface view.

      2. Run the netstream sampler random-packets packet-interval { inbound | outbound } command to configure packet sampling on the interface.

        By default, packet sampling is not configured on interfaces.

        IPv4 packet sampling configured in the system view takes effect on all interfaces on the device. If the function is configured in both the interface view and system view, the configuration in the interface view has priority.

  3. Run the commit command to commit the configuration.

Configuring NetStream Flow Aging

Context

When a NetStream flow is aged out, the device exports the flow statistics in the cache to the NSC using NetStream packets of a specified version.

NetStream flow aging modes include regular aging, byte-based aging, and forced aging. By default, the byte-based aging is enabled.

  • Regular aging

    • Active aging

      Active aging requires the device to periodically export statistics about the flows that persist for a long period. This aging mode is enabled on the device by default, and you only need to set the aging time.

    • Inactive aging

      Inactive aging clears unnecessary entries in the NetStream cache so that the system can fully leverage statistics entries. Inactive aging requires the device to export statistics about the flows that persist for a short period. Once adding packets to a flow stops, the device exports flow statistics to conserve memory space. This aging mode is enabled on the device by default, and you only need to set the aging time.

  • Forced aging

    Forced aging is used when you require the latest statistics, but you do not satisfy with the existing aging conditions or some flows fail to age out due to an anomaly. You can forcibly age out all the flows in the cache and export the flow statistics.

Procedure

  • Configure regular aging.

    Configure active aging.

    1. Run the system-view command to enter the system view.
    2. Run the netstream aggregation timeout ipv6 active active-interval command to set the active aging time of IPv6 aggregation flows.

      By default, the active aging time of IPv6 aggregation flows is 5 minutes.

    3. Run the commit command to commit the configuration.

    Configure inactive aging.

    1. Run the system-view command to enter the system view.
    2. Run the netstream aggregation timeout ipv6 inactive inactive-interval command to set the inactive time of IPv6 aggregation flows.

      By default, the inactive aging time of IPv6 aggregation flows is 300 seconds.

    3. Run the commit command to commit the configuration.
  • Configure forced aging.
    1. Run the reset netstream cache ipv6 slot slot-id command in the user view to forcibly age out all IPv6 flows on the device.

Configuring NetStream Aggregation Flow Statistics Exporting

Context

Original flow statistics can be exported only when you have specified a source IP address and at least one destination IP address for the exported packets.

The device with NetStream aggregation flow statistics enabled can classify and aggregate original flows according to certain rules, and export the aged flows to the NDA. Aggregation of original flows will decrease network bandwidth, CPU usage, and memory space occupation.

Procedure

  1. Run the system-view command to enter the system view.
  2. Run the netstream aggregation ipv6 { as | as-tos | bgp-nexthop-tos | destination-prefix | destination-prefix-tos | index-tos | prefix | prefix-tos | protocol-port | protocol-port-tos | source-prefix | source-prefix-tos | vlan-id } command to configure a NetStream aggregation method and enter the NetStream aggregation view.
  3. (Optional) Run the mask { destination | source } minimum mask-length command to configure an aggregation mask.

    Be default, the aggregation mask is 64.

    The aggregation mask is only valid for six aggregation methods: prefix, prefix-tos, destination-prefix, destination-prefix-tos, source-prefix, and source-prefix-tos.

    • The parameter source is used in the following aggregation methods: prefix, prefix-tos, source-prefix, and source-prefix-tos.
    • The parameter destination is used in the following aggregation methods: prefix, prefix-tos, destination-prefix, and destination-prefix-tos.

  4. (Optional) Run the template timeout-rate timeout-interval command to set the interval at which the template is refreshed when the packets are exported in the format of V9.

    By default, the template refresh interval is 30 minutes.

    The version of exported packets carrying IPv6 aggregation flow statistics is fixed as V9, and the export version command is not supported.

  5. Run the netstream export ipv6 source { ip-address | ipv6 ipv6-address } command to configure the source IP address for the exported packets carrying IPv6 aggregation flow statistics.

    By default, the source IP address of the exported packets carrying IPv6 aggregation flow statistics is not configured. After the aggregation method is set, the source address configured in the aggregation view is used first. If no source address is configured for an aggregation method, the source address configured in the netstream export ipv6 source command is used.

    If the source IP address is not specified, packets are not exported. The source address of the exported packets carrying IPv6 aggregation flow statistics can be an IPv4 or IPv6 address. There must be a reachable route between the source IP address and destination IP address (NSC address). Two source IP addresses can be specified: one IPv4 address and one IPv6 address.

  6. Run the netstream export ipv6 host { ip-address | ipv6 ipv6-address } port-number command to configure the destination IP address for the exported packets carrying IPv6 aggregation flow statistics.

    By default, the destination IP address of the exported packets carrying IPv6 aggregation flow statistics is not configured.

    You can configure two destination IP addresses to implement NSC backup. To configure a third destination IP address, run the undo netstream export ipv6 host command to delete an existing one first; otherwise, the system displays a message indicating that the maximum number of IP addresses is exceeded and the configuration fails.

    After the aggregation method is set, the destination address configured in the aggregation view is used first. If no destination address is configured for an aggregation method, the destination address configured in the netstream export ipv6 host command is used.

  7. Run the enable command to enable the NetStream aggregation function.

    The aggregation function is disabled by default.

  8. Run the commit command to commit the configuration.

Enabling NetStream Aggregation Flow Statistics Collection on the Interface

Context

Aggregation flow statistics can be exported only when you have enabled flow statistics collection on an interface.

Procedure

  1. Run the system-view command to enter the system view.
  2. Run the interface interface-type interface-number command to enter the interface view.
  3. Run the netstream { inbound | outbound } ipv6 command to enable the NetStream function on the interface to collect statistics about IPv6 flows.

    By default, the NetStream function for IPv6 flows is disabled on the interface.

  4. Run the commit command to commit the configuration.

Checking the Configuration

Context

You can run commands to verify the configuration of flexible flow statistics exporting.

Procedure

  • Run the display netstream cache ipv6 aggregation { as | as-tos | bgp-nexthop-tos | destination-prefix | destination-prefix-tos | index-tos | prefix | prefix-tos | protocol-port | protocol-port-tos | source-prefix | source-prefix-tos | vlan-id } slot slot-id [ verbose ] command to check detailed NetStream statistics on IPv6 aggregation flows on the device.
  • Run the display netstream export ipv6 template command to check the exported template information.
  • Run the display netstream statistics ipv6 slot slot-id command to check NetStream statistics about IPv6 flows on the device.
  • Run the display netstream { all | global | interface interface-type interface-number } command to check the NetStream configuration.

Configuring IPv4 Flexible Flow Statistics Exporting

After the flexible flow statistics exporting is configured, the NDE classifies and collects statistics about packets based on the protocol type, ToS, source IP address, destination IP address, source port number, and destination port number.

Pre-configuration Taskss

Before configuring the IPv4 flexible flow statistics exporting, complete the following tasks:

  • Setting physical parameters of interfaces
  • Setting the link-layer attributes of each interface

Configuration Process

Configuring a Flexible Flow Statistics Template must be performed before Enabling NetStream Flexible Flow Statistics Collection on the Interface. The other configuration tasks are mandatory and can be performed in any sequence.

Configuring a Flexible Flow Statistics Template

Context

You need to configure a flexible flow statistics template before applying it to an interface. To obtain richer flow statistics, you can configure whether flexible flow statistics contain the number of packets and bytes, and the indexes of the inbound and outbound interfaces.

Procedure

  1. Run the system-view command to enter the system view.
  2. Run the netstream record record-name ip command to create IPv4 flexible flow statistics template and enter the IPv4 flexible flow statistics template view.
  3. (Optional) Run the description description-information command to configure the description of IPv4 flexible flows.

    By default, the description of IPv4 flexible flows is not configured.

  4. Run the match ip { destination-address | destination-port | tos | protocol | source-address | source-port } command to configure the aggregation keywords for the IPv4 flexible flow statistics template.

    By default, no aggregation keyword is configured in a flexible IPv4 flow statistics template. If you run the command multiple times, multiple keywords are configured to aggregate the flows according to all these keywords.

  5. Run the collect counter { bytes | packets } command to configure the flexible flow statistics exported to the NSC to contain the number of packets and bytes.

    By default, the flexible flow statistics that are exported to the NSC do not contain the number of packets or bytes.

  6. (Optional) Run the collect interface { input | output } command to configure the flexible flow statistics exported to the NSC to contain indexes of the inbound and outbound interfaces.

    By default, the flexible flow statistics exported to the NSC do not contain the index of the inbound or outbound interface.

  7. Run the commit command to commit the configuration.

Configuring NetStream Sampling

Context

You can set an interval for sampling packets so that only statistics about sampled packets are collected. The statistics show the flow status on the entire network. The sampling function reduces impact of NetStream on device performance.

Procedure

  1. Run the system-view command to enter the system view.
  2. NetStream sampling can be configured in two ways:

    • Configure NetStream sampling in the system view. The sampling configuration will take effect on all interfaces.

      Run the netstream sampler packet-interval { inbound | outbound } command to configure packet sampling on all interfaces.

      By default, packet sampling is not configured on all interfaces.

    • Configure NetStream sampling in the interface view. The sampling configuration will take effect on this interface.

      1. Run the interface interface-type interface-number command to enter the interface view.

      2. Run the netstream sampler random-packets packet-interval { inbound | outbound } command to configure packet sampling on the interface.

        By default, packet sampling is not configured on interfaces.

        IPv4 packet sampling configured in the system view takes effect on all interfaces on the device. If the function is configured in both the interface view and system view, the configuration in the interface view has priority.

  3. Run the commit command to commit the configuration.

Configuring NetStream Flow Aging

Context

When a NetStream flow is aged out, the device exports the flow statistics in the cache to the NSC using NetStream packets of a specified version.

NetStream flow aging modes include regular aging, byte-based aging, and forced aging. By default, the byte-based aging is enabled.

  • Regular aging

    • Active aging

      Active aging requires the device to periodically export statistics about the flows that persist for a long period. This aging mode is enabled on the device by default, and you only need to set the aging time.

    • Inactive aging

      Inactive aging clears unnecessary entries in the NetStream cache so that the system can fully leverage statistics entries. Inactive aging requires the device to export statistics about the flows that persist for a short period. Once adding packets to a flow stops, the device exports flow statistics to conserve memory space. This aging mode is enabled on the device by default, and you only need to set the aging time.

  • Forced aging

    Forced aging is used when you require the latest statistics, but you do not satisfy with the existing aging conditions or some flows fail to age out due to an anomaly. You can forcibly age out all the original flows in the cache and export the flow statistics.

Procedure

  • Configure regular aging.

    Configure active aging.

    1. Run the system-view command to enter the system view.
    2. Run the netstream timeout ip active active-interval command to set the active aging time of IPv4 flows.

      By default, the active aging time of IPv4 flows is 30 minutes.

    3. Run the commit command to commit the configuration.

    Configure inactive aging.

    1. Run the system-view command to enter the system view.
    2. Run the netstream timeout ip inactive inactive-interval command to set the inactive time of IPv4 flows.

      By default, the inactive aging time of IPv4 flows is 30 seconds.

    3. Run the commit command to commit the configuration.
  • Configure forced aging.
    1. Run the reset netstream cache ip slot slot-id command in the user view to forcibly age out all IPv4 flows on the device.

Configuring NetStream Flexible Flow Statistics Exporting

Context

Flexible flow statistics can be exported only when you have specified a source IP address and at least one destination IP address and one destination UDP port number for the exported packets.

Procedure

  1. Run the system-view command to enter the system view.
  2. Run the netstream export ip source { ip-address | ipv6 ipv6-address } command to configure the source IP address for the exported packets carrying IPv4 flexible flow statistics.

    By default, the source IP address of the exported packets carrying IPv4 flexible flow statistics is not configured.

    If the source IP address is not specified, packets are not exported. The source address of the exported packets carrying IPv4 flexible flow statistics can be an IPv4 or IPv6 address. There must be a reachable route between the source IP address and destination IP address (NSC address). Two source IP addresses can be specified: one IPv4 address and one IPv6 address.

  3. Run the netstream export ip host { ip-address | ipv6 ipv6-address } port-number command to configure the destination IP address for the exported packets carrying IPv4 flexible flow statistics.

    By default, the destination IP address of the exported packets carrying IPv4 flexible flow statistics is not configured.

    You can configure two destination IP addresses to implement NSC backup. To configure a third destination IP address, run the undo netstream export ip host command to delete an existing one first; otherwise, the system displays a message indicating that the maximum number of IP addresses is exceeded and the configuration fails.

  4. Run the commit command to commit the configuration.

Configuring Versions for the Exported Packets

Procedure

  1. Run the system-view command to enter the system view.
  2. Run the netstream export ip version 9 [ origin-as | peer-as ] [ bgp-nexthop ] command to set the version and AS option of the exported packets carrying IPv4 flexible flow statistics.

    By default, the version of the exported packets carrying IPv4 flexible flow statistics is not configured.

    The version of the exported packets carrying IPv4 flexible flow statistics is fixed as V9.

  3. (Optional) Run the netstream export ip template timeout-rate timeout-interval command to set the interval at which the template is refreshed when packets carrying IPv4 flexible flow statistics are exported in the format of V9.

    By default, the template is refreshed every 30 minutes.

  4. Run the commit command to commit the configuration.

Enabling NetStream Flexible Flow Statistics Collection on the Interface

Context

When configuring flexible NetStream, you need to enable flow statistics collection on an interface and apply a flexible flow statistics template on the interface to ensure successful statistics exporting.

Procedure

  1. Run the system-view command to enter the system view.
  2. Run the interface interface-type interface-number command to enter the interface view.
  3. Run the netstream record record-name ip command to apply the IPv4 flexible flow statistics template to the interface.

    • Each interface can be configured with only one IPv4 flexible flow statistics template. Before modifying the IPv4 flexible flow statistics template in the same interface view, run the undo netstream record ip command to delete the existing configuration.

    • If the IPv4 flexible flow statistics template has been applied to the interface, the template configuration cannot be modified or deleted.

  4. Run the netstream { inbound | outbound } ip command to enable the NetStream function on the interface to collect statistics about IPv4 flows.

    By default, the NetStream function for IPv4 flows is disabled on the interface.

  5. Run the commit command to commit the configuration.

Checking the Configuration

Context

You can run commands to verify the configuration of flexible flow statistics exporting.

Procedure

  • Run the display netstream cache ip record record-name [ { inbound | outbound } | destination interface interface-type interface-number | destination ip ip-address | destination port port-number | source interface interface-type interface-number | source ip ip-address | source port port-number | protocol protocol-type | tos tos-number ] * slot slot-id [ verbose ] command to check detailed NetStream statistics on IPv4 flexible flows on the device.
  • Run the display netstream export ip template command to check the exported template information.
  • Run the display netstream statistics ip slot slot-id command to check NetStream statistics about IPv4 flows on the device.
  • Run the display netstream { all | global | interface interface-type interface-number } command to check the NetStream configuration.

Configuring IPv6 Flexible Flow Statistics Exporting

After the flexible flow statistics exporting is configured, the NDE classifies and collects statistics about packets based on the protocol type, ToS, source IPv6 address, destination IPv6 address, source port number, destination port number, or flow labels.

Pre-configuration Tasks

Before configuring the IPv6 flexible flow statistics exporting, complete the following tasks:

  • Setting physical parameters of interfaces
  • Configuring link layer attributes for interfaces

Configuration Process

The configuration tasks can be performed in any sequence except that the Configuring a Flexible Flow Statistics Template task must be performed before Enabling Flexible Flow Statistics Collection on the Interface.

Configuring a Flexible Flow Statistics Template

Context

You need to configure a flexible flow statistics template before applying it to an interface. To obtain richer flow statistics, you can configure whether flexible flow statistics contain the number of packets and bytes, and the indexes of the inbound and outbound interfaces.

Procedure

  1. Run the system-view command to enter the system view.
  2. Run the netstream record record-name ipv6 command to create an IPv6 flexible flow statistics template and enter the template view.
  3. (Optional) Run the description description-information command to configure the description of IPv6 flexible flows.

    By default, the description of IPv6 flexible flows is not configured.

  4. Run the match ipv6 { destination-address | destination-port | tos | flow-label | protocol | source-address | source-port } command to configure the aggregation keywords for the flexible IPv6 flow statistics template.

    By default, no aggregation keyword is configured in a flexible IPv6 flow statistics template. If you run the command multiple times, multiple keywords are configured to aggregate the flows according to all these keywords.

  5. Run the collect counter { bytes | packets } command to configure the flexible flow statistics exported to the NSC to contain the number of packets and bytes.

    By default, the flexible flow statistics that are exported to the NSC do not contain the number of packets or bytes.

  6. (Optional) Run the collect interface { input | output } command to configure the flexible flow statistics exported to the NSC to contain indexes of the inbound and outbound interfaces.

    By default, the flexible flow statistics exported to the NSC do not contain the indexes of the inbound or outbound interface.

  7. Run the commit command to commit the configuration.

Configuring NetStream Sampling

Context

You can set an interval for sampling packets so that only statistics about sampled packets are collected. The statistics show the flow status on the entire network. The sampling function reduces impact of NetStream on device performance.

Procedure

  1. Run the system-view command to enter the system view.
  2. NetStream sampling can be configured in two ways:

    • Configure NetStream sampling in the system view. The sampling configuration will take effect on all interfaces.

      Run the netstream sampler packet-interval { inbound | outbound } command to configure packet sampling on all interfaces.

      By default, packet sampling is not configured on all interfaces.

    • Configure NetStream sampling in the interface view. The sampling configuration will take effect on this interface.

      1. Run the interface interface-type interface-number command to enter the interface view.

      2. Run the netstream sampler random-packets packet-interval { inbound | outbound } command to configure packet sampling on the interface.

        By default, packet sampling is not configured on interfaces.

        IPv4 packet sampling configured in the system view takes effect on all interfaces on the device. If the function is configured in both the interface view and system view, the configuration in the interface view has priority.

  3. Run the commit command to commit the configuration.

Configuring NetStream Flow Aging

Context

When a NetStream flow is aged out, the device exports the flow statistics in the cache to the NSC using NetStream packets of a specified version.

NetStream flow aging modes include regular aging, byte-based aging, and forced aging. By default, the byte-based aging is enabled.

  • Regular aging

    • Active aging

      Active aging requires the device to periodically export statistics about the flows that persist for a long period. This aging mode is enabled on the device by default, and you only need to set the aging time.

    • Inactive aging

      Inactive aging clears unnecessary entries in the NetStream cache so that the system can fully leverage statistics entries. Inactive aging requires the device to export statistics about the flows that persist for a short period. Once adding packets to a flow stops, the device exports flow statistics to conserve memory space. This aging mode is enabled on the device by default, and you only need to set the aging time.

  • Forced aging

    Forced aging is used when you require the latest statistics, but you do not satisfy with the existing aging conditions or some flows fail to age out due to an anomaly. You can forcibly age out all the flows in the cache and export the flow statistics.

Procedure

  • Configure regular aging.

    Configure active aging.

    1. Run the system-view command to enter the system view.
    2. Run the netstream timeout ipv6 active active-interval command to set the active aging time of IPv6 flows.

      By default, the active aging time of IPv6 flows is 30 minutes.

    3. Run the commit command to commit the configuration.

    Configure inactive aging.

    1. Run the system-view command to enter the system view.
    2. Run the netstream timeout ipv6 inactive inactive-interval command to set the inactive time of IPv6 flows.

      By default, the inactive aging time of IPv6 flows is 30 seconds.

    3. Run the commit command to commit the configuration.
  • Configure forced aging.
    1. Run the reset netstream cache ipv6 slot slot-id command in the user view to forcibly age out all IPv6 flows on the device.

Configuring NetStream Flexible Flow Statistics Exporting

Context

Flexible IPv6 flow statistics can be exported only when you have specified a source IP address and at least one destination IP address for the exported packets.

Procedure

  1. Run the system-view command to enter the system view.
  2. Run the netstream export ipv6 source { ip-address | ipv6 ipv6-address } command to configure the source IP address for the exported packets carrying IPv6 flexible flow statistics.

    By default, the source IP address of the exported packets carrying IPv6 flexible flow statistics is not configured.

    If the source IP address is not specified, packets are not exported. The source address of the exported packets carrying IPv6 flexible flow statistics can be an IPv4 or IPv6 address. There must be a reachable route between the source IP address and destination IP address (NSC address). Two source IP addresses can be specified: one IPv4 address and one IPv6 address.

  3. Run the netstream export ipv6 host { ip-address | ipv6 ipv6-address } port-number command to configure the destination IP address for the exported packets carrying IPv6 flexible flow statistics.

    By default, the destination IP address of the exported packets carrying IPv6 flexible flow statistics is not configured. You can configure two destination IP addresses to implement NSC backup.

    To configure a third destination IP address, run the undo netstream export ipv6 host command to delete an existing one first; otherwise, the system displays a message indicating that the maximum number of IP addresses is exceeded and the configuration fails.

  4. Run the commit command to commit the configuration.

Configuring Versions for the Exported Packets

Procedure

  1. Run the system-view command to enter the system view.
  2. Run the netstream export ipv6 version 9 [ origin-as | peer-as ] [ bgp-nexthop ] command to set the version of the exported packets carrying IPv6 flexible flow statistics.

    By default, the version of the exported packets carrying IPv6 flexible flow statistics is not configured.

    The version of the exported packets carrying IPv6 flexible flow statistics is fixed as V9.

  3. (Optional) Run the netstream export ipv6 template timeout-rate timeout-interval command to set the interval at which the template is refreshed when the packets are exported in the format of V9.

    By default, the template is refreshed every 30 minutes.

  4. Run the commit command to commit the configuration.

Enabling Flexible Flow Statistics Collection on the Interface

Context

When configuring flexible NetStream, you need to enable flow statistics collection on an interface and apply a flexible flow statistics template on the interface to ensure successful statistics exporting.

Procedure

  1. Run the system-view command to enter the system view.
  2. Run the interface interface-type interface-number command to enter the interface view.
  3. Run the netstream record record-name ipv6 command to apply the IPv6 flexible flow statistics template to the interface.

    • Each interface can be configured with only one IPv6 flexible flow statistics template. To modify the flexible flow statistics template in an interface view, run the undo netstream record ipv6 command to delete the existing configuration, and then recreate one.

    • If an IPv6 flexible flow statistics template has been applied to an interface, the template configuration cannot be modified or deleted.

  4. Run the netstream { inbound | outbound } ipv6 command to enable the NetStream function on the interface to collect statistics about IPv6 flows.

    By default, the NetStream function for IPv6 flows is disabled on the interface.

  5. Run the commit command to commit the configuration.

Checking the Configuration

Context

You can run commands to verify the configuration of flexible flow statistics exporting.

Procedure

  • Run the display netstream cache ipv6 record record-name [ { inbound | outbound } | destination interface interface-type interface-number | destination ipv6 ipv6-address | destination port port-number | source interface interface-type interface-number | source ipv6 ipv6-address | source port port-number | flowlabel flowlabel | protocol protocol-type | tos tos-number ] * slot slot-id [ verbose ] command to check detailed NetStream statistics on IPv6 flexible flows on the device.
  • Run the display netstream export ipv6 template command to check the exported template information.
  • Run the display netstream statistics ipv6 slot slot-id command to check NetStream statistics about IPv6 flows on the device.
  • Run the display netstream { all | global | interface interface-type interface-number } command to check the NetStream configuration.

Configuring Layer 2 NetStream Flow Statistics Exporting

After the Layer 2 NetStream flow statistics exporting is configured, the NDE collects Layer 2 NetStream flow statistics and exports statistics to the NetStream server for further analysis.

Pre-configuration Tasks

Before configuring the Layer 2 NetStream flow statistics exporting, complete the following tasks:

  • Setting physical parameters of interfaces
  • Configuring link layer attributes for interfaces

Configuration Process

The configuration tasks of Layer 2 NetStream flows can be performed in any sequence.

Configuring NetStream Sampling

Context

You can set an interval for sampling packets so that only statistics about sampled packets are collected. The statistics show the flow status on the entire network. The sampling function reduces impact of NetStream on device performance.

Procedure

  1. Run the system-view command to enter the system view.
  2. NetStream sampling can be configured in two ways:

    • Configure NetStream sampling in the system view. The sampling configuration will take effect on all interfaces.

      Run the netstream sampler packet-interval { inbound | outbound } command to configure packet sampling on all interfaces.

      By default, packet sampling is not configured on all interfaces.

    • Configure NetStream sampling in the interface view. The sampling configuration will take effect on this interface.

      1. Run the interface interface-type interface-number command to enter the interface view.

      2. Run the netstream sampler random-packets packet-interval { inbound | outbound } command to configure packet sampling on the interface.

        By default, packet sampling is not configured on interfaces.

        IPv4 packet sampling configured in the system view takes effect on all interfaces on the device. If the function is configured in both the interface view and system view, the configuration in the interface view has priority.

  3. Run the commit command to commit the configuration.

Configuring NetStream Flow Aging

Context

When a NetStream flow is aged out, the device exports the flow statistics in the cache to the NSC using NetStream packets of a specified version.

NetStream flow aging modes include regular aging, byte-based aging, and forced aging. By default, the byte-based aging is enabled.

  • Regular aging

    • Active aging

      Active aging requires the device to periodically export statistics about the flows that persist for a long period. This aging mode is enabled on the device by default, and you only need to set the aging time.

    • Inactive aging

      Inactive aging clears unnecessary entries in the NetStream cache so that the system can fully leverage statistics entries. Inactive aging requires the device to export statistics about the flows that persist for a short period. Once adding packets to a flow stops, the device exports flow statistics to conserve memory space. This aging mode is enabled on the device by default, and you only need to set the aging time.

  • Forced aging

    Forced aging is used when you require the latest statistics, but you do not satisfy with the existing aging conditions or some flows fail to age out due to an anomaly. You can forcibly age out all the flows in the cache and export the flow statistics.

Procedure

  • Configure regular aging.

    Configure active aging.

    1. Run the system-view command to enter the system view.
    2. Run the netstream timeout ethernet active active-interval command to set the active aging time of Layer 2 NetStream flow statistics.

      By default, the active aging time of Layer 2 NetStream flow statistics is 30 minutes.

    3. Run the commit command to commit the configuration.

    Configure inactive aging.

    1. Run the system-view command to enter the system view.
    2. Run the netstream timeout ethernet inactive inactive-interval command to set the inactive time of Layer 2 NetStream flow statistics.

      By default, the inactive aging time of Layer 2 NetStream flow statistics is 30 seconds.

    3. Run the commit command to commit the configuration.
  • Configure forced aging.
    1. Run the reset netstream cache ethernet slot slot-id command in the user view to forcibly age out all Layer 2 NetStream flow statistics on the device.

Configuring NetStream Layer 2 NetStream Flow Statistics Exporting

Context

Layer 2 NetStream flow statistics can be exported only when you have specified a source IP address and at least one destination IP address for the exported packets.

Procedure

  1. Run the system-view command to enter the system view.
  2. Run the netstream export ethernet source { ip-address | ipv6 ipv6-address } command to configure the source IP address for the exported packets carrying Layer 2 NetStream flow statistics.

    By default, the source address of the exported packets carrying Layer 2 NetStream flow statistics is not configured.

    If the source IP address is not specified, packets are not exported. The source address of the exported packets carrying Layer 2 NetStream flow statistics can be an IPv4 or IPv6 address. There must be a reachable route between the source IP address and destination IP address (NSC address). Two source IP addresses can be specified: one IPv4 address and one IPv6 address.

  3. Run the netstream export ethernet host { ip-address | ipv6 ipv6-address } port-number command to configure the destination IP address for the exported packets carrying Layer 2 NetStream flow statistics.

    By default, the destination IP address of the exported packets carrying Layer 2 NetStream flow statistics is not configured.

    You can configure two destination IP addresses to implement NSC backup. To configure a third destination IP address, run the undo netstream export ethernet host command to delete an existing one first; otherwise, the system displays a message indicating that the maximum number of IP addresses is exceeded and the configuration fails.

  4. Run the commit command to commit the configuration.

Configuring Versions for the Exported Packets

Procedure

  1. Run the system-view command to enter the system view.
  2. Run the netstream export ethernet version 9 command to set the version of exported packets carrying Layer 2 NetStream flow statistics.

    By default, the export version for Layer 2 NetStream flow statistics is not set.

    The export version for Layer 2 NetStream flow statistics is fixed as V9.

  3. (Optional) Run the netstream export ethernet template timeout-rate timeout-interval command to set the interval at which the template is refreshed when the packets are exported in the format of V9.

    By default, the template is refreshed every 30 minutes.

  4. Run the commit command to commit the configuration.

Enabling Layer 2 NetStream Flow Statistics Collection on the Interface

Context

Layer 2 NetStream flow statistics can be exported only when you have enabled flow statistics on an interface.

Procedure

  1. Run the system-view command to enter the system view.
  2. Run the interface interface-type interface-number command to enter the interface view.
  3. Run the netstream { inbound | outbound } ethernet command to enable Layer 2 NetStream flow statistics collection on the interface.

    By default, Layer 2 NetStream flow statistics collection is disabled on interfaces.

  4. Run the commit command to commit the configuration.

Checking the Configuration

Context

You can run commands to verify the configuration of Layer 2 NetStream flow statistics exporting.

Procedure

  • Run the display netstream cache ethernet [ { inbound | outbound } | destination interface interface-type interface-number | destination mac-address mac-address | source interface interface-type interface-number | source mac-address mac-address | ethernet-type ethernet-type | vlan vlan-id ] * slot slot-id [ verbose ] command to check detailed statistics about Layer 2 NetStream flows on the device.
  • Run the display netstream export ethernet template command to check the exported template information.
  • Run the display netstream statistics ethernet slot slot-id command to check Layer 2 NetStream flow statistics on the device.
  • Run the display netstream { all | global | interface interface-type interface-number } command to check the NetStream configuration.

Configuring the AS Number Format and Interface Index Length on an IPv4 Network

The AS number format and interface index length configured on the NDE must be the same as those configured on the NSC; otherwise, the NSC cannot resolve the NetStream packets sent from the NDE.

Context

Follow the principles to configure the AS number format and interface index length:
  • AS number format: According to RFC recommendations, IP packets carry 16-bit AS numbers; however, in some networks, IP packets carry 32-bit AS numbers. To ensure that the NDE can collect flow statistics between ASs, you may need to set the AS number format on the NDE.

  • Interface index: The NMS obtains interface information of the exported packets according to the interface indexes in NetStream packets. Interface index formats include 16-bit and 32-bit. The NMS devices of different vendors may use different interface index formats. The interface index format used by the NDE must be the same as the interface index format used by the NMS. For example, if the NMS can parse 32-bit interface indexes, set the format of the interface indexes contained in exported NetStream packets to 32-bit.

Before configuring the AS number format and interface index length on an IPv4 network, pay attention to the following points:
  • On a network using 32-bit AS numbers, the NMS must be able to identify the 32-bit AS numbers; otherwise, the NMS cannot identify inter-AS traffic.
  • The interface index length can be set only when the export version is V9.
  • The AS mode and interface index length of IPv4 network need to be configured together with the NetStream function.

Procedure

  1. Configure the flow statistics exporting function according to the following scenarios:

  2. Run the system-view command to enter the system view.
  3. Run the netstream as-mode { 16 | 32 } command to set the AS number format.

    By default, a device uses 16-bit AS numbers.

  4. Run the netstream export ip index-switch index-switch command to set the interface index length in the exported packets carrying IPv4 flow statistics.

    By default, 16-bit interface indexes are contained in the exported packets carrying IPv4 flow statistics. To change the interface index length from 16-bit to 32-bit, ensure that the following requirements are met:
    • The export version of original flows is V9.
    • The export version of all aggregation flows is V9.

  5. Run the commit command to commit the configuration.

Checking the Configuration

  • Run the display netstream { all | global | interface interface-type interface-number } command to check the NetStream configuration.

Configuring the AS Number Format and Interface Index Length on an IPv6 Network

The AS number format and interface index length configured on the NDE must be the same as those configured on the NSC; otherwise, the NSC cannot resolve the NetStream packets sent from the NDE.

Context

Follow the principles to configure the AS number format and interface index length:
  • AS number format: According to RFC recommendations, IP packets carry 16-bit AS numbers; however, in some networks, IP packets carry 32-bit AS numbers. To ensure that the NDE can collect flow statistics between ASs, you may need to set the AS number format on the NDE.

  • Interface index: The NMS obtains interface information of the exported packets according to the interface indexes in NetStream packets. Interface index formats include 16-bit and 32-bit. The NMS devices of different vendors may use different interface index formats. The interface index format used by the NDE must be the same as the interface index format used by the NMS. For example, if the NMS can parse 32-bit interface indexes, set the format of the interface indexes contained in exported NetStream packets to 32-bit.

Before configuring the AS number format and interface index length on an IPv6 network, pay attention to the following points:
  • On a network using the 32-bit AS number format, the NMS must be able to identify the 32-bit AS numbers. Otherwise, the NMS cannot identify inter-AS flows sent from devices.
  • The AS mode and interface index length of IPv6 network need to be configured together with the NetStream function.

Procedure

  1. Configure the flow statistics exporting function according to the following scenarios:

  2. Run the system-view command to enter the system view.
  3. Run the netstream as-mode { 16 | 32 } command to set the AS number format.

    By default, a device uses 16-bit AS numbers.

  4. Run the netstream export ipv6 index-switch index-switch command to set the interface index length in the exported packets carrying IPv6 flow statistics

    By default, 16-bit interface indexes are contained in the exported packets carrying IPv6 flow statistics.

  5. Run the commit command to commit the configuration.

Checking the Configuration

  • Run the display netstream { all | global | interface interface-type interface-number } command to check the NetStream configuration.

Configuring the Interface Index Length in Layer 2 NetStream Flows

The interface index length configured on the NDE must be the same as those configured on the NSC; otherwise, the NSC cannot resolve the NetStream packets sent from the NDE.

Context

Follow the principles to configure the interface index length:

The NMS obtains interface information of the exported packets according to the interface indexes in NetStream packets. Interface index formats include 16-bit and 32-bit. The NMS devices of different vendors may use different interface index formats. The interface index format used by the NDE must be the same as the interface index format used by the NMS. For example, if the NMS can parse 32-bit interface indexes, set the format of the interface indexes contained in exported NetStream packets to 32-bit.

Procedure

  1. The interface index length in Layer 2 NetStream flows must be configured together with the Layer 2 NetStream Statistics collection function.

  2. Run the system-view command to enter the system view.
  3. Run the netstream export ethernet index-switch index-switch command to set the number of digits in the interface index contained in an exported packet carrying Layer 2 NetStream statistics.

    By default, 16-bit interface indexes are contained in the exported packets carrying Layer 2 NetStream flow statistics.

  4. Run:

    commit

    The configuration is committed.

Checking the Configuration

  • Run the display netstream { all | global | interface interface-type interface-number } command to check the NetStream configuration.
Translation
Download
Updated: 2019-12-13

Document ID: EDOC1000041694

Views: 60948

Downloads: 3623

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next