Visual RFC.
ALL RFCs / RFC 5492
Read the RFC ↗
RFC 5492 / BGP CAPABILITY ADVERTISEMENT

Read the nested capability bytes

02

A capability has Code, Length and Value inside a separate OPEN Optional Parameter.

RFC 5492 · § 4EXAMPLE
4 / 4
Read the nested capability bytesRFC 5492 capability-advertisement example. In a separate malformed example, a Capability Length claims five Value octets but only four remain in its parameter. The teaching parser stops before interpretation. This is not a well-formed unknown capability to ignore.Read a capability inside its OPEN parameterSeparate malformed parameterDeclared Capability Value length: 5Available Value bytes inside boundary: 4Length 5Stop parsingDo not reinterpret the truncated ValueMalformed framing is not a valid unknown capabilityUnsupported Capability 7 is a different caseThe teaching parser does not implement a full BGP FSMRFC 5492 · chapter 2 · state 4 · selected teaching example
04
Stop a declared length that exceeds its boundary

In a separate malformed example, a Capability Length claims five Value octets but only four remain in its parameter. The teaching parser stops before interpretation. This is not a well-formed unknown capability to ignore.

Source for this drawing: RFC 5492 · Read RFC section 4 ↗

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

A message needs an address.

Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

KEY POINT

The outer Capabilities Optional Parameter has Parameter Type 2. In the classic OPEN format its Parameter Length is one octet and counts the Parameter Value only. Inside are one or more capability TLVs: Type/Length/Value here means a one-octet Capability Code, one-octet Capability Length, then that many Value octets (§4; RFC4271 §4.2).

  • The outer Capabilities Optional Parameter has Parameter Type 2. In the classic OPEN format its Parameter Length is one octet and counts the Parameter Value only. Inside are one or more capability TLVs: Type/Length/Value here means a one-octet Capability Code, one-octet Capability Length, then that many Value octets (§4; RFC4271 §4.2).
  • Capability Length counts only Value bytes, not its own Code/Length header. Route Refresh uses Capability Code 2 and Capability Length 0: bytes 02 00, with no Value octets. Outer Parameter Type 2 and inner Capability Code 2 are different namespaces (RFC2918 §2).
  • Multiprotocol uses Capability Code 1, Length 4. Its Value is AFI (16 bits), Reserved (8 bits) and SAFI (8 bits). The sender SHOULD set Reserved to zero; the receiver ignores it. Our IPv6-unicast Value is 00 02 00 01 (RFC4760 §§6,8; RFC1700 Address Family Numbers).
  • Combining the 2-byte Route Refresh TLV and 6-byte Multiprotocol TLV gives eight Parameter Value bytes. Outer Type/Length add two more: 02 08 02 00 01 04 00 02 00 01, ten bytes in the isolated Optional Parameters block. With no other parameters, the classic OPEN Optional Parameters Length is 10 (§4; RFC4271 §4.2).
  • The codecs model structurally framed classic optional-parameter blocks of at most 255 octets and selected feature semantics. RFC9072 extends the outer lengths; it is outside this codec, so 255 is not a universal BGP capability limit. Structural truncation is different from a well-formed unknown capability. RFC4271 §6.2 assigns Unspecific subcode 0 for a recognized but malformed Optional Parameter; do not turn it into Unsupported Capability 7.
DETAILS

Worked examples use selected capability formats and classic OPEN optional-parameter framing. This is not a full BGP parser, state machine, routing implementation or authentication check.

Read the RFC section ↗

All chapters in RFC 5492

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗