Type of service

 

Tos字段被主机用来标识一个数据包的优先级

字段格式:

 

0 1 2 3 4 5 6 7
Precedence D T R Unused

 

0 = Most Significant Bit; 7 = Least Significant Bit.

 Precedence bits have a from 0 to 7 and are used to indicate the importance of a datagram (default is 000, higher is better).

 

Precedence Hexadecimal Decimal Description
111 0xE0 224 Network Control
110 0xC0 192 Internetwork Control
101 0xA0 160 CRITIC/ECP
100 0x80 128 Flash Override
011 0x60 96 Flash
010 0x40 64 Immediate
001 0x20 32 Priority
000 0x00 0 Routine


The decimal and hexadecimal values above, assumes bits 3 to 7 are set to 0.

Bits 3 4 5 represent the following:

  • D: requests low delay
  • T: requests high throughput
  • R: requests high reliability

Bit 6 was later defined by RFC 1349 as "Minimize Monetary Cost
 

例:

20:56:04.852978 In IP (tos 0x10, ttl 63, id 62037, len 60) 130.130.0.1.3465 >
10.0.3.4.5060: S 1914879600:1914879600(0) win 16384 <mss 1460,nop,wscale 0,
nop,nop,timestamp 558487 0> (DF)

tos0x10,When broken down into binary, this yields a 000 100 00 pattern (the added spacing helps to call out that the first three bits in ToS field code a precedence setting of 0). The next three bits code the Delay, Throughput, and Reliability indicators, which in this case are coded to indicate that delay is the optimal metric for this traffic (telnet, being interactive and character based,is a delay-sensitive application) The last two bits of the precedence/ToS file are reserved and set to zero。

你可能感兴趣的:(职场,ipv4,休闲,ToS)