12-Network Management and Monitoring Configuration Guide

HomeSupportRoutersH3C SR8800 Router SeriesConfigure & DeployConfiguration GuidesH3C SR8800 Configuration Guide-Release3347-6W10312-Network Management and Monitoring Configuration Guide
10-NetStream Configuration
Title Size Download
10-NetStream Configuration 272.62 KB

 

 

NOTE:

In this documentation, SPC cards refer to the cards prefixed with SPC, for example, SPC-GT48L. SPE cards refer to the cards prefixed with SPE, for example, SPE-1020-E-II. NAM cards refer to the cards prefixed with IM-NAM, for example, IM-NAM-II.

 

NetStream overview

Conventional traffic statistics collection methods, like SNMP and port mirroring, cannot provide precise network management because of inflexible statistical methods or high cost (dedicated servers are required). This calls for a new technology to collect traffic statistics.

NetStream provides statistics on network traffic flows and can be deployed on access, distribution, and core layers.

The NetStream technology implements the following features:

·           Accounting and billing—NetStream provides fine-gained data about the network usage based on the resources such as lines, bandwidth, and time periods. The Internet service providers (ISPs) can use the data for billing based on time period, bandwidth usage, application usage, and quality of service (QoS). The enterprise customers can use this information for department chargeback or cost allocation.

·           Network planning—NetStream data provides key information, for example the autonomous system (AS) traffic information, for optimizing the network design and planning. This helps maximize the network performance and reliability when minimizing the network operation cost.

·           Network monitoring—Configured on the Internet interface, NetStream allows for traffic and bandwidth utilization monitoring in real time. Based on this, administrators can understand how the network is used and where the bottleneck is, better planning the resource allocation.

·           User monitoring and analysis—The NetStream data provides detailed information about network applications and resources. This information helps network administrators efficiently plan and allocate network resources, and guarantee network security.

NetStream basic concepts

Flow

NetStream is an accounting technology to provide statistics on a per-flow basis. An IPv4 flow is defined by the 7-tuple elements: destination IP address, source IP address, destination port number, source port number, protocol number, type of service (ToS), and inbound or outbound interface. The 7-tuple elements define a unique flow.

NetStream operation

A typical NetStream system comprises the following parts: NetStream data exporter (NDE), NetStream collector (NSC), and NetStream data analyzer (NDA).

·           NDE

The NDE analyzes traffic flows that pass through it, collects necessary data from the target flows, and exports the data to the NSC. Before exporting data, the NDE may process the data like aggregation. A device with NetStream configured acts as an NDE.

·           NSC

The NSC is usually a program running in UNIX or Windows. It parses the packets sent from the NDE, stores the statistics to the database for the NDA. The NSC gathers the data from multiple NDEs, then filters and aggregates the total received data.

·           NDA

The NDA is a network traffic analysis tool. It collects statistics from the NSC, and performs further process, generates various types of reports for applications of traffic billing, network planning, and attack detection and monitoring. Typically, the NDA features a Web-based system for users to easily obtain, view, and gather the data.

Figure 1 NetStream system

 

As shown in Figure 1, the following procedure of NetStream data collection and analysis occurs:

1.       The NDE, that is the device configured with NetStream, periodically delivers the collected statistics to the NSC.

2.       The NSC processes the statistics, and then sends the results to the NDA.

3.       The NDA analyzes the statistics for accounting, network planning, and the like.

 

 

NOTE:

·       This document focuses on the description and configuration of NDE.

·       NSC and NDA are usually integrated into a NetStream server.

 

NetStream key technologies

Flow aging

The flow aging in NetStream enables the NDE to export NetStream data to the NetStream server. NetStream creates a NetStream entry for each flow in the cache and each entry stores the flow statistics. When the timer of the entry expires, the NDE exports the summarized data to the NetStream server in a specific NetStream version export format.

The following types of NetStream flow aging are available:

·           Periodical aging

·           Forced aging

·           TCP FIN- and RST-triggered aging (it is automatically triggered when a TCP connection is terminated)

Periodical aging

Periodical aging uses these approaches: inactive flow aging and active flowing aging.

·           Inactive flow aging

A flow is considered inactive if its statistics have not been changed, that is, no packet for this NetStream entry arrives in the time specified by the ip netstream timeout inactive command. The inactive flow entry remains in the cache until the inactive timer expires. Then the inactive flow is aged out and its statistics, which can no longer be displayed by the display ip netstream cache command, are sent to the NetStream server. The inactive flow aging guarantees the cache is big enough for new flow entries.

·           Active flow aging

An active flow is aged out when the time specified by the ip netstream timeout active command is reached, and its statistics are exported to the NetStream server. The device continues to count the active flow statistics, which can be displayed by the display ip netstream cache command. The active flow aging exports the statistics of active flows to the NetStream server.

Forced aging

The reset ip netstream statistics command ages out all NetStream entries in the cache and clears the statistics. This is forced aging. Alternatively, use the ip netstream max-entry command to configure aging out of entries in the cache when the maximum number of entries is reached.

TCP FIN- and RST-triggered aging

For a TCP connection, when a packet with a FIN or RST flag is sent out, it means that a session is finished. When a packet with a FIN or RST flag is recorded for a flow with the NetStream entry already created, the flow is aged out immediately. This type of aging is enabled by default, and cannot be disabled.

NetStream data export

NetStream common data export

The NetStream collects statistics of each flow and, when the entry timer expires, exports the data of each entry to the NetStream server.

Though the data includes statistics of each flow, this method consumes more bandwidth and CPU, and requires large cache size. In most cases, not all the statistics are necessary for analysis.

NetStream aggregation data export

The NetStream aggregation merges the flow statistics according to the aggregation criteria of an aggregation mode, and sends the summarized data to the NetStream server. This process is the NetStream aggregation data export, which decreases the bandwidth usage compared to common data export.

For example, the aggregation mode configured on the NDE is protocol-port, which means to aggregate statistics of flow entries by protocol number, source port and destination port. Four NetStream entries record four TCP flows with the same destination address, source port and destination port but different source addresses. According to the aggregation mode, only one NetStream aggregation flow is created and sent to the NetStream server.

Table 1 lists the 12 aggregation modes. In each mode, the system merges flows into one aggregation flow if the aggregation criteria are of the same value. These 12 aggregation modes work independently and can be configured on the same interface.

Table 1 NetStream aggregation modes

Aggregation mode

Aggregation criteria

AS aggregation

·       Source AS number

·       Destination AS number

·       Inbound interface index

·       Outbound interface index

Protocol-port aggregation

·       Protocol number

·       Source port

·       Destination port

Source-prefix aggregation

·       Source AS number

·       Source address mask length

·       Source prefix

·       Inbound interface index

Destination-prefix aggregation

·       Destination AS number

·       Destination address mask length

·       Destination prefix

·       Outbound interface index

Prefix aggregation

·       Source AS number

·       Destination AS number

·       Source address mask length

·       Destination address mask length

·       Source prefix

·       Destination prefix

·       Inbound interface index

·       Outbound interface index

Prefix-port aggregation

·       Source prefix

·       Destination prefix

·       Source address mask length

·       Destination address mask length

·       ToS

·       Protocol number

·       Source port

·       Destination port

·       Inbound interface index

·       Outbound interface index

ToS-AS aggregation

·       ToS

·       Source AS number

·       Destination AS number

·       Inbound interface index

·       Outbound interface index

ToS-source-prefix aggregation

·       ToS

·       Source AS number

·       Source prefix

·       Source address mask length

·       Inbound interface index

ToS-destination-prefix aggregation

·       ToS

·       Destination AS number

·       Destination address mask length

·       Destination prefix

·       Outbound interface index

ToS- prefix aggregation

·       ToS

·       Source AS number

·       Source prefix

·       Source address mask length

·       Destination AS number

·       Destination address mask length

·       Destination prefix

·       Inbound interface index

·       Outbound interface index

ToS-protocol-port aggregation

·       ToS

·       Protocol type

·       Source port

·       Destination port

·       Inbound interface index

·       Outbound interface index

ToS-BGP-nexthop

·       ToS

·       Border Gateway Protocol (BGP) next hop

·       Outbound interface index

 

 

NOTE:

·       In an aggregation mode with AS, if the packets are not forwarded according to the BGP routing table, the statistics on the AS number cannot be obtained.

·       In the aggregation mode of ToS-BGP-nexthop, if the packets are not forwarded according to the BGP routing table, the statistics on the BGP next hop cannot be obtained.

 

NetStream export formats

NetStream exports data in UDP datagrams in one of the following formats:

·           Version 5—Exports original statistics collected based on the 7-tuple elements. The packet format is fixed and cannot be extended flexibly.

·           Version 8—Supports NetStream aggregation data export. The packet formats are fixed and cannot be extended flexibly.

·           Version 9—The most flexible format. It allows users to define templates with different statistics fields. The template-based feature provides support of different statistics, such as BGP next hop and MPLS information.

NetStream sampling

NetStream sampling basically reflects the network traffic information by collecting statistics on fewer packets. The reduced statistics to be transferred also bring down the impact on the router performance. For more information about sampling, see the chapter “Configuring a sampler.”

NetStream configuration task list

Before you configure NetStream, determine the following proper configurations as needed:

·           Make sure on which router you want to enable NetStream.

·           If multiple service flows are passing the NDE, use an ACL or QoS policy to select the target data.

·           If enormous traffic flows are on the network, configure NetStream sampling.

·           Determine which export format is used for NetStream data export.

·           Configure the timer for NetStream flow aging.

·           To reduce the bandwidth consumption of NetStream data export, configure NetStream aggregation.

Figure 2 NetStream configuration flow

 

Complete these tasks to configure NetStream:

 

Task

Remarks

Configuring NetStream

Required

Configuring NetStream sampling

Optional

Configuring attributes of NetStream export data

Optional

Configuring NetStream flow aging

Optional

Configuring NetStream data export

Configuring NetStream common data export

Required

Use at least one approach.

Configuring NetStream aggregation data export

 

Configuring NetStream

Configuring QoS-based NetStream

 

 

NOTE:

NetStream-capable cards include NAM cards, SPC cards, and SPE cards. A QoS policy cannot be applied to the outgoing traffic of interfaces on SPC cards. For information about configuring NetStream on an SPC card, see Configuring NetStream on an SPC card.

 

Before you configure NetStream, configure QoS first to identify the traffic matching the classification criteria and configure a traffic behavior with the action of mirroring the identified traffic to a NetStream interface of a NetStream-capable card (SPC card, SPE card, or NAM card). For more information about class, traffic behavior, QoS policy, see ACL and QoS Configuration Guide.

To configure QoS-based NetStream:

 

Step

Command

Remarks

1.      Enter system view.

system-view

N/A

2.      Enable NetStream.

ip netstream

By default, NetStream is disabled.

3.      Define a class and enter its view.

traffic classifier classifier-name [ operator { and | or } ]

N/A

4.      Define a match criterion.

if-match match-criteria

N/A

5.      Return to system view.

quit

N/A

6.      Create a traffic behavior and enter traffic behavior view.

traffic behavior behavior-name

N/A

7.      Configure the action of mirroring traffic to the interface on a NetStream card.

mirror-to interface Net-Stream interface-number

By default, no action of traffic mirroring is configured.

8.      Return to system view.

quit

N/A

9.      Create a policy and enter its view.

qos policy policy-name

N/A

10.   Specify a behavior for a class in the policy.

classifier classifier-name behavior behavior-name

N/A

11.   Return to system view.

quit

N/A

12.   Enter interface view.

interface interface-type interface-number

N/A

13.   Apply a QoS policy.

qos apply policy policy-name { inbound | outbound }

N/A

 

Configuring NetStream on an SPC card

 

 

NOTE:

·       This feature is supported by SPC cards only.

·       To enable NetStream on an interface of an SPC card, NetStream sampling is required.

 

To configure NetStream on an SPC card:

 

Step

Command

Remarks

1.      Enter system view.

system-view

N/A

2.      Create a sampler.

sampler sampler-name mode fixed packet-interval rate

The rate argument specifies the sampling rate, that is, the number of packets in each sampling, which equals the 2 to the power of rate. For example, if the rate is 8, one packet out of 256 packets (2 to the power of 8) is sampled in each sampling; if the rate is 10, one packet out of 1024 packets (2 to the power of 10) is sampled.

3.      Enter interface view.

interface interface-type interface-number

N/A

4.      Enable NetStream sampling.

ip netstream sampler sampler-name { inbound | outbound }

By default, NetStream sampling is disabled.

5.      Mirror the sampled traffic to a NetStream interface for statistics collection.

ip netstream mirror-to interface Net-Stream interface-number [ backup-interface Net-Stream interface-number ] { inbound | outbound }

N/A

 

Configuring NetStream sampling

A sampler must be created by using the sampler command before being referenced by NetStream sampling. For more information about sampler, see the chapter “Sampler configuration.”

Configuring NetStream sampling

To configure NetStream sampling:

 

Step

Command

Remarks

1.      Enter system view.

system-view

N/A

2.      Create a traffic behavior and enter traffic behavior view.

traffic behavior behavior-name

N/A

3.      Mirror the traffic to a NetStream interface for statistics collection.

mirror-to interface Net-Stream interface-number [ backup-interface Net-Stream interface-number ] sampler sampler-name

Optional.

By default, traffic mirroring is disabled.

 

 

NOTE:

·       For more information about NetStream sampling configuration on an SPC card, see Configuring NetStream on an SPC card.

·       A sampler that is referenced by NetStream sampling cannot be deleted.

·       The collected statistics of different sampling mode or rate cannot be aggregated.

·       Statistics of different sampling mode or rate cannot be exported in the same version 5 or 8 format.

 

Configuring attributes of NetStream export data

Configuring NetStream export format

The NetStream export format configures to export NetStream data in version 5 or version 9 formats, and the data fields can be expanded to contain more information, such as the following information:

·           Statistics about source AS, destination AS, and peer ASs in version 5 or version 9 export format.

·           Statistics about BGP next hop in version 9 format only.

To configure the NetStream export format:

 

Step

Command

Remarks

1.      Enter system view.

system-view

N/A

2.      Configure the version for NetStream export format, and specify whether to record AS and BGP next hop information.

ip netstream export version 5 [ origin-as | peer-as ]

ip netstream export version 9 [ origin-as | peer-as ] [ bgp-nexthop ]

Optional.

By default, NetStream common data export uses version 5; IPv4 NetStream aggregation data export uses version 8; MPLS flow data is not exported; the peer AS numbers are exported; the BGP next hop is not exported.

 

 

NOTE:

For more information about AS and BGP, see Layer 3IP Routing Configuration Guide.

 

A NetStream entry for a flow records the source IP address and destination IP address, each with two AS numbers. The source AS from which the flow originates and the peer AS from which the flow travels to the NetStream-enabled device are for the source IP address; the destination AS to which the flow is destined and the peer AS to which the NetStream-enabled device passes the flow are for the destination IP address.

To specify which AS numbers to be recorded for the source and destination IP addresses, include keyword peer-as or origin-as. For example, as shown in Figure 3, a flow starts from AS 20, passes AS 21 through AS 23, and reaches AS 24. NetStream is enabled on the device in AS 22. If keyword peer-as is provided, the command records AS 21 as the source AS, and AS 23 as the destination AS. If keyword origin-as is provided, the command records AS 20 as the source AS and AS 24 as the destination AS.

Figure 3 Recorded AS information varies with different keywords

 

Configuring refresh rate for NetStream version 9 templates

Version 9 is template-based and supports user-defined formats, so the NetStream-enabled router needs to resend a new template to the NetStream server for an update. If the version 9 format is changed on the router and not updated on the NetStream server, the server is unable to associate the received statistics with its proper fields. To avoid such situation, configure the refresh frequency and rate for version 9 templates so that the NetStream server can refresh the templates on time.

To configure the refresh rate for NetStream version 9 templates:

 

Step

Command

Remarks

1.      Enter system view.

system-view

N/A

2.      Configure the refresh frequency for NetStream version 9 templates.

ip netstream export v9-template refresh-rate packet packets

Optional.

By default, the version 9 templates are sent every 20 packets.

3.      Configure the refresh interval for NetStream version 9 templates.

ip netstream export v9-template refresh-rate time minutes

Optional.

By default, the version 9 templates are sent every 30 minutes.

 

 

NOTE:

The refresh frequency and interval can be both configured, and the template is resent when either of the condition is reached.

 

Configuring MPLS-aware NetStream

Introduction to MPLS-aware NetStream

When you configure MPLS-aware NetStream, you can set whether to collect and export statistics about the three labels of MPLS packets. For MPLS packets that carry non-IPv4 data, NetStream records only statistics on labels (up to three). For MPLS packets that carry IPv4 data, NetStream records statistics on labels (up to three) in the label stack, forwarding equivalent class (FEC) corresponding to the top label, and the traditional 7-tuple elements data. For more information about MPLS, see MPLS Configuration Guide.

Configuring MPLS-aware NetStream

To configure MPLS-aware NetStream:

 

Step

Command

Remarks

1.      Enter system view.

system-view

N/A

2.      Configure to count and export statistics on MPLS packets.

ip netstream mpls [ label-positions { label-position1 [ label-position2 ] [ label-position3 ] } ] [ no-ip-fields ]

By default, no statistics about MPLS packets are counted and exported.

 

 

NOTE:

·       Collection of NetStream MPLS packet statistics is supported only when NetStream is enabled.

·       To collect statistics about MPLS packets carrying IPv4 data, enable IPv4 NetStream.

·       To collect statistics about MPLS packets carrying IPv6 data, enable IPv6 NetStream. For more information about IPv6 NetStream, see the chapter “IPv6 NetStream configuration.

·       To collect statistics about MPLS packets carrying neither IPv4 nor IPv6 data, enable IPv4 NetStream.

·       On a NAM card, to collect statistics about MPLS packets carrying non-IPv4 data, enable IPv4 NetStream. Only the statistics about labels are collected.

 

Configuring NetStream flow aging

To configure flow aging:

 

Step

Command

Remarks

1.      Enter system view.

system-view

N/A

2.      Configure periodical aging.

·       Set the aging timer for active flows:
ip netstream timeout active minutes

·       Set the aging timer for inactive flows:
ip netstream timeout inactive seconds

Optional.

By default:

·       The aging timer for active flows is 30 minutes.

·       The aging timer for inactive flows is 30 seconds.

3.      Configure forced aging of the NetStream entries.

a.   Set the maximum number of entries that the cache can accommodate, and the processing method when the upper limit is reached:
ip netstream max-entry { max-entries | aging | disable-caching }

b.   Configure forced aging:
reset ip netstream statistics

Optional.

By default, the maximum number of entries that the NetStream cache can accommodate is 409600.

The reset ip netstream statistics command also clears the cache.

 

 

NOTE:

You can configure both the aging timer for active flows and the aging timer for inactive flows. When either timer for a flow expires, the flow is aged out.

 

Configuring NetStream data export

To allow the NDE to export collected statistics to the NetStream server, configure the source interface out of which the data is sent and the destination address to which the data is sent.

Configuring NetStream common data export

To configure NetStream common data export:

 

Step

Command

Remarks

1.      Enter system view.

system-view

N/A

2.      Configure the destination address for the NetStream common data export.

ip netstream export host ip-address udp-port [ vpn-instance vpn-instance-name ]

By default, no destination address is configured, in which case, the NetStream common data is not exported.

3.      Configure the source interface for NetStream common data export.

ip netstream export source interface interface-type interface-number

Optional.

By default, the interface where the NetStream data is sent out (the interface connects to the NetStream server) is used as the source interface.

H3C recommends that you connect the network management interface to the NetStream server and configure it as the source interface.

4.      Limit the data export rate.

ip netstream export rate rate

Optional.

By default, the data export rate is not limited.

 

Configuring NetStream aggregation data export

NetStream aggregation can be implemented by software or hardware. Generally, the term of NetStream aggregation refers to the implementation by software, unless otherwise noted.

The NetStream hardware aggregation directly merges the statistics of data flows at the hardware layer according to the aggregation criteria of a specific aggregation mode, and stores the NetStream hardware aggregation data in the cache. When the timer for the hardware aggregation entry expires, the data is exported. This greatly reduces the resource consumption by NetStream aggregation.

Without hardware aggregation configured, the NetStream data aggregation is implemented by software.

To configure NetStream aggregation data export:

 

Step

Command

Remarks

1.      Enter system view.

system-view

N/A

2.      Configure the NetStream hardware aggregation.

ip netstream aggregation advanced

Optional.

By default, NetStream hardware aggregation is disabled.

3.      Set a NetStream aggregation mode and enter its view.

ip netstream aggregation { as | destination-prefix | prefix | prefix-port | protocol-port | source-prefix | tos-as | tos-destination-prefix | tos-prefix | tos-protocol-port | tos-source-prefix | tos-bgp-nexthop }

N/A

4.      Configure the destination address for the NetStream aggregation data export.

ip netstream export host ip-address udp-port [ vpn-instance vpn-instance-name ]

By default, no destination address is configured in NetStream aggregation view. Its default destination address is that configured in system view.

If you expect to export only NetStream aggregation data, configure the destination address in related aggregation view only.

5.      Configure the source interface for NetStream aggregation data export.

ip netstream export source interface interface-type interface-number

Optional.

By default, the interface connecting to the NetStream server is used as the source interface.

·       Source interfaces in different aggregation views can be different.

·       If no source interface is configured in aggregation view, the source interface configured in system view is used.

·       H3C recommends that you connect the network management interface to the NetStream server.

6.      Enable the current NetStream aggregation configuration.

enable

By default, the current NetStream aggregation configuration is disabled..

 

 

NOTE:

·       Configurations in NetStream aggregation view apply to aggregation data export only, and those in system view apply to common data export. If configurations in NetStream aggregation view are not provided, the configurations in system view apply to the aggregation data export.

·       The aging of NetStream hardware aggregation entries is exactly the same as the aging of NetStream common data entries.

·       NetStream hardware aggregation is supported by NAM cards.

·       NetStream hardware aggregation data export and NetStream common data export are mutually exclusive. Hardware aggregation does not take effect if the destination address for NetStream common data export is configured (by using the ip netstream export host command in system view).

 

Displaying and maintaining NetStream

 

Task

Command

Remarks

Display the NetStream entry information in the cache.

display ip netstream cache [ verbose ] [ slot slot-number ] [ | { begin | exclude | include } regular-expression ]

Available in any view

Display information about NetStream data export.

display ip netstream export [ | { begin | exclude | include } regular-expression ]

Available in any view

Display the configuration and status of the NetStream flow record templates.

display ip netstream template [ slot slot-number ] [ | { begin | exclude | include } regular-expression ]

Available in any view

Clear the cache, age out and export all NetStream data.

reset ip netstream statistics

Available in user view

 

NetStream configuration examples

QoS-based NetStream configuration example

Network requirements

As shown in Figure 4, configure NetStream on Router A to collect statistics on packets passing through it. Enable NetStream in the inbound direction on GigabitEthernet 6/1/7. Configure to export NetStream data to UDP port 5000 of the NetStream server at 12.110.2.2/16.

Figure 4 Network diagram

 

 

Configuration procedure

# Configure a QoS policy to mirror traffic entering GigabitEthernet 6/1/7 to NetStream interface 2/0/1.

[RouterA] acl number 2005

[RouterA-acl-basic-2005] rule 1 permit source any

[RouterA-acl-basic-2005] quit

[RouterA] traffic classifier ns_ipv4

[RouterA-classifier-ns_ipv4] if-match acl 2005

[RouterA-classifier-ns_ipv4] quit

[RouterA] traffic behavior ns_ipv4

[RouterA-behavior-ns_ipv4] mirror-to interface Net-Stream 2/0/1

[RouterA-behavior-ns_ipv4] quit

[RouterA] qos policy ns_ipv4

[RouterA-qospolicy-ns_ipv4] classifier ns_ipv4 behavior ns_ipv4

[RouterA-qospolicy-ns_ipv4] quit

# Apply the QoS policy to the inbound direction of GigabitEthernet 6/1/7.

[RouterA] interface GigabitEthernet6/1/7

[RouterA-GigabitEthernet6/1/7] qos apply policy ns_ipv4 inbound

[RouterA-GigabitEthernet6/1/7] quit                                   

# Enable NetStream on Router A. Specify to export NetStream data to IP address 12.110.2.2 and port 5000 (the NetStream server), leaving the default for source address.

[RouterA] ip netstream

[RouterA] ip netstream export host 12.110.2.2 5000

NetStream aggregation data export configuration example

Network requirements

As shown in Figure 5, configure NetStream on Router A so that:

·           Router A exports NetStream traditional data in version 5 format to port 5000 of the NetStream server at 4.1.1.1/16.

·           Router A performs NetStream aggregation in the modes of AS, protocol-port, source-prefix, destination-prefix and prefix. Use version 8 export format to send the aggregation data of different modes to the destination address at 4.1.1.1, with UDP port 2000, 3000, 4000, 6000, and 7000 respectively.

 

 

NOTE:

All the routers in the network are running EBGP. For more information about BGP, see Layer 3IP Routing Configuration Guide.

 

Figure 5 Network diagram

 

 

Configuration procedure

# Configure network management interface M-Ethernet 6/0/0.

<RouterA> system-view

[RouterA] interface M-Ethernet6/0/0

[RouterA-M-Ethernet6/0/0] ip address 4.1.1.2 255.255.0.0

[RouterA-M-Ethernet6/0/0] quit

# Configure a QoS policy to mirror traffic entering GigabitEthernet 3/1/1 to NetStream interface 2/0/1.

[RouterA] acl number 2005

[RouterA-acl-basic-2005] rule 1 permit source any

[RouterA-acl-basic-2005] quit

[RouterA] traffic classifier ns_ipv4

[RouterA-classifier-ns_ipv4] if-match acl 2005

[RouterA-classifier-ns_ipv4] quit

[RouterA] traffic behavior ns_ipv4

[RouterA-behavior-ns_ipv4] mirror-to interface Net-Stream 2/0/1

[RouterA-behavior-ns_ipv4] quit

[RouterA] qos policy ns_ipv4

[RouterA-qospolicy-ns_ipv4] classifier ns_ipv4 behavior ns_ipv4

[RouterA-qospolicy-ns_ipv4] quit

# Apply the QoS policy to GigabitEthernet 3/1/1.

[RouterA] interface GigabitEthernet 3/1/1

[RouterA-GigabitEthernet3/1/1] qos apply policy ns_ipv4 inbound

[RouterA-GigabitEthernet3/1/1] quit

# Enable NetStream on Router A.

[RouterA] ip netstream

# Configure to export NetStream data in version 5 format and specify the data to include the source AS and destination AS.

[RouterA] ip netstream export version 5 origin-as

# In system view, configure the destination address for the NetStream traditional data export with the IP address 4.1.1.1 and port 5000.

[RouterA] ip netstream export host 4.1.1.1 5000

[RouterA] ip netstream export source interface M-Ethernet6/0/0

# Configure the aggregation mode as AS, and in aggregation view configure the destination address for the NetStream AS aggregation data export.

[RouterA] ip netstream aggregation as

[RouterA-ns-aggregation-as] enable

[RouterA-ns-aggregation-as] ip netstream export host 4.1.1.1 2000

[RouterA-ns-aggregation-as] ip netstream export source interface M-Ethernet6/0/0

[RouterA-ns-aggregation-as] quit

# Configure the aggregation mode as protocol-port, and in aggregation view configure the destination address for the NetStream protocol-port aggregation data export.

[RouterA] ip netstream aggregation protocol-port

[RouterA-ns-aggregation-protport] enable

[RouterA-ns-aggregation-protport] ip netstream export host 4.1.1.1 3000

[RouterA-ns-aggregation-protport] ip netstream export source interface M-Ethernet6/0/0

[RouterA-ns-aggregation-protport] quit

# Configure the aggregation mode as source-prefix, and in aggregation view configure the destination address for the NetStream source-prefix aggregation data export.

[RouterA] ip netstream aggregation source-prefix

[RouterA-ns-aggregation-srcpre] enable

[RouterA-ns-aggregation-srcpre] ip netstream export host 4.1.1.1 4000

[RouterA-ns-aggregation-srcpre] ip netstream export source interface M-Ethernet6/0/0

[RouterA-ns-aggregation-srcpre] quit

# Configure the aggregation mode as destination-prefix, and in aggregation view configure the destination address for the NetStream destination-prefix aggregation data export.

[RouterA] ip netstream aggregation destination-prefix

[RouterA-ns-aggregation-dstpre] enable

[RouterA-ns-aggregation-dstpre] ip netstream export host 4.1.1.1 6000

[RouterA-ns-aggregation-dstpre] ip netstream export source interface M-Ethernet6/0/0

[Sysname-ns-aggregation-dstpre] quit

# Configure the aggregation mode as prefix, and in aggregation view configure the destination address for the NetStream prefix aggregation data export.

[RouterA] ip netstream aggregation prefix

[RouterA-ns-aggregation-prefix] enable

[RouterA-ns-aggregation-prefix] ip netstream export host 4.1.1.1 7000

[RouterA-ns-aggregation-prefix] ip netstream export source interface M-Ethernet6/0/0

[RouterA-ns-aggregation-prefix] quit

NetStream aggregation data export on an SPC card configuration example

Network requirements

As shown in Figure 6, configure NetStream on Router A as follows:

·           Configure NetStream sampling to reduce the amount of packets to be counted, thus reducing the impact on the router forwarding perform.

·           Configure Router A to export NetStream traditional data in version 5 format to port 5000 of the NetStream server at 4.1.1.1/16.

·           Configure Router A to perform NetStream aggregation in the modes of AS, protocol-port, source-prefix, destination-prefix and prefix. Use version 8 export format to send the aggregation data of different modes to the destination address at 4.1.1.1, with UDP port 2000, 3000, 4000, 6000, and 7000 respectively.

 

 

NOTE:

All the routers in the network are running EBGP. For more information about BGP, see Layer 3IP Routing Configuration Guide.

 

Figure 6 Network diagram

 

Configuration procedure

# Configure network management interface M-Ethernet 6/0/0.

<RouterA> system-view

[RouterA] interface M-Ethernet6/0/0

[RouterA-M-Ethernet6/0/0] ip address 4.1.1.2 255.255.0.0

[RouterA-M-Ethernet6/0/0] quit

# Create a sampler named ns1 in fixed sampling mode. Set the sampling rate to 4, which means in each sampling, one packet out of 16 packets (2 to the power of 4) is sampled.

[RouterA]sampler ns1 mode fixed packet-interval 4

# Enable NetStream sampling in the outbound direction of GigabitEthernet 3/0/2 and mirror the sampled packets to the NetStream interface.

[RouterA] interface GigabitEthernet 3/0/2

[RouterA-GigabitEthernet3/0/2] ip netstream sampler ns1 outbound

[RouterA-GigabitEthernet3/0/2] ip netstream mirror-to interface Net-Stream 3/0/1 outbound

[RouterA-GigabitEthernet3/0/2] quit

# Enable NetStream on Router A.

[RouterA] ip netstream

# Configure to export NetStream data in version 5 format and specify the data to include the source AS and destination AS.

[RouterA] ip netstream export version 5 origin-as

# In system view, configure the destination address for the NetStream traditional data export with the IP address 4.1.1.1 and port 5000.

[RouterA] ip netstream export host 4.1.1.1 5000

[RouterA] ip netstream export source interface M-Ethernet6/0/0

# Configure the aggregation mode as AS, and in aggregation view configure the destination address for the NetStream AS aggregation data export.

[RouterA] ip netstream aggregation as

[RouterA-ns-aggregation-as] enable

[RouterA-ns-aggregation-as] ip netstream export host 4.1.1.1 2000

[RouterA-ns-aggregation-as] ip netstream export source interface M-Ethernet6/0/0

[RouterA-ns-aggregation-as] quit

# Configure the aggregation mode as protocol-port, and in aggregation view configure the destination address for the NetStream protocol-port aggregation data export.

[RouterA] ip netstream aggregation protocol-port

[RouterA-ns-aggregation-protport] enable

[RouterA-ns-aggregation-protport] ip netstream export host 4.1.1.1 3000

[RouterA-ns-aggregation-protport] ip netstream export source interface M-Ethernet6/0/0

[RouterA-ns-aggregation-protport] quit

# Configure the aggregation mode as source-prefix, and in aggregation view configure the destination address for the NetStream source-prefix aggregation data export.

[RouterA] ip netstream aggregation source-prefix

[RouterA-ns-aggregation-srcpre] enable

[RouterA-ns-aggregation-srcpre] ip netstream export host 4.1.1.1 4000

[RouterA-ns-aggregation-srcpre] ip netstream export source interface M-Ethernet6/0/0

[RouterA-ns-aggregation-srcpre] quit

# Configure the aggregation mode as destination-prefix, and in aggregation view configure the destination address for the NetStream destination-prefix aggregation data export.

[RouterA] ip netstream aggregation destination-prefix

[RouterA-ns-aggregation-dstpre] enable

[RouterA-ns-aggregation-dstpre] ip netstream export host 4.1.1.1 6000

[RouterA-ns-aggregation-dstpre] ip netstream export source interface M-Ethernet6/0/0

[Sysname-ns-aggregation-dstpre] quit

# Configure the aggregation mode as prefix, and in aggregation view configure the destination address for the NetStream prefix aggregation data export.

[RouterA] ip netstream aggregation prefix

[RouterA-ns-aggregation-prefix] enable

[RouterA-ns-aggregation-prefix] ip netstream export host 4.1.1.1 7000

[RouterA-ns-aggregation-prefix] ip netstream export source interface M-Ethernet6/0/0

[RouterA-ns-aggregation-prefix] quit

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网