This section provides an example for collecting statistics on the IPv4 unicast flow in the inbound direction of the interface.
As shown in Figure 1, an enterprise network is connected to FW_B on the carrier network through FW_A. NetStream is enabled on FW_B. In such a scenario, the carrier can collect the statistics on the inbound traffic flows passing GigabitEthernet 0/0/1 of FW_B. The collected statistics provides a reference for network accounting.
Item |
Data |
|---|---|
Destination IP address of the NetStream traffic |
10.2.1.2 |
Destination port of the NetStream traffic |
6000 |
Source IP address of the NetStream traffic |
10.2.1.1 |
NetStream statistics output version |
version 5 |
The configuration roadmap is as follows:
Set IP addresses for the interfaces on the FWs.
Enable NetStream for collecting statistics on inbound traffic flows on FW_B.
# Set IP addresses for FW_A.
<FW_A> system-view [FW_A] interface GigabitEthernet 0/0/1 [FW_A-GigabitEthernet0/0/1] ip address 10.1.1.1 24 [FW_A-GigabitEthernet0/0/1] quit
# Set IP addresses for FW_B.
<FW_B> system-view [FW_B] interface GigabitEthernet 0/0/1 [FW_B-GigabitEthernet0/0/1] ip address 10.1.1.2 24 [FW_B-GigabitEthernet0/0/1] quit
# Enable the NetStream function for collecting inbound statistics on FW_B.
[FW_B] interface GigabitEthernet 0/0/1 [FW_B-GigabitEthernet0/0/1] ip netstream inbound
# Configure the output version of the collected statistics on FW_B.
[FW_B] ip netstream export version 5
# Configure the FW_B to send the collected statistics to the NSCs and NDA.
[FW_B] ip netstream export host 10.2.1.2 6000
# Set the source address for the FW_B to send the collected statistics.
[FW_B] ip netstream export source 10.2.1.1
After the configuration is complete, run the display ip netstream cache command in the user view to display the statistics on the cached NetStream traffic flows.
<FW_B> display ip netstream cache
IP netstream cache information
Stream active timeout(minute) : 30
Stream inactive timeout(second): 1
Stream entry been created : 0
Last clearing of statistics : never
IP packet number of different size
1-80 81-552 553-576 577-612 613-1480 1481-1500 1501-
0 0 0 0 0 0 0
Protocol Total Packets Stream Packets Active(sec) Idle(sec)
Streams /Sec /Sec /stream /stream /stream
----------------------------------------------------------------------------
Total 0 0 0 0 0 0
DstIf DstIP SrcIP Pro Tos Flgs Pkts
SrcIf DstP Msk AS SrcP Msk AS NextHop
BGP: BGP NextHop
--------------------------------------------------------------------------
After the configuration is complete, run the display ip netstream export command in the user view to display the information about the output of NetStream traffic statistics.
<FW_B> display ip netstream export
Version 5 ip export information
Exported stream number: 120
Exported UDP datagram number: 120 failed number:0