iPCA can collect statistics on lost packets at the network level or device level. Color bits used in packets determine whether network-level measurement, device-level measurement, or both can be performed.
A color bit is also called a characteristics bit. The Type of Service (ToS) or Flags field in IPv4 packet header can be used as the color bits. Figure 1 shows the positions of ToS and Flags fields in IPv4 packet headers.
ToS field
The ToS field contains 8 bits. The leftmost 3 bits (bits 0-2) are the Precedence field that identifies the IP packet priority. Bits 3-7 are rarely used, and can be used as color bits. In network-level packet loss measurement, bit 6 in the ToS field is used as the color bit by default.
RFC2474 defines the ToS field in the IPv4 packet header as the Differentiated Service (DS) field. In the DS field, the leftmost 6 bits (bits 0-5) are the DS Code Point (DSCP), and the rightmost 2 bits (bits 6 and 7) are reserved. When the DS field is used to provide differentiated service, it is not recommended that you configure bits 3-5 as color bits because the measurement result may be inaccurate.
Flags field
The Flags field contains 3 bits (bits 0-2). This field determines whether a packet can be fragmented. Bit 0 is reserved and can be used as the color bit. In device-level packet loss measurement, bit 0 in the Flags field is used as the color bit by default.
You can choose to configure the ToS or Flags field as the color bit:
When you configure both network-level and device-level packet loss measurement, specify different color bits for them.