Packet Exported in V9 Format

Header of a NetStream Packet Exported in V9 Format

Figure 1 shows the format of the header of a NetStream packet exported in V9 format. This header corresponds to the Header field in Figure 1. Table 1 describes the fields in the header.

Figure 1 Header of a NetStream packet exported in V9 format
Table 1 Description of fields in the header of the NetStream packet exported in V9 format

Field

Description

version

Version number of the format in which NetStream packets are exported. Value 0x09 indicates the V9 format.

count

Number of FlowSet records (including records in the template FlowSet and data FlowSet) exported in a NetStream packet.

system up time

Period (in milliseconds) from the time the system is booted to the time a NetStream packet was generated.

unix_secs

Integer number of seconds elapsed from 00:00:00, January 1st, 1970 to the time a NetStream packet was generated.

package sequence

Sequence number of an exported packet. You can check whether a NetStream packet is dropped based on the flow sequence value.

NOTE:

The meaning of this field in the header of the NetStream packet exported in V9 is different from that in V5 or V8 format. In V5 and V8, this field indicates the sequence number of all flows.

source id

Source ID used to uniquely identify a device exporting packets. The value occupies 4 bytes. The Source ID field is equal to the Engine Type and Engine ID fields in the header of a NetStream packet exported in V5 or V8 format. The Source ID field value can be defined.

Information Carried in the NetStream Packet Exported in V8 Format

The exported packet information in V9 is Export Packet, which consists of Packet Header, Template FlowSet, and Data FlowSet. shows the format of the exported packet information.

Figure 2 Schematic diagram for an NetStream packet exported in V9 format

Both a template FlowSet and a data FlowSet contain template IDs, but these FlowSets are independent of each other. Upon receipt of a NetStream packet, an NSC parses data records in a data FlowSet and obtains a template ID. Although the NSC also obtains a template ID carried in a template FlowSet, the NSC can only use this template ID to parse the following exported NetStream packets.

The template flowset and data flowset are optional in the Export Packet area. The possible combinations are as follows:

  • Contain both template and data FlowSets. The NSC obtains template information carried in each template FlowSet and uses the template to parse data records carried in data FlowSets of subsequent NetStream packets.
  • Only contain data FlowSets. If the template ID is predefined, a NetStream-enabled device exports a NetStream packet only carrying the data FlowSet to the NSC.
  • Only contain template FlowSets. Template and data FlowSets are packed into one exported NetStream packet to better use network bandwidth. After templates are configured on a device and the device is restarted, the device sends all templates to NSC immediately. In this situation, each exported NetStream packet only contains a template FlowSet. When a template expires after a specified period of time elapses, the NSC deletes the template. To allow the NSC to use available templates, a device periodically transmits a template FlowSet to the NSC even if no data FlowSet is generated.

The fields are described as follows:

  • Describes stream information in an exported NetStream packet. A NetStream-enabled device encapsulates template information in the NetStream packet and sends the packet to an NSC to establish a convention. Based on the convention, the device and the NSC parse information. A template FlowSet, as the V9 format core, consists of multiple template records. Template FlowSet is the core of version 9. Upon receipt of the template sent by the device, the NSC can parse stream information carried in the exported NetStream packet without a parsing format pre-defined. This greatly increases the flexibility and scalability of NetStream records and facilitates the development of the third party's software and the NetStream function.
  • Template Record: corresponds to each data record in Export Packet. Stream information in a data record is parsed based on a template record.

  • Template ID: identifies a template. Each template has a specific ID. A data record contains a template ID used to select a template.

  • Indicates a combination of one or multiple data records.

  • Data Record: corresponds to a NetStream record.

Template FlowSet Format

Figure 3 shows the template FlowSet format.

Figure 3 Template FlowSet format

In this example, a template FlowSet contains two template records. Table 2 describes the fields in CFM packets.

Table 2 Template FlowSet fields and their meanings

Field

Description

FlowSet ID

ID of a template FlowSet. The FlowSet ID value can be: For a template FlowSet: 0 to 255 For a data FlowSet: 256 to 511 An NDC uses FlowSet IDs to distinguish template records from data records in an exported NetStream packet.

Length

Total length of the template FlowSet. The Length field contents are represented in the type-length-value (TLV) format, and its value is equal to the sum of the following lengths: Lengths of the FlowSet ID field and the Length field itself Length of each template record carried in the template FlowSet

Length of each template record carried in the template FlowSetA single template FlowSet contains multiple template IDs. The length value helps determine the position of the next template or data FlowSet record.

Template ID

ID of a template record in the template FlowSet. A template record is mapped to a specific type of NetStream data to be exported. The template ID is unique on a device. A template ID is equal to a data FLowSet ID and ranges from 256 to 511.

Field Count

Number of fields in a template record. A template FlowSet includes one or more template records. The Field Count value helps determine the end of an existing template record and the start of the next one.

Field Type

Type of data in a template record. The value can be defined. For example, if statistics are collected based on the destination IP address, protocol type, ToS, and MPLS label, a field type is used to define each of these four attributes.

Field Length

Length (in bytes) of a defined field type. For example, if the field type is set to a destination IP address, the field length value is 4 bytes.

Data FlowSet Format

Figure 4 Data FlowSet packet format shows the Data FlowSet packet format.

Figure 4 Data FlowSet packet format

In this example, a data FlowSet contains two data records. The data FlowSet ID is used to parse the two data records. Table 3 describes the fields carried in the data FlowSet.

Table 3 Data FlowSet fields and meanings

Field

Description

FlowSet ID = Template ID

ID of a data FlowSet. A data FlowSet ID is equal to a template ID in a template FlowSet. An NDC and a display application use a FlowSet ID to map to the type and length of a field.

Length

Length of a data FlowSet. The Length field contents are represented in the TLV format, and its value is equal to the sum of the following lengths: Lengths of the FlowSet ID field and the length field itself Length of each data record carried in the data FlowSet Length of padding bits

record n -field n

Field value in each data record of the data FlowSet.

Padding

A 32–bit field at the end of the data FlowSet. Note that the length field includes the length of padding bits.

Relationship Between a Data Stream Format and the V9 Template Format

Figure 5 shows the relationship between the data stream format and the V9 template format.

Figure 5 Relationship between the data stream format and the V9 template format

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >