← Back to Part 1 Modules
PART 1 · BASIC BGP THEORY · MODULE E

Module E – BGP Message Types

Lesson content presented from the approved Part 1 master documentation.

Module E – BGP Message Types

BGP-4 uses four principal message types: OPEN, UPDATE, NOTIFICATION and KEEPALIVE. Messages share a common BGP header.

MessageType codePurpose
OPEN1Establishes the BGP relationship and negotiates parameters/capabilities.
UPDATE2Advertises reachable prefixes and/or withdraws previously advertised routes; carries path attributes.
NOTIFICATION3Reports an error condition and terminates the BGP connection.
KEEPALIVE4Maintains peer liveness and acknowledges successful OPEN processing.

Common BGP message header

  • Marker: 16 octets.
  • Length: 2 octets.
  • Type: 1 octet.
  • A basic header is 19 octets in total.
  • The standard maximum message length is 4096 octets; extended message capability supports larger messages up to 65535 octets.
  • OPEN message

    OPEN includes version, My AS (legacy 16-bit field), Hold Time, BGP Identifier and optional parameters/capabilities. Four-octet ASN support uses the four-octet ASN capability; AS_TRANS (23456) is relevant to compatibility with older implementations.

    UPDATE message

    An UPDATE can contain withdrawn routes, path attributes and Network Layer Reachability Information (NLRI). It can advertise new reachability, withdraw previously advertised routes, or do both in one message.

    KEEPALIVE and Hold Time

  • KEEPALIVE messages maintain peer liveness; they do not carry route advertisements.
  • The peers negotiate a hold time; the lower advertised value is used, subject to protocol rules.
  • If no acceptable BGP message is received within the negotiated hold time, the session is terminated.
  • A hold time of zero disables the hold timer and periodic KEEPALIVE requirement.
  • Common Cisco defaults are often 60-second keepalive and 180-second hold time, but verify the platform and configuration.
  • NOTIFICATION message

    Error codeCategory
    1Message Header Error
    2OPEN Message Error
    3UPDATE Message Error
    4Hold Timer Expired
    5Finite State Machine Error
    6Cease

    Wireshark filters

    bgp
    bgp.type == 1
    bgp.type == 2
    bgp.type == 3
    bgp.type == 4
    tcp.port == 179

    QA test ideas

  • Capture and identify OPEN, KEEPALIVE and UPDATE exchange during session establishment.
  • Verify a route advertisement appears in an UPDATE.
  • Withdraw a prefix and verify withdrawal in an UPDATE.
  • Test hold-timer expiry in a controlled lab.
  • Cause a controlled configuration error and inspect NOTIFICATION details.
  • Verify the BGP message type and TCP stream in a packet capture.
  • Student Knowledge Assessment – Module E

    Q1. How many principal BGP-4 message types are there?

    A. 2

    B. 3

    C. 4

    D. 6

    Correct answer: C. 4 Explanation: The four principal types are OPEN, UPDATE, NOTIFICATION and KEEPALIVE.

    Q2. What is the type code for OPEN?

    A. 1

    B. 2

    C. 3

    D. 4

    Correct answer: A. 1 Explanation: OPEN has message type code 1.

    Q3. Which message carries route advertisements and withdrawals?

    A. OPEN

    B. UPDATE

    C. KEEPALIVE

    D. TCP SYN

    Correct answer: B. UPDATE Explanation: UPDATE carries withdrawn routes, path attributes and NLRI.

    Q4. Which message reports an error and terminates the BGP connection?

    A. KEEPALIVE

    B. OPEN

    C. NOTIFICATION

    D. UPDATE

    Correct answer: C. NOTIFICATION Explanation: NOTIFICATION reports protocol errors and closes the session.

    Q5. What is the type code for KEEPALIVE?

    A. 1

    B. 2

    C. 3

    D. 4

    Correct answer: D. 4 Explanation: KEEPALIVE has type code 4.

    Q6. How large is the common BGP message header?

    A. 10 octets

    B. 16 octets

    C. 19 octets

    D. 32 octets

    Correct answer: C. 19 octets Explanation: The header consists of 16-byte marker, 2-byte length and 1-byte type.

    Q7. What is the standard maximum BGP message length?

    A. 512 octets

    B. 1500 octets

    C. 4096 octets

    D. 65535 octets

    Correct answer: C. 4096 octets Explanation: The standard maximum is 4096 octets; extended message capability supports larger messages.

    Q8. Which OPEN field carries the BGP identifier?

    A. BGP Identifier

    B. MED

    C. AS_PATH

    D. NLRI

    Correct answer: A. BGP Identifier Explanation: The OPEN message includes the BGP Identifier.

    Q9. What happens when the negotiated Hold Timer expires?

    A. The session remains Established

    B. The BGP session is terminated

    C. The ASN changes

    D. The router reboots

    Correct answer: B. The BGP session is terminated Explanation: Hold Timer expiry causes the BGP session to be terminated.

    Q10. Which Wireshark filter selects UPDATE messages?

    A. bgp.type == 1

    B. bgp.type == 2

    C. bgp.type == 3

    D. bgp.type == 4

    Correct answer: B. bgp.type == 2 Explanation: BGP UPDATE has message type code 2.

    Q11. Which NOTIFICATION error code represents Cease?

    A. 1

    B. 2

    C. 4

    D. 6

    Correct answer: D. 6 Explanation: Cease is error code 6.

    Q12. What does a Hold Time of zero mean?

    A. Immediate session failure

    B. Hold timer and periodic KEEPALIVE requirement are disabled

    C. The peer ASN is zero

    D. Only UPDATE messages are allowed

    Correct answer: B. Hold timer and periodic KEEPALIVE requirement are disabled Explanation: A zero hold time disables the hold timer and periodic KEEPALIVE requirement.

    Source and assessment note

    Technical explanations, tables, examples, QA scenarios and assessments are presented from the approved Part 1 master documentation. Verify illustrative CLI syntax against the target router platform and software release before lab or production use.