Module E – BGP Message Types
BGP-4 uses four principal message types: OPEN, UPDATE, NOTIFICATION and KEEPALIVE. Messages share a common BGP header.
| Message | Type code | Purpose |
|---|---|---|
| OPEN | 1 | Establishes the BGP relationship and negotiates parameters/capabilities. |
| UPDATE | 2 | Advertises reachable prefixes and/or withdraws previously advertised routes; carries path attributes. |
| NOTIFICATION | 3 | Reports an error condition and terminates the BGP connection. |
| KEEPALIVE | 4 | Maintains peer liveness and acknowledges successful OPEN processing. |
Common BGP message header
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
NOTIFICATION message
| Error code | Category |
|---|---|
| 1 | Message Header Error |
| 2 | OPEN Message Error |
| 3 | UPDATE Message Error |
| 4 | Hold Timer Expired |
| 5 | Finite State Machine Error |
| 6 | Cease |
Wireshark filters
bgp
bgp.type == 1
bgp.type == 2
bgp.type == 3
bgp.type == 4
tcp.port == 179
QA test ideas
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.