TLV (Type-Length-Value or Tag-Length-Value) is an encoding scheme used for optional information element in a certain protocol. The type and length are fixed in size (typically 1-4 bytes), and the value field is of variable size.
Type: It is simply the data being processed, a binary code, often simply alphanumeric, which indicates the kind of field that this part of the message represents.
Length: It specifies the length/size of the value field, typically in bytes
Value: Variable-sized series of bytes which contains data for this part of the message. It is the third field and contains a “length” amount of data representing the value for the “type”.
Many other routing protocols use TLVs to carry a variety of attributes. IS-IS, Cisco Discovery Protocol (CDP), Label Discovery Protocol (LDP), and Border Gateway Protocol (BGP) are examples of protocols that use TLVs. Multiple pieces of data can be transmitted in the same message by appending more triplets to a previously existing message.
TLV’s in IS-IS:
IS-IS, originally designed for Open System Interconnection (OSI) routing, uses TLV parameters to carry information in Link State Packets (LSPs). The TLVs make IS-IS extendable. IS-IS can therefore carry different kinds of information in the LSPs.
IS-IS uses below format for TLV’s:
Type: 1 Byte
Length: 1 Byte
Value: As specified in ‘Length’
In the IS-IS Protocol Data Unit (PDU), there is a fixed and a variable part of the header. The fixed part of the header contains fields that are always present, and the variable part of the header contains the TLV which permits the flexible encoding of parameters within link state records. These fields are identified by one octet of type (T), one octet of length (L) and “L” octets of value (V). The Type field indicates the type of items in the Value field. The Length field indicates the length of the Value field. The Value field is the data portion of the packet. Not all router implementations support all TLVs, but they are required to ignore and retransmit the ignored types.
IS-IS TLV Types:
IS-IS uses different TLV’s. Some of them are in below.
TLV1: It includes the Area Addresses to which the IS/Router is connected
TLV 128: It extends IS-IS to carry IP routing information in the same packet (in addition to CLNS).
Some other types are mentioned in below table in addition to a lot others detailed in RFC1195