Understanding NetStream
The implementation of the NetStream function is as follows:
Packet sampling: Packets are replicated and sent to a NetStream board. The process of sampling packets is as follows:
- After the NetStream function is enabled on an interface, the system stores NetStream information in the interface information table.
- The system samples packets passing through the interface at a configured sampling ratio.
Stream processing: Streams are constructed, maintained, aged, aggregated, and added to packets for export.
- After receiving a packet, the NetStream board extracts packet attributes (such as source address and destination address) and compares them with those of existing streams created from packets.
- If the attributes match, the packet is added to the stream, and the packet count is refreshed. If the received attribute does not match the local one, a new stream is created. Then, the NetStream board ages and aggregates streams and sends the statistics to the specified network management system (NMS) for analysis.
NetStream services are deployed in distributed service processing mode. That is, packet sampling and stream processing are performed on an interface board.
After NetStream is enabled, packets are involved in the establishment and counting of NetStream flows. If a large number of packets are sampled, the forwarding performance of the device is affected. The reasonable sampling ratio is 1000:1.