Background: Know: TLV Recognize: IPv4, TCP, ICMP, DHCP

Anticipates: SNMP, GET command, SET command




TLV examples

In this slide, we have some examples for TLV . TLV formatting is particularly important for optional fields; format of fixed fields usually implied by protocol.

Many protocol headers include optional fields, such as IPv4, format showed below, TCP, ICMP and DHCP options.

  • IPv4 options, eg. Source Routing

This option lets the originating system specify a number of intermedia-systems a packet must pass through to get to the destination host. Additionally the route followed by packet is recorded in the option. The receiving host (end-system) must use the reverse of th path contained in the received LSRR (Loose Source Record Route).

This figure show details about IPv4 options formatting. Additionally, the type field indicates the content of type which is loose source route and the length indicates how long the field is, particularly for variable-content. Finally, the content will follow the length field.

  • {TCP options: eg. TCP Timestamps

This figure indicates some details about TCP options formatting. In general, options may occupy space at the end of the TCP header and are a multiple of 8 bits in length. All options are included in the checksum. An option may begin on any octet boundary. There are two cases for the format of an option:

Case 1: A single octet of option-kind.

Case 2: An octet of option-kind, an octets of option-length, and the actual option-data octets.

Additionally, in TCP Timestamps option, the time stamps option carries two four-byte timestamp fields. The Timestamp Value field (TSval) contains current value of the timestamp clock of the TCP sending the option. The Timestamp Echo Reply field (TSesr) is valid if the ACK bit is set in the TCP header; if it is valid, it echos a times-tam value that was sent by the remote TCP in the TSval field of the Timestamps option. When TSecr is not valid, its value must be zero. The TSecr value will generally be from the most recent Timestamp option that was received; however, there are exceptions that are explained belw.

A TCP may send the Timestamps option (TSopt) in an initial <SYN> segment (i.e., segment containing a SYN bit and no ACK bit), and may send a TSpot in other segments only if it received a TSopt in the initial <SYN> segment for the connection.

----- list of objects being get/set
----- the fixed part of its header (Version, Community & Type fields)

Each object is encoded in Type-Length-Value format. Usually 1B Type, 1B Lengh, variable-bytes Value.

  • Reference:

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.