Basic BGP Theory · Advanced BGP Theory · 50 Interview Q&A · EVE-NG Lab Practice and Automated Validation
Version 1.0 · 13 November 2026. Use Ctrl+F / browser Find to search the document text.
SP NETWORKING ACADEMY
BGP MASTER
DOCUMENTATION
CONSOLIDATED EDITION – PARTS 1 TO 4
Basic Theory • Advanced Theory • Interview Q&A • EVE-NG Lab Practice &
Automated Validation
Version 1.0 | 13 November 2026
Prepared for SP Networking Academy
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 2
MASTER DOCUMENT CONTROL
Part
Included content
Source document status
Part 1
Basic BGP Theory – Modules A–H
Version 1.0; consolidated edition
Part 2
Advanced BGP Theory – Modules I–O
Version 1.0; modules approved
Part 3
BGP Interview Questions & Answers – Q1–Q50
Version 1.0; draft for technical review
Part 4
EVE-NG BGP Lab Practice – BGP-001 to BGP-010
Version 1.0; approval pending technical review
Compilation note
This master PDF combines the four supplied Word documents in their original part order. The source content, terminology,
examples, test results and document-specific status notes are retained. Part 3 remains marked as a draft for technical review,
and Part 4 retains its source approval status. This compilation does not add Part 5; the wider project plan keeps Part 5
separate.
Contents
PART 1 – BASIC BGP THEORY – Modules A–H, assessments and appendices
PART 2 – ADVANCED BGP THEORY – Modules I–O, assessments and appendices
PART 3 – BGP INTERVIEW QUESTIONS & ANSWERS – Q1–Q50 across Sections A–E
PART 4 – EVE-NG BGP LAB PRACTICE & AUTOMATED VALIDATION – Four-router lab, BGP-001 to BGP-010 and
regression evidence
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 3
PART 1 – BASIC BGP THEORY
Source: SP_Networking_Academy_BGP_Part1_v1.0(1).docx
SP NETWORKING ACADEMY
BGP DOCUMENTATION
PART 1 – BASIC BGP THEORY
Modules A–H | Learning • Configuration • Verification • QA • Assessment
Version 1.0 | 13 November 2026
Prepared as the foundational BGP learning reference for SP Networking Academy
Document Control
Item
Description
Document
BGP Documentation – PART 1 (Basic BGP Theory)
Version
1.0
Scope
Modules A–H: fundamentals through best-path selection
Audience
Networking students, network engineers and Senior Network QA Engineers
Platform examples
Cisco IOS / IOS-XE style CLI; commands may vary by vendor and release
Status
Eight modules delivered and approved by the learner; consolidated edition
Assessment provenance
A–F assessments newly reconstructed for this edition because the original
question sets were not present in the recovered module outputs. G–H
assessments are based on the completed module material.
How to Use This Guide
• Study each module in sequence. Later modules build on concepts introduced earlier.
• Treat CLI examples as illustrative Cisco IOS/IOS-XE examples. Confirm syntax and feature support on the actual platform
and software release.
• Use the QA scenarios as test ideas. Record topology, software version, configuration, expected result, actual result and
evidence for each executed test.
• Do not label an illustrative configuration or expected output as lab-verified evidence. Capture actual EVE-NG router outputs
separately.
• Complete the knowledge assessment at the end of each module and review the explanations.
Contents
• A – BGP Fundamentals
• B – Autonomous Systems and ASN Architecture
• C – eBGP and iBGP
• D – BGP Neighbour Relationships
• E – BGP Message Types
• F – BGP Finite State Machine
• G – BGP Path Attributes
• H – BGP Best Path Selection
• Appendix 1 – Core CLI Quick Reference
• Appendix 2 – QA Evidence Record Template
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 4
• Appendix 3 – Technical Accuracy Notes
Module A – BGP Fundamentals
Border Gateway Protocol (BGP) is the inter-domain routing protocol used to exchange reachability information between
Autonomous Systems (ASes). BGP-4 is specified in RFC 4271 and uses TCP port 179. BGP is a path-vector protocol: routes
carry attributes, including AS_PATH, that support policy decisions and loop prevention.
Why BGP is used
• Interconnect separate autonomous systems across service-provider and enterprise networks.
• Support multihoming and redundant Internet or WAN connectivity.
• Apply routing policy and influence inbound/outbound traffic paths.
• Scale inter-domain routing without relying on a single interior gateway protocol.
Control plane and data plane
• The BGP control plane exchanges reachability and path attributes and selects routes.
• The routing information base (RIB) contains routes selected by routing processes.
• The forwarding plane uses installed forwarding information to move packets. A BGP session being Established does not
guarantee a prefix is installed or traffic is forwarding.
BGP compared with an IGP
• BGP runs over TCP port 179; OSPF uses IP protocol number 89.
• BGP is policy-oriented and designed for inter-AS routing; IGPs are commonly used for routing within an AS.
• BGP peers are explicitly configured; it does not discover neighbours using OSPF-style Hello packets.
BGP message types and states
• Four principal message types: OPEN, UPDATE, NOTIFICATION and KEEPALIVE.
• Six FSM states: Idle, Connect, Active, OpenSent, OpenConfirm and Established.
Route and path concepts
• A prefix identifies a destination network.
• A BGP route includes path attributes such as AS_PATH, NEXT_HOP and ORIGIN.
• AS_PATH records AS traversal and is used for loop prevention; policy attributes influence route selection.
Core verification commands
show ip bgp summary
show ip bgp
show ip route bgp
show ip bgp neighbors
show running-config | section router bgp
show tcp brief
Senior Network QA test ideas
• Verify TCP/179 reachability and neighbour configuration.
• Introduce an incorrect remote-AS value and verify the session does not establish.
• Withdraw an advertised prefix and verify route removal propagates.
• Flap a peering interface and observe session recovery and route convergence.
• Confirm that BGP session establishment and route installation are tested separately.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 5
Key takeaway BGP exchanges and evaluates reachability information; an Established session alone does not prove that a route is selected,
installed or forwarding.
Module B – Autonomous Systems and ASN Architecture
An Autonomous System (AS) is a group of IP networks and routers under a common administrative routing policy. An
Autonomous System Number (ASN) identifies the AS in inter-domain routing. BGP uses ASNs in neighbour configuration and
in the AS_PATH attribute.
ASN formats and ranges
Range / value
Use
1–64495
Public ASN allocation space, subject to IANA reservations and
special-purpose assignments.
64496–64511
Documentation ASNs.
64512–65534
16-bit private-use ASN range.
65535
Reserved.
4200000000–4294967294
32-bit private-use ASN range.
4294967295
Reserved.
IANA coordinates global number resources and Regional Internet Registries (RIRs) administer allocations within their regions,
including APNIC, ARIN, RIPE NCC, LACNIC and AFRINIC. Check current IANA/RIR registries when validating a production
ASN; do not assume every value outside a private range is freely assignable.
AS design patterns
Pattern
Description
Single-homed
An AS has one upstream connection or one upstream provider.
Multihomed
An AS connects to more than one upstream connection/provider for resilience
or policy.
Stub AS
An AS that does not provide transit for other autonomous systems.
Transit AS
An AS that carries traffic between other ASes.
These labels describe different design dimensions: single-/multihomed describes connectivity; stub/transit describes routing
role.
ASN representation
• 16-bit ASNs and 32-bit ASNs are supported by modern BGP implementations.
• ASPLAIN represents the ASN as a decimal integer.
• ASDOT represents a 32-bit ASN as high-order and low-order 16-bit values. For example, 1.10 in ASDOT corresponds to
65546 in ASPLAIN.
• The legacy 16-bit My AS field in the BGP OPEN message is supplemented by the four-octet ASN capability. AS_TRANS
(23456) is used for compatibility in relevant legacy cases.
Example lab AS allocation
Router
AS
Role
R1
65001
AS65001 edge
R3
65001
AS65001 internal peer
R2
65002
AS65002 edge
R4
65002
AS65002 internal peer
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 6
The lab uses private ASNs 65001 and 65002. R1–R2 and R3–R4 are planned eBGP links; R1–R3 and R2–R4 are planned
iBGP links.
Example configuration and verification
! R1 example
router bgp 65001
neighbor 11.1.1.2 remote-as 65002
!
! R2 example
router bgp 65002
neighbor 11.1.1.1 remote-as 65001
show ip bgp summary
show running-config | section router bgp
show ip bgp
Senior Network QA test ideas
• Configure a correct remote-AS value and verify peering.
• Configure a deliberately incorrect remote-AS value and observe the peer-AS error.
• Verify the router's local ASN and configured peer ASN against the approved topology.
• Check ASDOT/ASPLAIN representation where 32-bit ASN support is in scope.
• Verify that private lab ASNs are not confused with public production allocations.
Key takeaway An ASN identifies the routing domain. The local ASN and neighbour remote-AS must match the intended AS architecture.
Student Knowledge Assessment – Module B
Q1. What does an ASN identify in BGP?
A. A physical interface
B. An Autonomous System
C. A TCP port
D. A route-map sequence
Correct answer: B. An Autonomous System
Explanation: An ASN identifies an Autonomous System in inter-domain routing.
Q2. Which protocol uses TCP port 179?
A. OSPF
B. EIGRP
C. BGP
D. IS-IS
Correct answer: C. BGP
Explanation: BGP establishes its peer transport connection using TCP port 179.
Q3. Which range is the 16-bit private-use ASN range?
A. 1–100
B. 64512–65534
C. 65535–65550
D. 4200000000–4294967294
Correct answer: B. 64512–65534
Explanation: 64512–65534 is the 16-bit private-use range.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 7
Q4. Which range is reserved for documentation ASNs?
A. 64496–64511
B. 64512–65534
C. 1–100
D. 65535–65550
Correct answer: A. 64496–64511
Explanation: 64496–64511 is reserved for documentation.
Q5. What is the 32-bit private-use ASN range?
A. 1–65535
B. 64512–65534
C. 4200000000–4294967294
D. 4294967295 only
Correct answer: C. 4200000000–4294967294
Explanation: The 32-bit private-use range is 4200000000–4294967294.
Q6. What is a multihomed AS?
A. An AS with no routers
B. An AS connected through multiple upstream connections/providers
C. An AS using only OSPF
D. An AS without an ASN
Correct answer: B. An AS connected through multiple upstream connections/providers
Explanation: Multihoming describes connectivity to multiple upstreams or providers.
Q7. What is a transit AS?
A. An AS that carries traffic between other ASes
B. An AS with one router only
C. An AS that cannot advertise routes
D. An AS without external peers
Correct answer: A. An AS that carries traffic between other ASes
Explanation: A transit AS provides transit routing between other autonomous systems.
Q8. What does AS_TRANS represent?
A. A TCP port
B. A compatibility ASN value used with four-octet ASN support
C. A route reflector
D. An OSPF area
Correct answer: B. A compatibility ASN value used with four-octet ASN support
Explanation: AS_TRANS is 23456 and is used for compatibility in relevant four-octet ASN scenarios.
Q9. What is ASPLAIN?
A. A dotted ASN representation
B. A decimal integer ASN representation
C. An IPv6 format
D. A BGP state
Correct answer: B. A decimal integer ASN representation
Explanation: ASPLAIN displays the ASN as a decimal integer.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 8
Q10. Which statement is correct about single-/multihomed and stub/transit?
A. They are identical classifications
B. They describe different design dimensions
C. They are BGP message types
D. They are private ASN ranges
Correct answer: B. They describe different design dimensions
Explanation: Single-/multihomed describes connectivity; stub/transit describes routing role.
Module C – eBGP and iBGP
BGP sessions are classified by whether the peers belong to the same AS or different ASes. eBGP connects routers in different
ASes; iBGP connects routers within the same AS.
Characteristic
eBGP
iBGP
Peer AS relationship
Different ASNs
Same ASN
Typical purpose
Inter-AS route exchange
Distribute BGP routes within one AS
Default Cisco TTL behaviour
Typically 1 for directly connected eBGP
Typically 255
AS_PATH handling
Local ASN is normally added when advertising to
eBGP
AS_PATH is not normally changed when
advertising to iBGP
iBGP split horizon
Not applicable in the same way
Routes learned from one iBGP peer are not
normally advertised to another iBGP peer
Next hop
For directly connected eBGP, normally the
advertising interface address
Normally preserved unless changed, for example
using next-hop-self
Example peering configuration
! R1 in AS65001 – eBGP to R2
router bgp 65001
neighbor 11.1.1.2 remote-as 65002
!
! R1 – iBGP to R3
router bgp 65001
neighbor 13.1.1.2 remote-as 65001
!
! R2 in AS65002 – iBGP to R4
router bgp 65002
neighbor 12.1.1.2 remote-as 65002
iBGP full mesh
Without route reflectors or confederations, iBGP requires a full mesh so that routes learned from one iBGP peer can be
distributed to all other iBGP peers. The number of sessions for n routers is n(n−1)/2. For two routers in an AS, one iBGP
session is required.
next-hop-self
router bgp 65002
neighbor 12.1.1.2 next-hop-self
Use next-hop-self when an iBGP neighbour would otherwise receive a route with a next hop it cannot reach. Confirm the
resulting next-hop and underlying IGP reachability.
QA test ideas
• Verify different-AS peers form eBGP and same-AS peers form iBGP.
• Verify AS_PATH changes across eBGP advertisement.
• Verify iBGP does not normally re-advertise an iBGP-learned route to another iBGP peer.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 9
• Verify next-hop preservation and next-hop-self behaviour.
• Check iBGP full-mesh requirements for the topology before introducing route reflectors.
Student Knowledge Assessment – Module C
Q1. When are two BGP peers eBGP peers?
A. When they use the same ASN
B. When they use different ASNs
C. When they share an interface
D. When both use OSPF
Correct answer: B. When they use different ASNs
Explanation: eBGP connects BGP speakers in different autonomous systems.
Q2. When are two BGP peers iBGP peers?
A. When they use the same ASN
B. When they use different ASNs
C. When they use different vendors
D. When one uses IPv6
Correct answer: A. When they use the same ASN
Explanation: iBGP peers belong to the same AS.
Q3. What normally happens to AS_PATH when a route is advertised to an eBGP peer?
A. The advertising ASN is added
B. The entire path is removed
C. It becomes a community
D. It is always unchanged
Correct answer: A. The advertising ASN is added
Explanation: An eBGP speaker normally prepends its own ASN to AS_PATH.
Q4. What is the iBGP split-horizon rule?
A. An iBGP-learned route is not normally advertised to another iBGP peer
B. All iBGP routes are discarded
C. iBGP cannot advertise IPv4
D. iBGP must use TCP port 80
Correct answer: A. An iBGP-learned route is not normally advertised to another iBGP peer
Explanation: The rule prevents loops and creates the need for full mesh or route-reflector designs.
Q5. What does next-hop-self do?
A. Changes the local ASN
B. Advertises the local router as next hop to a neighbour
C. Disables AS_PATH
D. Changes the BGP TCP port
Correct answer: B. Advertises the local router as next hop to a neighbour
Explanation: It sets the advertising router as the next hop for the specified neighbour.
Q6. What is the default Cisco eBGP TTL for directly connected peers?
A. 1
B. 16
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 10
C. 64
D. 255
Correct answer: A. 1
Explanation: Cisco's typical default eBGP TTL is 1 for directly connected peers.
Q7. What is the common default Cisco iBGP TTL?
A. 1
B. 2
C. 64
D. 255
Correct answer: D. 255
Explanation: Cisco's typical iBGP TTL is 255.
Q8. How many full-mesh iBGP sessions are needed for four routers?
A. 2
B. 4
C. 6
D. 8
Correct answer: C. 6
Explanation: n(n−1)/2 gives 4×3/2 = 6 sessions.
Q9. Which feature can reduce the need for a full iBGP mesh?
A. Route reflector
B. ARP
C. NAT
D. STP
Correct answer: A. Route reflector
Explanation: Route reflectors provide controlled route distribution and reduce full-mesh session requirements.
Q10. Does an Established iBGP session prove that every received route is installed?
A. Yes, always
B. No
C. Only for static routes
D. Only when MED is zero
Correct answer: B. No
Explanation: Session state and route selection/installation are separate checks.
Module D – BGP Neighbour Relationships
A BGP neighbour (peer) is another BGP speaker with which a router establishes a session. Neighbours are explicitly
configured; BGP does not discover peers through periodic Hello packets.
Session establishment sequence
• The configured peer address must be reachable at the IP layer.
• The peers establish a TCP connection using port 179.
• BGP OPEN messages are exchanged and validated, including AS and capability information.
• KEEPALIVE messages confirm the OPEN exchange.
• The session reaches Established and UPDATE messages can exchange reachability information.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 11
Prerequisites
• Correct local ASN and remote-as configuration.
• Correct neighbour IP address and IP reachability.
• Interfaces and required routes operational.
• TCP/179 permitted by ACLs/firewalls.
• Compatible authentication settings, if configured.
• Compatible BGP capabilities and address-family configuration.
Directly connected eBGP example
! R1
router bgp 65001
neighbor 11.1.1.2 remote-as 65002
!
! R2
router bgp 65002
neighbor 11.1.1.1 remote-as 65001
Loopback peering and multihop
Loopback peering requires the peer loopback to be reachable through the routing table, and the BGP session source must be
set to the intended local loopback. eBGP loopback peering normally also requires an appropriate eBGP multihop TTL.
router bgp 65001
neighbor 192.0.2.2 remote-as 65002
neighbor 192.0.2.2 update-source Loopback0
neighbor 192.0.2.2 ebgp-multihop 2
Troubleshooting distinction The BGP FSM state Active is not the same as an Established or operationally active session. Active means the BGP
process is attempting/retrying TCP connection establishment.
Verification commands
show ip bgp summary
show ip bgp neighbors
show tcp brief
show ip route <peer-address>
ping <peer-address>
show access-lists
QA test ideas
• Wrong neighbour address.
• Incorrect remote-AS value.
• TCP/179 blocked by an ACL.
• Peer interface shutdown or link failure.
• Missing route to loopback peer.
• Incorrect update-source or eBGP multihop TTL.
• Authentication mismatch where authentication is enabled.
• Recovery after restoring the failed condition.
Student Knowledge Assessment – Module D
Q1. How are BGP neighbours normally established?
A. Automatically through Hello discovery
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 12
B. By explicit neighbour configuration
C. Through ARP only
D. Through DHCP
Correct answer: B. By explicit neighbour configuration
Explanation: BGP peers are explicitly configured.
Q2. Which transport protocol and port does BGP use?
A. UDP/179
B. TCP/179
C. TCP/89
D. UDP/520
Correct answer: B. TCP/179
Explanation: BGP uses TCP port 179.
Q3. What must be true before a BGP TCP session can establish?
A. The peer address must be reachable
B. OSPF must be enabled
C. The router ID must be a public IP
D. NAT must be enabled
Correct answer: A. The peer address must be reachable
Explanation: IP reachability and TCP connectivity to the peer are prerequisites.
Q4. What does remote-as specify?
A. The local interface speed
B. The peer's expected autonomous system number
C. The BGP hold timer
D. The route-map name
Correct answer: B. The peer's expected autonomous system number
Explanation: remote-as configures the expected ASN of the neighbour.
Q5. What is update-source used for?
A. Selecting the local source interface/address for the BGP session
B. Changing the peer ASN
C. Changing the BGP message type
D. Setting MED
Correct answer: A. Selecting the local source interface/address for the BGP session
Explanation: It selects the local source interface/address, commonly a loopback.
Q6. Why may ebgp-multihop be needed?
A. For eBGP peers not directly connected at Layer 3
B. For all directly connected iBGP peers
C. To enable OSPF
D. To change TCP to UDP
Correct answer: A. For eBGP peers not directly connected at Layer 3
Explanation: It increases the permitted TTL for eBGP sessions to non-directly connected peers.
Q7. Which command provides a quick summary of BGP peer states?
A. show ip bgp summary
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 13
B. show arp
C. show vlan
D. show clock
Correct answer: A. show ip bgp summary
Explanation: show ip bgp summary lists peers and their session state/prefix counts.
Q8. What does BGP Active state mean?
A. The session is Established
B. The router is attempting/retrying TCP connection establishment
C. The route is installed
D. The peer is disabled permanently
Correct answer: B. The router is attempting/retrying TCP connection establishment
Explanation: Active is an FSM state involving TCP connection attempts and retries.
Q9. Which issue can prevent a BGP session despite correct ASN values?
A. TCP/179 blocked
B. A high interface description length
C. A populated ARP cache
D. A valid hostname
Correct answer: A. TCP/179 blocked
Explanation: An ACL or firewall blocking TCP/179 can prevent session establishment.
Q10. What should be tested after correcting a BGP peering fault?
A. Only configuration syntax
B. Session recovery and route exchange
C. Only hostname resolution
D. Only console access
Correct answer: B. Session recovery and route exchange
Explanation: Validate that the session re-establishes and expected routes are exchanged.
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
• Marker: 16 octets.
• Length: 2 octets.
• Type: 1 octet.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 14
• 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 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
• 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
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 15
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
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 16
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.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 17
Module F – BGP Finite State Machine
The BGP Finite State Machine (FSM) describes the progression of a BGP peer relationship from initialisation to an Established
session. The six states are Idle, Connect, Active, OpenSent, OpenConfirm and Established.
State
Meaning / activity
Idle
BGP process initialises resources and waits for a start event; no session is
established.
Connect
BGP is waiting for the TCP connection to complete.
Active
BGP is attempting to establish TCP connectivity or retrying after a failure.
OpenSent
TCP is established and an OPEN message has been sent; the router
awaits/validates the peer OPEN.
OpenConfirm
OPEN exchange succeeded; the router waits for a KEEPALIVE or handles a
NOTIFICATION.
Established
The BGP session is operational and UPDATE messages can be exchanged.
Simplified state progression
Idle -> Connect -> OpenSent -> OpenConfirm -> Established
| failure
v
Active -- retry --> Connect
The simplified diagram omits event-specific transitions and implementation details. A TCP success leads toward OpenSent; a
valid OPEN leads to OpenConfirm; a valid KEEPALIVE leads to Established.
Connect vs Active
Interview-critical distinction Connect means the router is waiting for TCP connection completion. Active means BGP is trying to establish or
re-establish the TCP connection. Active does not mean the BGP session is Established.
State-based troubleshooting
Observed state
Initial investigation
Idle
Check whether the neighbour is configured, administratively disabled, or
affected by local BGP process/configuration conditions.
Connect
Check peer IP reachability, TCP/179, ACLs/firewalls and TCP handshake.
Active
Investigate repeated TCP failures, wrong peer address, missing route, ACL,
interface or source-address issues.
OpenSent
Check remote-AS, OPEN parameters, capabilities, BGP identifier and
notification details.
OpenConfirm
Check KEEPALIVE exchange, negotiated hold time and whether a
NOTIFICATION or timer expiry occurs.
Established
Investigate route policy, address families, UPDATE exchange, prefix filtering,
next-hop reachability and RIB installation.
Troubleshooting workflow
• Check show ip bgp summary and record the exact state.
• Verify peer address reachability and source interface/address.
• Check TCP/179 connectivity and ACL/firewall policy.
• Check local ASN and remote-as configuration.
• Inspect neighbour detail and notification/error counters.
• Capture TCP/BGP packets if required.
• After correction, verify Established state and expected prefix exchange.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 18
• Verify routes in BGP table, RIB and forwarding plane separately.
Useful commands
show ip bgp summary
show ip bgp neighbors
show tcp brief
show ip route <peer-address>
ping <peer-address>
show logging
QA test ideas
• Block TCP/179 and observe Connect/Active behaviour.
• Configure a wrong remote-AS and inspect OPEN validation failure/notification.
• Shut down the peering interface and observe session teardown.
• Restore connectivity and measure time to Established.
• Allow session establishment but filter all prefixes; verify session state and route-table outcome separately.
• Trigger controlled hold-timer expiry and inspect logs/packet capture.
Student Knowledge Assessment – Module F
Q1. How many BGP FSM states are defined?
A. 4
B. 5
C. 6
D. 7
Correct answer: C. 6
Explanation: The six states are Idle, Connect, Active, OpenSent, OpenConfirm and Established.
Q2. Which state indicates that the BGP router is waiting for TCP connection completion?
A. Idle
B. Connect
C. OpenSent
D. Established
Correct answer: B. Connect
Explanation: Connect is the TCP connection-waiting state.
Q3. What does Active mean in the BGP FSM?
A. The session is fully operational
B. The router is attempting/retrying TCP establishment
C. The route is best
D. The peer is administratively up
Correct answer: B. The router is attempting/retrying TCP establishment
Explanation: Active represents TCP connection attempts/retries, not an Established session.
Q4. In which state has TCP connected and the local OPEN been sent?
A. Connect
B. OpenSent
C. OpenConfirm
D. Idle
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 19
Correct answer: B. OpenSent
Explanation: OpenSent follows TCP establishment and OPEN transmission.
Q5. What normally follows successful OPEN validation?
A. Idle
B. Connect
C. OpenConfirm
D. Active
Correct answer: C. OpenConfirm
Explanation: A valid OPEN moves the FSM to OpenConfirm.
Q6. Which message normally moves a peer from OpenConfirm to Established?
A. UPDATE
B. KEEPALIVE
C. TCP FIN
D. ARP
Correct answer: B. KEEPALIVE
Explanation: A valid KEEPALIVE completes the transition to Established.
Q7. What is the first transport check for a peer stuck in Connect/Active?
A. TCP/179 reachability
B. DNS MX record
C. NTP stratum
D. VLAN name
Correct answer: A. TCP/179 reachability
Explanation: Check TCP port 179 and the underlying IP reachability.
Q8. Which issue commonly causes an OPEN validation failure?
A. Wrong remote-AS
B. High interface bandwidth
C. A valid route-map description
D. Correct peer IP
Correct answer: A. Wrong remote-AS
Explanation: A remote-AS mismatch can cause the OPEN to be rejected.
Q9. What does Established prove?
A. All expected prefixes are installed
B. The BGP session is up
C. All traffic is forwarding
D. The peer has no filters
Correct answer: B. The BGP session is up
Explanation: Established confirms the BGP session, not successful route installation or forwarding.
Q10. Which command quickly displays neighbour FSM states?
A. show ip bgp summary
B. show ip interface brief
C. show mac address-table
D. show version
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 20
Correct answer: A. show ip bgp summary
Explanation: show ip bgp summary displays peer states.
Q11. What should be checked if a session is Established but no expected prefixes appear?
A. Only the TCP handshake
B. Address family, advertisements, route policies and filters
C. Only the hostname
D. Only console logging
Correct answer: B. Address family, advertisements, route policies and filters
Explanation: An Established session can exchange no usable routes because of AFI/SAFI, policy or advertisement issues.
Q12. What should be verified after repairing a BGP session?
A. Only that configuration was accepted
B. Established state, prefix exchange, RIB and forwarding
C. Only router uptime
D. Only interface description
Correct answer: B. Established state, prefix exchange, RIB and forwarding
Explanation: End-to-end validation includes session, routes, RIB and forwarding.
Module G – BGP Path Attributes
Path attributes are information carried with BGP routes. They describe route origin and path, identify next-hop information,
support loop prevention and influence routing policy and best-path selection.
Four attribute categories
Category
Meaning
Examples
Well-known mandatory
Must be recognized and must be present where
required in UPDATEs carrying reachable NLRI.
ORIGIN, AS_PATH, NEXT_HOP
Well-known discretionary
Must be recognized but need not appear in every
UPDATE.
LOCAL_PREF, ATOMIC_AGGREGATE
Optional transitive
May not be recognized by every implementation
but is generally propagated onward when
appropriate.
COMMUNITY, AGGREGATOR
Optional non-transitive
May not be recognized and generally is not
propagated beyond the receiving BGP speaker.
MED
Core attributes
Attribute
Purpose / behaviour
ORIGIN
Identifies how the route entered BGP: IGP (0), EGP (1), INCOMPLETE (2). A
BGP network statement normally gives IGP origin; redistribution normally
gives INCOMPLETE.
AS_PATH
Records AS traversal. A router normally rejects a route containing its own
ASN. Shorter paths are generally preferred after higher-priority criteria.
NEXT_HOP
Identifies the next-hop address. It must be resolvable for the route to be
usable.
LOCAL_PREF
Influences preferred exit from an AS. Higher is preferred; normally
propagated within the AS through iBGP, not to eBGP peers.
MED
Suggests a preferred entry point into an AS. Lower is preferred when
compared; comparison scope is platform/configuration dependent.
COMMUNITY
Tags routes so policy can be applied to groups of prefixes. Well-known
communities include NO_EXPORT and NO_ADVERTISE.
ATOMIC_AGGREGATE / AGGREGATOR
Provide information related to route aggregation and the aggregator.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 21
Attribute
Purpose / behaviour
ORIGINATOR_ID / CLUSTER_LIST
Support loop prevention and route tracking in route-reflector environments.
AS_PATH prepending
AS_PATH prepending adds repeated occurrences of an ASN to make a route appear longer to remote ASes. It can influence
remote inbound path selection, but other policy attributes may override the effect.
route-map PREPEND permit 10
set as-path prepend 65001 65001 65001
!
router bgp 65001
neighbor 11.1.1.2 route-map PREPEND out
NEXT_HOP and next-hop-self
An eBGP-learned route advertised to an iBGP peer normally retains its original next hop. If that next hop is not reachable
inside the AS, the receiving router may not use the route. next-hop-self changes the advertised next hop to the local router for
the specified neighbour.
router bgp 65002
neighbor 12.1.1.2 next-hop-self
LOCAL_PREF and MED comparison
Attribute
Traffic engineering direction
Preference
LOCAL_PREF
Preferred exit from own AS
Higher
MED
Suggested entry into own AS from neighbour
Lower, when compared
COMMUNITY examples
route-map TAG-ROUTE permit 10
set community no-export
!
router bgp 65001
neighbor 11.1.1.2 send-community
NO_EXPORT prevents advertisement beyond the applicable local AS/confederation boundary. NO_ADVERTISE prevents
advertisement to any BGP peer. Confirm community propagation and policy behaviour on the target implementation.
Verification commands
show ip bgp
show ip bgp <prefix>
show ip bgp neighbors
show ip route <prefix>
Senior QA test ideas
• Verify ORIGIN for network-statement and redistributed routes.
• Verify AS_PATH propagation, loop rejection and prepending.
• Verify eBGP and iBGP NEXT_HOP behaviour; test next-hop-self.
• Compare LOCAL_PREF values and confirm higher preference.
• Compare MED values under the configured MED comparison rules.
• Apply communities and verify the resulting advertisement policy.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 22
Student Knowledge Assessment – Module G
Q1. Which attribute records the sequence of AS numbers traversed?
A. LOCAL_PREF
B. AS_PATH
C. MED
D. ORIGIN
Correct answer: B. AS_PATH
Explanation: AS_PATH records the AS sequence and supports loop prevention.
Q2. Which attribute influences the preferred exit within an AS?
A. MED
B. COMMUNITY
C. LOCAL_PREF
D. NEXT_HOP
Correct answer: C. LOCAL_PREF
Explanation: LOCAL_PREF influences outbound path selection within an AS.
Q3. Which LOCAL_PREF value is preferred?
A. 50
B. 100
C. 200
D. Lower value
Correct answer: C. 200
Explanation: Higher LOCAL_PREF is preferred.
Q4. Which MED value is normally preferred when compared?
A. 200
B. 150
C. 100
D. 50
Correct answer: D. 50
Explanation: Lower MED is preferred when the comparison applies.
Q5. What does ORIGIN IGP indicate?
A. Route learned from OSPF
B. Route originated using BGP network statement
C. Route learned from EIGRP
D. Route learned from iBGP
Correct answer: B. Route originated using BGP network statement
Explanation: IGP origin identifies BGP network-statement origination, not learning from an IGP.
Q6. Which ORIGIN value is normally associated with redistribution?
A. IGP
B. EGP
C. INCOMPLETE
D. LOCAL
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 23
Correct answer: C. INCOMPLETE
Explanation: Redistributed routes normally receive INCOMPLETE origin.
Q7. What happens if a router receives its own ASN in AS_PATH?
A. It prefers the route
B. It prepends its ASN
C. It rejects the route as a loop
D. It changes MED
Correct answer: C. It rejects the route as a loop
Explanation: The router rejects the route to prevent an AS-level loop.
Q8. What does next-hop-self do?
A. Changes peer ASN
B. Advertises local router as next hop
C. Disables next-hop checking
D. Changes LOCAL_PREF
Correct answer: B. Advertises local router as next hop
Explanation: It advertises the local router as next hop to the specified neighbour.
Q9. Which attribute is used for route tagging and policy?
A. COMMUNITY
B. ORIGIN
C. NEXT_HOP
D. AS_PATH
Correct answer: A. COMMUNITY
Explanation: COMMUNITY tags routes for policy treatment.
Q10. Which community prevents advertisement to any BGP peer?
A. NO_EXPORT
B. NO_ADVERTISE
C. LOCAL_PREF
D. AS_TRANS
Correct answer: B. NO_ADVERTISE
Explanation: NO_ADVERTISE prevents advertisement to any BGP peer.
Q11. Which is a well-known mandatory attribute?
A. MED
B. COMMUNITY
C. AS_PATH
D. AGGREGATOR
Correct answer: C. AS_PATH
Explanation: AS_PATH is well-known mandatory.
Q12. Which attribute is optional non-transitive?
A. AS_PATH
B. MED
C. ORIGIN
D. LOCAL_PREF
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 24
Correct answer: B. MED
Explanation: MED is optional non-transitive.
Q13. What is AS_PATH prepending used for?
A. Reduce TCP timers
B. Make a route appear longer
C. Change next hop
D. Establish iBGP
Correct answer: B. Make a route appear longer
Explanation: Repeated ASNs make the path appear longer to remote ASes.
Q14. A route is in the BGP table but not the IP routing table. What should be investigated?
A. Hostname
B. Best-path status and next-hop reachability
C. Router banner
D. Console password
Correct answer: B. Best-path status and next-hop reachability
Explanation: Check route validity, best-path status, next-hop resolution and RIB selection.
Q15. Which attribute suggests an entry-path preference to a neighbouring AS?
A. LOCAL_PREF
B. MED
C. ORIGIN
D. CLUSTER_LIST
Correct answer: B. MED
Explanation: MED communicates a suggested preferred entry point into the advertising AS.
Module H – BGP Best Path Selection
A BGP router may receive multiple paths for the same destination prefix. Best-path selection evaluates candidate paths
according to an ordered decision process. The exact sequence and tie-breakers can vary by vendor, platform, software release
and configuration.
Common Cisco IOS/IOS-XE decision sequence
• Highest Weight (Cisco-specific and local to the router).
• Highest LOCAL_PREF.
• Locally originated route, under the applicable comparison rules.
• Shortest AS_PATH.
• Lowest ORIGIN code: IGP, then EGP, then INCOMPLETE.
• Lowest MED, when the applicable comparison rules permit comparison.
• eBGP-learned path over iBGP-learned path, when earlier criteria tie.
• Lowest IGP metric to reach the NEXT_HOP (hot-potato routing).
• Additional platform/configuration-dependent tie-breakers, which can include path age, router ID, cluster-list length and
neighbour address.
Implementation note This is a common Cisco teaching sequence, not a universal exhaustive algorithm. Validate the target device's
documentation and configuration before treating a tie-breaker as a test oracle.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 25
Weight
Weight is Cisco-specific, local to the router and not advertised to BGP peers. Higher Weight is preferred.
router bgp 65001
neighbor 11.1.1.2 weight 300
!
! Alternative using a route map
route-map SET-WEIGHT permit 10
set weight 300
Worked comparison
Path
LOCAL_PREF
AS_PATH
MED
Result
A
200
65002 65003 65004
100
Wins over B if earlier criteria
tie because LOCAL_PREF is
higher.
B
100
65005
50
Shorter AS_PATH and lower
MED do not override Path A's
higher LOCAL_PREF.
Multipath
BGP normally selects one best path, but configured multipath can install multiple eligible paths for forwarding. Eligibility and
equivalence requirements depend on the platform and feature configuration.
router bgp 65001
maximum-paths 2
!
show ip bgp <prefix>
show ip route <prefix>
show ip cef <destination>
BGP table, RIB and forwarding plane
Component
Meaning
BGP table
Contains BGP paths received and evaluated, including non-best paths where
retained.
RIB / IP routing table
Contains routes selected for installation by the routing system.
CEF / forwarding table
Contains forwarding information used by the data plane.
Troubleshooting workflow
• Confirm neighbour state with show ip bgp summary.
• Inspect all paths for the prefix with show ip bgp <prefix>.
• Check validity and next-hop reachability.
• Compare attributes in the correct platform-specific order.
• Inspect route maps, filters, MED comparison and multipath settings.
• Check the IP routing table and forwarding table.
• Validate actual traffic forwarding and record evidence.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 26
Useful commands
show ip bgp
show ip bgp <prefix>
show ip bgp summary
show ip route <prefix>
show ip cef <destination>
show running-config | section router bgp
Senior QA test ideas
• Change Weight and verify Cisco local best-path change.
• Compare different LOCAL_PREF values.
• Compare different AS_PATH lengths with earlier attributes equal.
• Compare ORIGIN and MED where their comparisons are reached.
• Compare eBGP and iBGP paths when earlier criteria tie.
• Change IGP cost to next hop and observe hot-potato path selection.
• Enable multipath and verify multiple eligible next hops in the RIB/forwarding table.
• Withdraw the selected best path and verify reevaluation and failover.
• Verify a BGP route that is not installed in the RIB and determine why.
Student Knowledge Assessment – Module H
Q1. What is the primary purpose of BGP best-path selection?
A. Establish TCP sessions
B. Select a preferred route among candidate paths
C. Assign IP addresses
D. Discover neighbours
Correct answer: B. Select a preferred route among candidate paths
Explanation: BGP evaluates candidate paths and selects a preferred path.
Q2. Which attribute is Cisco-specific and locally significant?
A. AS_PATH
B. MED
C. Weight
D. ORIGIN
Correct answer: C. Weight
Explanation: Weight is Cisco-specific and is not advertised to BGP neighbours.
Q3. Which Weight value is preferred?
A. 100
B. 200
C. 50
D. Higher value
Correct answer: D. Higher value
Explanation: The highest Weight is preferred.
Q4. Which LOCAL_PREF value is preferred?
A. 50
B. 100
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 27
C. 200
D. Lowest value
Correct answer: C. 200
Explanation: Higher LOCAL_PREF is preferred.
Q5. Path A has LOCAL_PREF 200 and AS_PATH length 3. Path B has LOCAL_PREF 100 and AS_PATH length 1. Which
wins?
A. Path A
B. Path B
C. Both always win
D. Neither
Correct answer: A. Path A
Explanation: LOCAL_PREF is evaluated before AS_PATH; Path A wins.
Q6. If earlier attributes tie, which AS_PATH is generally preferred?
A. Longer
B. Shorter
C. More communities
D. Higher MED
Correct answer: B. Shorter
Explanation: A shorter AS_PATH is generally preferred.
Q7. Which ORIGIN type is preferred?
A. INCOMPLETE
B. EGP
C. IGP
D. All equal
Correct answer: C. IGP
Explanation: IGP has the lowest ORIGIN code and is preferred.
Q8. Which MED value is normally preferred when compared?
A. 200
B. 150
C. 100
D. 50
Correct answer: D. 50
Explanation: Lower MED is preferred when MED comparison applies.
Q9. When earlier criteria tie, which route type is generally preferred by Cisco?
A. iBGP
B. eBGP
C. Static
D. OSPF
Correct answer: B. eBGP
Explanation: Cisco generally prefers eBGP over iBGP at this stage.
Q10. What is hot-potato routing?
A. Highest AS_PATH
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 28
B. Lowest IGP cost to next hop
C. Highest MED
D. Highest Weight
Correct answer: B. Lowest IGP cost to next hop
Explanation: Hot-potato routing prefers the closest exit based on internal IGP cost.
Q11. What is BGP Multipath?
A. Multiple TCP sessions to one peer
B. Installing multiple eligible paths for a prefix
C. Increasing AS_PATH
D. Disabling best-path
Correct answer: B. Installing multiple eligible paths for a prefix
Explanation: Multipath can install multiple eligible paths for forwarding.
Q12. Which command displays BGP candidate paths and best-path indicators?
A. show ip interface brief
B. show ip bgp
C. show version
D. show arp
Correct answer: B. show ip bgp
Explanation: show ip bgp displays BGP routes and best-path indicators.
Q13. A route is in BGP table but absent from RIB. What should you check?
A. Hostname
B. Next-hop reachability, best path and RIB installation conditions
C. NTP
D. Interface description
Correct answer: B. Next-hop reachability, best path and RIB installation conditions
Explanation: Check validity, best-path status, next-hop reachability and RIB selection.
Q14. What normally happens if the selected best path is withdrawn?
A. BGP always restarts
B. Another eligible path may become best
C. All peers are removed
D. It becomes static
Correct answer: B. Another eligible path may become best
Explanation: BGP reevaluates remaining eligible paths.
Q15. Which statement about Weight is correct?
A. Standard attribute advertised to all peers
B. Lower is preferred
C. Cisco-specific and local to router
D. Replaces AS_PATH
Correct answer: C. Cisco-specific and local to router
Explanation: Weight is local to a Cisco router and is not propagated to peers.
Appendix 1 – Core CLI Quick Reference
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 29
Command
Use
show ip bgp summary
Peer state and prefix count summary.
show ip bgp
BGP table, candidate paths and best-path indicators.
show ip bgp <prefix>
Inspect attributes and candidate paths for a prefix.
show ip bgp neighbors
Neighbour details, capabilities, timers and counters.
show ip route bgp
Routes learned through BGP and installed in the RIB.
show ip route <prefix>
Selected route and route source.
show ip cef <destination>
Forwarding lookup.
show running-config | section router bgp
BGP configuration section.
show tcp brief
TCP connection information, useful for port 179 checks.
show logging
Review BGP state changes and error messages.
Appendix 2 – QA Evidence Record Template
Field
Record
Test ID
Module / feature
Device / software version
Topology / peer details
Preconditions
Configuration applied
Test steps
Expected result
Actual result
CLI / packet capture evidence
Pass / Fail
Defect / observation
Tester / date
Appendix 3 – Technical Accuracy Notes
• BGP Established confirms the peer session, not that all expected routes are received, selected, installed or forwarding.
• show ip bgp summary commonly displays a numeric prefix count in the State/PfxRcd column when the peer is Established;
textual state values indicate a non-established state.
• The TCP server listens on port 179; the client side commonly uses an ephemeral source port. Simultaneous connection
attempts and collision handling can affect which TCP connection is retained.
• The negotiated Hold Time is based on the lower non-zero advertised value; zero disables the hold timer. Confirm
implementation behaviour and configured timers on the device.
• LOCAL_PREF is normally propagated within an AS via iBGP and is not normally sent to eBGP peers. Weight is Cisco-specific
and local.
• MED comparison across different neighbouring ASes may be disabled by default; check platform configuration such as Cisco
bgp always-compare-med.
• Route-selection tie-breakers and multipath eligibility vary by implementation and configuration. Use vendor documentation for
strict QA expected results.
• Private ASN ranges and special-use assignments should be checked against current IANA/RIR registries for production use.
• Illustrative lab addressing and configuration must be checked against the live EVE-NG topology before use. Capture actual
lab outputs separately.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 30
Part 1 Completion Record
Modules A–H form the complete Basic BGP Theory learning sequence for SP Networking Academy. The next learning track
can extend into Advanced BGP Theory, followed by interview preparation and practical lab exercises.
Module
Topic
Status
A
BGP Fundamentals
Approved
B
Autonomous Systems and ASN Architecture
Approved
C
eBGP and iBGP
Approved
D
BGP Neighbour Relationships
Approved
E
BGP Message Types
Approved
F
BGP Finite State Machine
Approved
G
BGP Path Attributes
Approved
H
BGP Best Path Selection
Approved
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 31
PART 2 – ADVANCED BGP THEORY
Source: SP_Networking_Academy_BGP_Part2_v1.0(1).docx
SP NETWORKING ACADEMY
BGP DOCUMENTATION
PART 2 – ADVANCED BGP THEORY
Modules I–O | Learning • Configuration • Verification • QA • Assessment
Version 1.0 | 13 November 2026
Advanced learning reference for networking students, network engineers and Senior Network QA Engineers.
Document Control
Item
Description
Document
BGP Documentation – PART 2 (Advanced BGP Theory)
Version
1.0
Scope
Modules I–O: route advertisement through BGP security
Audience
Networking students, network engineers and Senior Network QA Engineers
CLI
Illustrative Cisco IOS/IOS-XE style; verify syntax and support on target
platform/release
Status
Modules I–O approved by learner
Assessment provenance
Exact original assessment wording/options for Modules I–N were not fully
recoverable from retained source records. Those assessment banks are
reconstructed from approved module topics. Module O assessment is
preserved from the approved module in this conversation.
How to Use This Guide
• Study Modules I–O in sequence; they build on Basic BGP Theory Part 1.
• Treat CLI examples as illustrative, not as lab-verified configurations.
• Record topology, software version, configuration, expected/actual result and evidence for each QA test.
• Capture actual EVE-NG outputs and packet traces separately.
• Complete each assessment and review its explanations.
Contents
• I – BGP Route Advertisement
• J – BGP Routing Policies
• K – BGP Timers and Stability
• L – BGP Route Reflectors
• M – Advanced BGP Features
• N – BGP Troubleshooting
• O – BGP Security
• Appendices – CLI quick reference, QA evidence and technical notes
Module I – BGP Route Advertisement
This module explains how BGP originates, redistributes and aggregates routes, and how policy controls route propagation.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 32
Learning objectives
• Explain BGP network-statement origination and exact-match requirements.
• Differentiate origination from redistribution.
• Control redistribution using route maps and prefix lists.
• Explain aggregate-address, summary-only and as-set.
• Verify advertised, received and installed routes independently.
1. Network statement
On Cisco IOS, a BGP network statement normally originates a prefix when an exact matching prefix and mask exists in the
local routing table. It does not create the underlying route; a covering route or different mask is not necessarily sufficient.
router bgp 65001
network 172.16.1.1 mask 255.255.255.255
!
show ip route 172.16.1.1
show ip bgp 172.16.1.1
2. Redistribution
Redistribution injects routes learned by another routing source—OSPF, EIGRP, IS-IS or static routing—into BGP. Uncontrolled
redistribution can cause route leaks, feedback loops and excessive advertisements.
ip prefix-list OSPF-PREFIXES seq 10 permit 10.10.10.0/24
route-map OSPF-TO-BGP permit 10
match ip address prefix-list OSPF-PREFIXES
!
router bgp 65001
redistribute ospf 10 route-map OSPF-TO-BGP
• Use explicit prefix filters and route maps.
• Check metric/origin handling and platform-specific requirements.
• Prevent routes being redistributed back into their source protocol without loop controls.
• Confirm the source route exists before expecting redistribution.
3. Aggregation
Aggregation advertises a covering summary instead of—or in addition to—component routes. It can reduce routing-table size,
but should represent reachable component space and use appropriate discard/summary handling.
router bgp 65001
aggregate-address 172.16.0.0 255.255.0.0 summary-only
aggregate-address 172.16.0.0 255.255.0.0 as-set
summary-only suppresses more-specific component advertisements when the aggregate is generated. as-set can preserve
contributing AS information in an AS_SET, subject to platform support.
4. Verification workflow
• Confirm the source prefix exists in the local RIB.
• Confirm origination or redistribution is configured.
• Inspect the local BGP table and attributes.
• Inspect outbound policy and advertised-routes.
• Verify the receiving peer's BGP table and inbound policy.
• Check RIB installation, next-hop reachability and forwarding separately.
show ip route <prefix>
show ip bgp <prefix>
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 33
show ip bgp neighbors <peer> advertised-routes
show ip route bgp
Senior QA scenarios
ID
Test
Expected result
I-01
Exact route and network statement
Prefix originated.
I-02
Remove exact route
Prefix withdrawn/not advertised.
I-03
Different mask
No unintended origination.
I-04
Redistribute permitted OSPF route
Only permitted route enters BGP.
I-05
Redistribute denied prefix
Prefix excluded.
I-06
Generate aggregate
Expected summary advertised.
I-07
summary-only
More-specifics suppressed.
I-08
as-set aggregation
AS_SET behaviour matches platform.
I-09
Outbound filter
Only intended routes advertised.
I-10
Withdraw component
Aggregate behaviour follows remaining
contributors.
Interview questions
• Difference between network origination and redistribution?
• Why does Cisco IOS require an exact route/mask match?
• Risks of unrestricted redistribution?
• What does aggregate-address do?
• Effect of summary-only?
• Why use as-set?
Student Knowledge Assessment – Module I (reconstructed)
Q1. What must normally exist for a Cisco IOS BGP network statement to originate a prefix?
• A. A default route only
• B. An exact matching route and mask in the routing table
• C. An OSPF neighbour
• D. A route reflector
Correct answer: B. An exact matching route and mask in the routing table
Explanation: The network statement normally requires an exact route/mask match in the local RIB.
Q2. Does a BGP network statement create the underlying route?
• A. Yes
• B. No
• C. Only for iBGP
• D. Only when MED is set
Correct answer: B. No
Explanation: The route must already exist in the routing table.
Q3. What is redistribution?
• A. Changing TCP port
• B. Injecting routes from another routing source into BGP
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 34
• C. Changing router ID
• D. Negotiating Hold Time
Correct answer: B. Injecting routes from another routing source into BGP
Explanation: Redistribution imports routes from another routing source into BGP.
Q4. What is a key risk of unrestricted redistribution?
• A. Lower CPU temperature
• B. Route leaks and feedback loops
• C. Automatic RPKI validation
• D. Reduced MTU
Correct answer: B. Route leaks and feedback loops
Explanation: Uncontrolled redistribution can propagate unintended routes or create feedback loops.
Q5. What does aggregate-address provide?
• A. Route summarization
• B. Peer authentication
• C. Timer negotiation
• D. TCP encryption
Correct answer: A. Route summarization
Explanation: It creates an aggregate BGP advertisement from contributing routes.
Q6. What does summary-only do?
• A. Advertises only components
• B. Suppresses more-specific component advertisements
• C. Disables BGP
• D. Changes origin AS
Correct answer: B. Suppresses more-specific component advertisements
Explanation: summary-only suppresses more-specific routes when the aggregate is advertised.
Q7. What can as-set preserve?
• A. Contributing AS information
• B. TCP sequence numbers
• C. Interface metrics
• D. RPKI certificates
Correct answer: A. Contributing AS information
Explanation: AS_SET can carry contributing AS information in the aggregate path.
Q8. Which command checks routes advertised to a neighbour?
• A. show ip bgp neighbors <peer> advertised-routes
• B. show arp
• C. show vlan
• D. show clock
Correct answer: A. show ip bgp neighbors <peer> advertised-routes
Explanation: The advertised-routes view verifies outbound route propagation.
Q9. Does Established guarantee prefix installation?
• A. Yes
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 35
• B. No
• C. Only eBGP
• D. Only with MED 0
Correct answer: B. No
Explanation: Session state, path selection, RIB installation and forwarding are separate checks.
Q10. What should be checked before redistribution?
• A. Source route exists and policy permits it
• B. DNS works
• C. Peer uses UDP
• D. Router ID is public
Correct answer: A. Source route exists and policy permits it
Explanation: Confirm the source route and apply controlled redistribution policy.
Module J – BGP Routing Policies
Routing policy controls which routes are accepted, modified and advertised. Policy is central to safe inter-domain routing.
Learning objectives
• Differentiate inbound and outbound policy.
• Build prefix lists using exact matches and ge/le.
• Understand route-map sequence, match, set and implicit deny.
• Use LOCAL_PREF, MED and Cisco Weight carefully.
• Verify policy effects and refresh routes safely.
1. Policy direction
Direction
Meaning
Purpose
Inbound
Routes received from neighbour
Filter/tag/modify received routes
Outbound
Routes sent to neighbour
Control route export
2. Prefix lists
ip prefix-list CUSTOMER-IN seq 10 permit 203.0.113.0/24
ip prefix-list CUSTOMER-IN seq 20 permit 198.51.100.0/24 le 26
router bgp 65001
neighbor 11.1.1.2 prefix-list CUSTOMER-IN in
Prefix lists are evaluated in sequence order. ge/le define prefix-length ranges. If no entry matches, the implicit result is deny.
3. Route maps
route-map PEER-IN permit 10
match ip address prefix-list CUSTOMER-IN
set local-preference 200
!
route-map PEER-IN deny 100
!
router bgp 65001
neighbor 11.1.1.2 route-map PEER-IN in
The first matching route-map sequence determines the action. If no sequence permits a route, the implicit deny applies.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 36
4. Common policy attributes
Attribute
Scope
Preference
LOCAL_PREF
Within an AS; normally propagated via iBGP
Higher preferred
MED
Hint to adjacent AS; comparison scope is
policy/platform dependent
Lower preferred when compared
Weight
Cisco-specific local attribute; not propagated
Higher preferred
route-map PREFER-PRIMARY permit 10
set local-preference 250
!
router bgp 65001
neighbor 11.1.1.2 route-map PREFER-PRIMARY in
A community such as no-export is a tag; peer behaviour or explicit policy must honour it. For a specific export restriction, use
outbound filtering or a policy matching the community.
5. Route refresh and soft reconfiguration
• Route refresh lets a router request a peer to resend routes when the capability is negotiated.
• Soft reconfiguration inbound can retain pre-policy routes for comparison but consumes memory and requires support.
• Compare received, accepted and advertised routes; command availability varies.
show ip bgp neighbors <peer>
show ip bgp neighbors <peer> routes
show ip bgp neighbors <peer> advertised-routes
show ip prefix-list
show route-map
Senior QA scenarios
ID
Test
Expected result
J-01
Exact prefix-list permit
Only exact prefix permitted.
J-02
ge/le boundary
Prefix lengths match intended range.
J-03
No prefix-list match
Implicit deny.
J-04
Route-map permit/set
Route accepted and attribute changed.
J-05
Route-map deny
Matching route rejected.
J-06
Multiple sequences
First matching sequence controls.
J-07
Change LOCAL_PREF
Best path changes when earlier criteria do not
decide.
J-08
Change MED
Comparison follows configured scope.
J-09
Change Weight
Local best path changes.
J-10
no-export community
Tag and actual export behaviour verified
separately.
J-11
Route refresh
Peer resends routes when supported.
J-12
Compare received/accepted/advertised
Policy effects independently visible.
Interview questions
• Inbound versus outbound policy?
• How do ge and le work?
• What if no prefix-list entry matches?
• How are route-map sequences evaluated?
• Why use LOCAL_PREF?
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 37
• How does MED differ?
• Why is Weight Cisco-specific?
• What is route refresh?
• Trade-off of soft-reconfiguration inbound?
• Does no-export automatically block every export?
Student Knowledge Assessment – Module J (reconstructed)
Q1. Which policy direction controls routes received from a neighbour?
• A. Outbound
• B. Inbound
• C. Local-only
• D. Redistribution-only
Correct answer: B. Inbound
Explanation: Inbound policy applies to routes received from a peer.
Q2. Which direction controls routes advertised to a neighbour?
• A. Inbound
• B. Outbound
• C. IGP
• D. TCP
Correct answer: B. Outbound
Explanation: Outbound policy controls route export.
Q3. What does le specify in a prefix list?
• A. Lowest AS number
• B. Maximum permitted prefix length
• C. MED value
• D. TCP port
Correct answer: B. Maximum permitted prefix length
Explanation: le defines the maximum prefix length that can match.
Q4. What happens if no prefix-list entry matches?
• A. Implicit permit
• B. Implicit deny
• C. Route becomes static
• D. BGP resets
Correct answer: B. Implicit deny
Explanation: Prefix lists have an implicit deny.
Q5. Which LOCAL_PREF value is preferred?
• A. Lower
• B. Higher
• C. Zero only
• D. Equal only
Correct answer: B. Higher
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 38
Explanation: Higher LOCAL_PREF is preferred.
Q6. Which MED value is generally preferred when compared?
• A. Higher
• B. Lower
• C. 255 only
• D. Never compared
Correct answer: B. Lower
Explanation: Lower MED is preferred when the comparison is reached and applicable rules permit it.
Q7. Which attribute is Cisco-specific and local?
• A. AS_PATH
• B. ORIGIN
• C. Weight
• D. LOCAL_PREF
Correct answer: C. Weight
Explanation: Weight is Cisco-specific and is not advertised to BGP peers.
Q8. What does the first matching route-map sequence do?
• A. Combines all sequences
• B. Determines the action for that route
• C. Resets session
• D. Changes ASN
Correct answer: B. Determines the action for that route
Explanation: Route-map processing stops at the first matching sequence.
Q9. What is route refresh used for?
• A. Request routes again from peer
• B. Change TCP port
• C. Change router ID
• D. Disable updates
Correct answer: A. Request routes again from peer
Explanation: Route refresh requests a peer to resend routes when supported.
Q10. Does set community no-export alone guarantee blocking to every specific neighbour?
• A. Yes
• B. No; policy/peer handling must honour it
• C. Only eBGP
• D. Only iBGP
Correct answer: B. No; policy/peer handling must honour it
Explanation: The tag needs to be honoured by peer behaviour or explicit policy.
Module K – BGP Timers and Stability
Timers determine session liveness and retry behaviour. Graceful Restart and BFD affect failure detection and convergence.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 39
Learning objectives
• Explain Keepalive, Hold and ConnectRetry.
• Understand Hold Time negotiation.
• Explain Graceful Restart and helper behaviour.
• Understand BFD integration and convergence measurement.
• Design timer and recovery QA tests.
1. Core timers
Timer
Purpose
Notes
Keepalive
Periodic liveness message
Cisco defaults may be 60 seconds;
platform/configuration dependent.
Hold Time
Maximum interval without acceptable BGP
message
Lower non-zero proposal is used; if either
proposes zero, negotiated Hold Time is zero.
ConnectRetry
Delay before retrying TCP establishment
Implementation/configuration dependent.
Graceful Restart timers
Control stale-route retention and restart/helper
behaviour
Capability and platform dependent.
2. Configuration
router bgp 65001
timers bgp 30 90
neighbor 11.1.1.2 timers 20 60
Verify syntax and precedence on the target release. Avoid changing timers without considering peer compatibility and
operational impact.
3. Graceful Restart
• A restarting speaker signals restart capability and relevant state.
• A capable helper may retain eligible stale routes temporarily.
• Routes are refreshed as the restarting speaker re-establishes sessions.
• Stale routes are removed when not refreshed within the applicable period.
Graceful Restart is not a guarantee of uninterrupted forwarding. Success depends on forwarding-plane continuity, capability
negotiation, timers, topology and implementation.
4. BFD and BGP
Bidirectional Forwarding Detection provides fast failure detection. BGP can use BFD state to trigger neighbour failure handling
faster than a long Hold Timer.
interface GigabitEthernet0/0
bfd interval 300 min_rx 300 multiplier 3
!
router bgp 65001
neighbor 11.1.1.2 fall-over bfd
Illustrative syntax only. Detection depends on negotiated intervals, multiplier, scheduling and platform implementation.
5. Convergence measurement
• Record baseline session, route count and forwarding path.
• Trigger a controlled link or peer failure.
• Measure detection and session-down time.
• Measure route withdrawal or alternate-path selection.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 40
• Measure forwarding interruption and packet loss separately.
• Restore link and record session and route recovery.
• Repeat with timer/BFD/Graceful Restart settings.
Senior QA scenarios
ID
Test
Expected result
K-01
Different Hold proposals
Lower non-zero value; zero proposal yields zero.
K-02
No acceptable BGP message
Hold Timer expires at negotiated limit.
K-03
Change Keepalive
Messages follow configured behaviour.
K-04
Peer TCP unreachable
Retry follows implementation.
K-05
Graceful Restart peer restart
Eligible stale routes retained for applicable period.
K-06
Route not refreshed
Stale route removed after timer.
K-07
BFD failure
BGP reacts to BFD down as supported.
K-08
Vary BFD parameters
Detection reflects negotiated values.
K-09
Restore peer
Session/routes recover.
K-10
Control-plane restart
Data-plane impact recorded separately.
Interview questions
• Keepalive versus Hold Timer?
• How is Hold Time negotiated?
• What if Hold Time is zero?
• What is ConnectRetry?
• What is Graceful Restart?
• Restarting speaker versus helper?
• Does Graceful Restart guarantee hitless forwarding?
• What is BFD?
• What determines BFD detection time?
• How measure BGP convergence?
Student Knowledge Assessment – Module K (reconstructed)
Q1. What does the BGP Hold Timer measure?
• A. Time since last acceptable BGP message
• B. TCP retransmission count
• C. Route age
• D. IGP SPF interval
Correct answer: A. Time since last acceptable BGP message
Explanation: It expires if no acceptable BGP message is received within the negotiated interval.
Q2. How is a non-zero Hold Time generally negotiated?
• A. Higher
• B. Lower
• C. Average
• D. Random
Correct answer: B. Lower
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 41
Explanation: The lower non-zero proposed value is used.
Q3. What if either peer proposes Hold Time zero?
• A. 180 seconds
• B. 90 seconds
• C. Negotiated Hold Time is zero
• D. Session cannot establish
Correct answer: C. Negotiated Hold Time is zero
Explanation: A zero proposal results in a negotiated Hold Time of zero.
Q4. What is ConnectRetry used for?
• A. Retrying TCP establishment
• B. Refreshing ROAs
• C. Selecting MED
• D. Reflecting routes
Correct answer: A. Retrying TCP establishment
Explanation: It controls retry timing for TCP session establishment.
Q5. What is Graceful Restart intended to reduce?
• A. Forwarding disruption during eligible control-plane restart
• B. Prefix-list length
• C. AS_PATH length
• D. TCP port usage
Correct answer: A. Forwarding disruption during eligible control-plane restart
Explanation: It can preserve eligible stale routes temporarily during restart.
Q6. Does Graceful Restart guarantee no packet loss?
• A. Yes
• B. No
• C. Only eBGP
• D. Only with MED
Correct answer: B. No
Explanation: Forwarding continuity depends on platform and topology.
Q7. What does BFD provide?
• A. Fast failure detection
• B. Route aggregation
• C. RPKI signing
• D. AS translation
Correct answer: A. Fast failure detection
Explanation: BFD provides rapid detection of forwarding-path failure.
Q8. What influences BFD detection time?
• A. Negotiated intervals/multiplier and scheduling
• B. Hostname
• C. Community name
• D. Prefix length
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 42
Correct answer: A. Negotiated intervals/multiplier and scheduling
Explanation: Detection depends on negotiated parameters and implementation.
Q9. What should QA measure during failover?
• A. Only BGP state
• B. Only one ping
• C. Detection, route convergence and forwarding impact separately
• D. Only uptime
Correct answer: C. Detection, route convergence and forwarding impact separately
Explanation: Control-plane state and forwarding impact are distinct.
Q10. What happens if a stale route is not refreshed in the applicable GR period?
• A. Retained forever
• B. Removed
• C. Becomes static
• D. Changes origin
Correct answer: B. Removed
Explanation: Stale routes are removed when not refreshed within the applicable period.
Module L – BGP Route Reflectors
Route Reflectors reduce the need for a full iBGP mesh by reflecting selected routes between clients while using attributes to
prevent reflection loops.
Learning objectives
• Calculate full-mesh session requirements.
• Explain RR clients and non-clients.
• Apply reflection advertisement rules.
• Explain Originator ID and Cluster List.
• Understand redundancy, path hiding and Add-Path.
1. Full mesh scaling
Without route reflection, iBGP requires a full mesh so routes learned from one iBGP peer are not re-advertised to another iBGP
peer. Session count is N(N−1)/2.
Routers
Full-mesh sessions
4
6
10
45
20
190
50
1,225
2. Reflection rules
Route source
RR may advertise to
eBGP peer
Eligible iBGP clients and non-clients
RR client
Other clients and non-clients
RR non-client
Clients only
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 43
Non-client iBGP peers still require a full mesh among themselves unless another supported architecture is used. An RR
normally reflects its selected best path, which can cause path hiding.
3. Cisco IOS configuration
router bgp 65001
neighbor 10.0.0.2 remote-as 65001
neighbor 10.0.0.2 route-reflector-client
neighbor 10.0.0.3 remote-as 65001
neighbor 10.0.0.3 route-reflector-client
4. Loop prevention
• Originator ID identifies the router that originated the route into the reflection process; a router rejects a route carrying its own
ID.
• Cluster List records cluster IDs traversed; an RR rejects a route containing its own cluster ID.
• These attributes prevent reflection loops but do not replace correct design and policy.
5. Redundancy, path hiding and Add-Path
Multiple RRs improve resilience. Clients may peer with more than one RR. Since an RR generally advertises its selected best
path, another useful path can be hidden. BGP Add-Path allows multiple paths to be advertised when supported and configured.
Lab extension
Preserve the existing four-router EVE-NG baseline. Add a separate R5 or clone a snapshot for RR experiments; verify
interface mappings and software support.
Senior QA scenarios
ID
Test
Expected result
L-01
Calculate mesh for N routers
N(N−1)/2.
L-02
Client route learned
Reflected to eligible clients/non-clients.
L-03
Non-client route learned
Reflected to clients only.
L-04
Own Originator ID returns
Original router rejects route.
L-05
Own Cluster ID present
RR rejects looped route.
L-06
RR failure with redundant RR
Alternate RR maintains/re-establishes reachability.
L-07
Two candidate paths at RR
Best-path reflection verified.
L-08
Enable Add-Path
Multiple paths advertised/received as configured.
L-09
Client/non-client policy
No unintended propagation.
L-10
RR failure and recovery
Route and forwarding recovery measured.
Interview questions
• Why use Route Reflectors?
• Full-mesh formula?
• Client versus non-client?
• How are client-learned routes handled?
• How are non-client-learned routes handled?
• What is Originator ID?
• What is Cluster List?
• What is path hiding?
• How does Add-Path help?
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 44
• Why deploy redundant RRs?
Student Knowledge Assessment – Module L (reconstructed)
Q1. How many full-mesh iBGP sessions are required for 5 routers?
• A. 5
• B. 10
• C. 15
• D. 20
Correct answer: B. 10
Explanation: N(N−1)/2 = 5×4/2 = 10.
Q2. What is the main purpose of an RR?
• A. Replace TCP
• B. Reduce full-mesh iBGP peering requirements
• C. Encrypt updates
• D. Assign ASNs
Correct answer: B. Reduce full-mesh iBGP peering requirements
Explanation: An RR reflects eligible routes to clients.
Q3. A route learned from an RR client can be reflected to:
• A. Only source client
• B. Other clients and non-clients
• C. Only eBGP peers
• D. No peers
Correct answer: B. Other clients and non-clients
Explanation: Client-learned routes can be reflected to other clients and non-clients.
Q4. A route learned from a non-client is reflected to:
• A. Other non-clients only
• B. Clients only
• C. All peers
• D. No one
Correct answer: B. Clients only
Explanation: Non-client-learned routes are reflected to clients only.
Q5. What does Originator ID identify?
• A. Original router injecting route into reflection
• B. TCP server port
• C. Local preference
• D. Cluster count
Correct answer: A. Original router injecting route into reflection
Explanation: Originator ID records the originating router ID for loop prevention.
Q6. What does Cluster List contain?
• A. ASNs
• B. Cluster IDs traversed
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 45
• C. Interface addresses
• D. MED values
Correct answer: B. Cluster IDs traversed
Explanation: Cluster List records the route-reflector cluster path.
Q7. What is path hiding?
• A. Route hidden by ACL
• B. RR advertises selected best path and may not advertise another useful path
• C. TCP encrypted
• D. Route not originated
Correct answer: B. RR advertises selected best path and may not advertise another useful path
Explanation: Best-path-only reflection can hide alternate paths.
Q8. What does Add-Path enable?
• A. Multiple paths advertised
• B. Multiple TCP ports
• C. More ASNs
• D. Zero Hold Time
Correct answer: A. Multiple paths advertised
Explanation: Add-Path allows multiple paths for a prefix to be advertised.
Q9. Do RR clients need direct sessions to each other in a standard RR design?
• A. Yes always
• B. No, not for the client mesh served by RR
• C. Only eBGP
• D. Only with MED
Correct answer: B. No, not for the client mesh served by RR
Explanation: Clients exchange routes through the RR.
Q10. Why use redundant RRs?
• A. Remove policies
• B. Improve resilience and avoid a single RR failure point
• C. Disable AS_PATH
• D. Replace IGP
Correct answer: B. Improve resilience and avoid a single RR failure point
Explanation: Redundant RRs improve control-plane resilience.
Module M – Advanced BGP Features
This module covers communities, multipath, route dampening and conditional advertisement.
Learning objectives
• Differentiate standard, extended and large communities.
• Use community tagging and matching.
• Explain multipath eligibility.
• Explain dampening and its operational risks.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 46
• Understand conditional advertisement.
1. Communities
Type
Size / format
Reference
Standard
32-bit; commonly high:low
RFC 1997
Extended
8 octets
RFC 4360
Large
Three 32-bit fields
RFC 8092
Well-known standard communities include NO_EXPORT (65535:65281), NO_ADVERTISE (65535:65282),
NO_EXPORT_SUBCONFED (65535:65283) and NOPEER (65535:65284).
ip community-list standard CUSTOMER-TAG permit 65001:100
route-map TAG-CUSTOMER permit 10
set community 65001:100 additive
!
router bgp 65001
neighbor 11.1.1.2 send-community
additive preserves existing communities while adding the new value. Ensure the relevant community type is sent; syntax varies
by platform. A tag does not itself enforce a specific export policy unless peers/policy honour it.
2. Multipath
BGP normally selects one best path. With multipath enabled, multiple eligible paths may be installed for forwarding. Eligibility
depends on platform-specific equivalence rules; best-path evaluation still occurs.
router bgp 65001
maximum-paths 2
maximum-paths ibgp 2
! Optional platform feature:
bgp bestpath as-path multipath-relax
3. Route dampening
Dampening assigns penalties to repeated route flaps. A route may be suppressed after a threshold and become reusable after
its penalty decays below a reuse threshold. Aggressive dampening can delay legitimate recovery; use selectively and validate
current operational guidance.
4. Conditional advertisement
Conditional advertisement makes a route's advertisement depend on the presence or absence of another route, using
advertise-map, exist-map and non-exist-map on supported platforms.
route-map ADVERTISE-THIS permit 10
match ip address prefix-list PREFIX-TO-ADVERTISE
route-map CONDITION-EXISTS permit 10
match ip address prefix-list CONDITION-PREFIX
!
router bgp 65001
neighbor 11.1.1.2 advertise-map ADVERTISE-THIS exist-map CONDITION-EXISTS
Illustrative only: validate exact syntax, address-family placement and condition semantics on the target release.
Senior QA scenarios
ID
Test
Expected result
M-01
Tag route with standard community
Community appears.
M-02
Use additive
Existing communities retained and new tag added.
M-03
Send community
Peer receives community when configured.
M-04
Match community in route-map
Policy applies.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 47
ID
Test
Expected result
M-05
Apply NO_EXPORT
Propagation limited when peers honour it.
M-06
Enable multipath
Multiple eligible next hops may be installed.
M-07
AS_PATH multipath-relax
Eligibility follows platform feature.
M-08
Generate controlled flaps
Penalty/suppression behaviour verified.
M-09
Reach reuse threshold
Route becomes reusable.
M-10
Conditional condition true/false
Advertisement follows condition.
Interview questions
• What is a BGP community?
• Standard vs extended vs large?
• What does additive do?
• What does NO_EXPORT mean?
• What is multipath?
• Does multipath bypass best-path?
• What is dampening?
• Why can aggressive dampening be harmful?
• What is conditional advertisement?
• What do advertise-map/exist-map/non-exist-map do?
Student Knowledge Assessment – Module M (reconstructed)
Q1. How large is a standard BGP community?
• A. 16 bits
• B. 32 bits
• C. 64 bits
• D. 128 bits
Correct answer: B. 32 bits
Explanation: Standard communities are 32-bit values.
Q2. Which RFC defines standard communities?
• A. RFC 1997
• B. RFC 4271
• C. RFC 5082
• D. RFC 5925
Correct answer: A. RFC 1997
Explanation: RFC 1997 defines BGP communities.
Q3. How many 32-bit fields are in a Large Community?
• A. One
• B. Two
• C. Three
• D. Four
Correct answer: C. Three
Explanation: Large Communities contain three 32-bit fields.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 48
Q4. What does additive do?
• A. Removes existing communities
• B. Adds a community while preserving existing values
• C. Resets BGP
• D. Changes MED
Correct answer: B. Adds a community while preserving existing values
Explanation: Additive preserves existing communities and adds the specified value.
Q5. What does NO_EXPORT generally indicate?
• A. Do not advertise beyond defined local AS/confederation scope
• B. Always prefer route
• C. Reject all iBGP
• D. Disable TCP
Correct answer: A. Do not advertise beyond defined local AS/confederation scope
Explanation: NO_EXPORT limits propagation beyond its defined scope.
Q6. What does BGP multipath allow?
• A. Installation of multiple eligible paths
• B. Multiple ASNs
• C. Multiple Hold Timers
• D. Multiple BGP versions
Correct answer: A. Installation of multiple eligible paths
Explanation: Multipath can install multiple eligible paths.
Q7. Does multipath remove best-path evaluation?
• A. Yes
• B. No
• C. Only iBGP
• D. Only with communities
Correct answer: B. No
Explanation: BGP still evaluates paths; multipath installs additional eligible paths.
Q8. What is route dampening designed to reduce?
• A. Repeated route-flap instability
• B. TCP port usage
• C. Prefix length
• D. RPKI validation
Correct answer: A. Repeated route-flap instability
Explanation: Dampening penalizes repeated flaps and may suppress unstable routes.
Q9. What is a risk of aggressive dampening?
• A. Delay legitimate recovery
• B. Increase MTU
• C. Disable AS_PATH
• D. Make every route Valid
Correct answer: A. Delay legitimate recovery
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 49
Explanation: Overly aggressive dampening may suppress routes after the issue is fixed.
Q10. What does conditional advertisement depend on?
• A. Presence/absence of specified routes
• B. Hostname
• C. TCP source port
• D. NTP stratum
Correct answer: A. Presence/absence of specified routes
Explanation: Conditional advertisement uses route conditions to control advertisement.
Module N – BGP Troubleshooting
A systematic workflow separates transport/session problems from route advertisement, policy, best-path, RIB and forwarding
problems.
Learning objectives
• Interpret summary and FSM states.
• Troubleshoot TCP/179 and neighbour configuration.
• Diagnose missing routes, withdrawals and policy issues.
• Check next-hop reachability and best-path selection.
• Separate BGP table, RIB and forwarding outcomes.
• Use debug and packet capture safely.
1. Layered workflow
• Check neighbour state and record exact FSM state.
• Verify peer address, source interface/address and IP reachability.
• Check TCP/179, ACL/firewall and authentication.
• Verify local ASN, remote-as, update-source and eBGP multihop.
• Inspect neighbour detail, notifications and counters.
• Check route origination, UPDATE/withdrawal and address-family activation.
• Inspect inbound/outbound policy and received/advertised routes.
• Check next-hop reachability and best-path selection.
• Check BGP table, RIB installation and forwarding separately.
• After correction, measure convergence and retain evidence.
2. Key commands
show ip bgp summary
show ip bgp neighbors
show ip bgp <prefix>
show ip route <prefix>
show ip route <peer-address>
show tcp brief
show logging
show ip prefix-list
show route-map
received-routes may require inbound soft-reconfiguration and platform support. Command availability and address-family
syntax vary.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 50
3. FSM symptom guide
State / symptom
Checks
Idle
Administrative shutdown, configuration, resource or policy conditions; inspect
logs/config.
Connect
TCP attempt in progress; verify reachability and TCP/179.
Active
TCP connection retries; not Established. Check routing, ACLs, source
address and peer listener.
OpenSent
TCP connected and OPEN sent; inspect ASN, capabilities and OPEN
validation.
OpenConfirm
Waiting for KEEPALIVE/protocol progress; inspect timers, capture and
notifications.
Established but no prefixes
Check origination, address family, filters, route maps, refresh and peer
advertisement.
4. Missing route investigation
• Confirm source route exists in originating router RIB.
• For Cisco IOS network statements, confirm exact prefix/mask.
• Check redistribution and route-map/prefix-list policy.
• Inspect advertised routes at sender and accepted routes at receiver.
• Check AS_PATH loop prevention and next-hop reachability.
• Inspect best path and RIB installation.
• Verify forwarding entry and actual traffic.
5. UPDATE, withdrawal and capture
An UPDATE can advertise reachable prefixes and/or withdraw previously advertised prefixes. Determine whether the source
withdrew the route, policy filtered it, the session reset or best-path/RIB selection changed.
Wireshark: tcp.port == 179
Linux:
ping <peer-address>
traceroute <peer-address>
nc -vz <peer-address> 179
ICMP failure alone does not prove BGP is unreachable because ICMP may be filtered. Debug commands can be
CPU-intensive; use cautiously, preferably in a lab or controlled window.
6. Root-cause report
Field
Record
Issue / symptom
What failed and when
Topology / software
Router IDs, ASNs, interfaces, image/version
Expected behaviour
What should have happened
Actual behaviour
Observed FSM, route and forwarding state
Evidence
CLI, logs, packet capture and timestamps
Root cause
Confirmed cause, not symptom
Correction
Configuration/operational change
Regression
Tests repeated and results
Impact / recovery
Route loss, packet loss and convergence
Senior QA scenarios
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 51
ID
Test
Expected result
N-01
Block TCP/179
Session cannot establish; transport issue
diagnosed.
N-02
Wrong remote-AS
OPEN validation fails; notification/log inspected.
N-03
Shutdown peering interface
Session tears down and routes withdraw.
N-04
Restore connectivity
Session and routes recover.
N-05
Established but filter all prefixes
Session up; route table reflects policy.
N-06
Withdraw advertised prefix
Withdrawal propagates.
N-07
Unreachable next hop
Route unusable/not installed as expected.
N-08
Wrong update-source/multihop
Session failure diagnosed.
N-09
Authentication mismatch
Establishment fails.
N-10
Controlled Hold expiry
Teardown/log/capture align.
N-11
Compare BGP table and RIB
Installation discrepancy explained.
N-12
Check forwarding plane
Forwarding matches installed route.
Interview questions
• What does Active mean?
• First check when peer stuck Connect/Active?
• Can session be Established with no routes?
• How troubleshoot missing prefix?
• Withdrawal versus filtered route?
• Why check next-hop reachability?
• BGP table vs RIB vs FIB?
• Why can ping failure be inconclusive?
• When use Wireshark?
• Why use debug cautiously?
• How test recovery?
• What belongs in a root-cause report?
Student Knowledge Assessment – Module N (reconstructed)
Q1. Which command gives a quick overview of BGP peer state?
• A. show ip bgp summary
• B. show vlan
• C. show arp
• D. show clock
Correct answer: A. show ip bgp summary
Explanation: The summary displays neighbour states and prefix counts.
Q2. What does BGP Active state indicate?
• A. Session fully operational
• B. Router attempting/retrying TCP establishment
• C. Route is best
• D. Peer administratively up
Correct answer: B. Router attempting/retrying TCP establishment
Explanation: Active is a TCP establishment/retry state, not Established.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 52
Q3. What is a first transport check for Connect/Active?
• A. TCP/179 reachability
• B. DNS MX
• C. NTP stratum
• D. VLAN name
Correct answer: A. TCP/179 reachability
Explanation: Check IP reachability and TCP port 179.
Q4. Can a BGP session be Established with zero prefixes received?
• A. No
• B. Yes
• C. Only OSPF
• D. Only route reflectors
Correct answer: B. Yes
Explanation: Session can be Established while origination or policy prevents route exchange.
Q5. What does an UPDATE carry?
• A. Only timers
• B. Route advertisements and/or withdrawals
• C. Only TCP ACKs
• D. Only router IDs
Correct answer: B. Route advertisements and/or withdrawals
Explanation: UPDATE advertises reachable prefixes and can withdraw routes.
Q6. What should be checked when a prefix is missing?
• A. Origination, policy, next hop and best path
• B. Only hostname
• C. Only interface description
• D. Only NTP
Correct answer: A. Origination, policy, next hop and best path
Explanation: Check the complete advertisement and selection path.
Q7. Does ping failure prove TCP/179 unavailable?
• A. Yes
• B. No
• C. Only eBGP
• D. Only iBGP
Correct answer: B. No
Explanation: ICMP may be filtered; test TCP and inspect routing/firewall evidence.
Q8. What does next-hop reachability affect?
• A. Whether a path can be usable/installed
• B. Only hostname
• C. Only TCP port
• D. Only community display
Correct answer: A. Whether a path can be usable/installed
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 53
Explanation: An unreachable next hop can prevent route usability or RIB installation.
Q9. Why distinguish BGP table, RIB and FIB?
• A. Different stages of selection and forwarding
• B. They are identical
• C. Only IPv6
• D. Only MED
Correct answer: A. Different stages of selection and forwarding
Explanation: A route can be in BGP but not installed in RIB/FIB.
Q10. Why use debug cautiously?
• A. It can consume CPU/resources and generate large output
• B. It changes ASN
• C. It encrypts traffic
• D. It disables route maps
Correct answer: A. It can consume CPU/resources and generate large output
Explanation: Debugging can affect router performance.
Module O – BGP Security
BGP security uses layered controls to reduce prefix hijacking, route leaks, unauthorized peer access, excessive
advertisements and control-plane attacks.
Learning objectives
• Explain prefix hijacking and route leaks.
• Implement prefix filtering and maximum-prefix protection.
• Explain RPKI, ROA and ROV.
• Differentiate Valid, Invalid and NotFound.
• Understand TCP MD5, TCP-AO and GTSM.
• Apply control-plane protection and security QA.
1. Threat landscape
Threat
Description
Prefix hijacking
An AS originates a prefix it is not authorized to originate.
Route leak
Routing information propagated beyond intended scope or contrary to policy.
Unauthorized peering
Unexpected system attempts a BGP session.
Session disruption
Attempt to interrupt BGP session.
Bogon advertisements
Invalid/reserved/unacceptable prefixes advertised.
Excessive advertisements
Peer sends unexpectedly large route count.
Control-plane attack
Traffic targets router control-plane resources.
2. Hijacking versus route leak
Feature
Prefix hijacking
Route leak
Main issue
Unauthorized prefix origin
Improper route propagation
Typical cause
Incorrect/malicious origination
Incorrect export policy
AS_PATH
May show unauthorized origin
May show otherwise legitimate origin
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 54
Feature
Prefix hijacking
Route leak
Protection
RPKI/ROV and prefix filters
Import/export policy and leak prevention
A more-specific unauthorized prefix can attract traffic otherwise destined for a covering prefix, if accepted and installed.
3. Prefix filtering
ip prefix-list CUSTOMER-OUT seq 10 permit 203.0.113.0/24
ip prefix-list CUSTOMER-OUT seq 20 permit 198.51.100.0/24
router bgp 65001
neighbor 11.1.1.2 prefix-list CUSTOMER-OUT out
!
ip prefix-list ALLOW-PREFIXES seq 10 permit 203.0.113.0/24 le 28
Inbound filters control accepted routes; outbound filters control advertised routes. Entries are evaluated in order, with implicit
deny when no entry matches.
4. Maximum-prefix
router bgp 65001
neighbor 11.1.1.2 maximum-prefix 1000
Warning thresholds and actions vary by platform. Test below, at and above threshold, then verify logs, session behaviour and
recovery.
5. RPKI, ROA and ROV
A ROA authorizes an origin AS to originate a prefix and may specify maximum permitted prefix length. A validator retrieves and
validates signed RPKI data; routing policy uses the resulting origin-validation state.
ROV state
Meaning
Valid
Covering ROA exists; origin AS and prefix length authorized.
Invalid
Covering ROA exists, but origin AS mismatches or prefix length exceeds
maxLength.
NotFound
No covering ROA exists.
ROV is a validation signal, not an automatic reject. Routing policy determines whether Invalid routes are rejected, accepted
with lower preference or otherwise handled.
6. TCP authentication and GTSM
router bgp 65001
neighbor 11.1.1.2 password BGP-SECURE-KEY
TCP MD5 is specified in RFC 2385 and commonly used for BGP peer authentication. TCP-AO (RFC 5925) is newer; support
varies.
router bgp 65001
neighbor 11.1.1.2 ttl-security hops 1
GTSM (RFC 5082) uses TTL/Hop Limit checks to protect suitable sessions, especially directly connected peers. It does not
replace authentication, prefix filtering or other controls.
7. Control-plane protection
• Restrict TCP/179 to authorized peer addresses.
• Protect management access and credentials.
• Apply inbound/outbound prefix filters.
• Set maximum-prefix limits based on expected route volumes.
• Use RPKI/ROV and define policy for each state.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 55
• Use peer authentication and GTSM where appropriate.
• Apply control-plane policing or platform equivalent.
• Monitor route counts, session changes, logs and anomalies.
• Maintain secure backups, software updates and policy reviews.
8. EVE-NG security lab plan
• Prefix filtering: advertise permitted/prohibited routes and verify acceptance/export.
• Maximum-prefix: set a low lab threshold, exceed it and inspect logs/session action.
• Authentication: establish with matching keys, then test controlled mismatch.
• RPKI: if validator and router integration are available, test all three states.
• GTSM: configure compatible directly connected peers and verify TTL enforcement.
• Route-leak prevention: apply export policies and verify prohibited propagation.
Senior QA scenarios
ID
Test
Expected result
O-01
Authorized prefix
Accepted.
O-02
Unauthorized prefix
Rejected by filter.
O-03
More-specific beyond allowed length
Rejected.
O-04
Outbound filtering
Only authorized routes advertised.
O-05
Exceed maximum-prefix
Configured threshold action occurs.
O-06
Matching TCP MD5 keys
Peer can establish subject to other checks.
O-07
Mismatched keys
Authentication fails.
O-08
RPKI Valid route
Validation reports Valid.
O-09
RPKI Invalid route
Validation reports Invalid.
O-10
No covering ROA
NotFound.
O-11
Policy for Invalid route
Outcome matches policy.
O-12
GTSM direct peer
Valid traffic meets TTL checks.
O-13
Unauthorized TCP/179
Access restricted.
O-14
Prohibited export
Route not advertised.
O-15
Excessive updates
Monitoring/protection behave as designed.
O-16
Restart after policy correction
Session/routes recover.
O-17
Route-leak prevention
Prohibited propagation blocked.
O-18
Security event logging
Relevant events recorded.
Interview questions
• What is prefix hijacking?
• What is a route leak?
• What is RPKI?
• What does a ROA specify?
• Explain Valid/Invalid/NotFound.
• Does RPKI automatically reject Invalid routes?
• How does maximum-prefix work?
• What is TCP MD5?
• What is TCP-AO?
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 56
• What is GTSM?
• Why use inbound and outbound filters?
• How test route-leak prevention?
• AS-path versus prefix filtering?
• How investigate suspected hijack?
• What is defence in depth?
Student Knowledge Assessment – Module O – Security (approved
assessment)
Q1. Which RFC defines BGP-4?
• A. RFC 1918
• B. RFC 4271
• C. RFC 2385
• D. RFC 5082
Correct answer: B. RFC 4271
Explanation: RFC 4271 defines BGP-4.
Q2. What is prefix hijacking?
• A. Unauthorized origination of a prefix
• B. Normal aggregation
• C. Timer negotiation
• D. Route reflection
Correct answer: A. Unauthorized origination of a prefix
Explanation: An AS originates a prefix it is not authorized to originate.
Q3. What is a route leak?
• A. TCP failure
• B. Improper propagation of routing information
• C. Missing ROA
• D. Keepalive
Correct answer: B. Improper propagation of routing information
Explanation: Routes are propagated contrary to intended routing policy or scope.
Q4. What does a ROA specify?
• A. BGP timers
• B. Authorized prefix and origin AS, optionally maxLength
• C. Interface speed
• D. TCP port
Correct answer: B. Authorized prefix and origin AS, optionally maxLength
Explanation: A ROA authorizes an origin AS and may specify maximum prefix length.
Q5. A route matches covering ROA origin and permitted length. State?
• A. Invalid
• B. NotFound
• C. Valid
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 57
• D. Unknown
Correct answer: C. Valid
Explanation: Both origin and prefix length are authorized.
Q6. A covering ROA exists but origin AS is wrong. State?
• A. Valid
• B. Invalid
• C. NotFound
• D. Established
Correct answer: B. Invalid
Explanation: The origin AS does not match authorization.
Q7. No covering ROA exists. State?
• A. Invalid
• B. Valid
• C. NotFound
• D. Rejected
Correct answer: C. NotFound
Explanation: NotFound means no covering ROA is available.
Q8. Does Invalid automatically mean router rejects route?
• A. Yes, always
• B. No, routing policy decides
• C. Only iBGP
• D. Only MED zero
Correct answer: B. No, routing policy decides
Explanation: ROV supplies state; policy determines action.
Q9. Purpose of maximum-prefix?
• A. Limit route count from neighbour
• B. Increase TCP window
• C. Set AS_PATH length
• D. Change router ID
Correct answer: A. Limit route count from neighbour
Explanation: It protects against unexpectedly large received route counts.
Q10. Which RFC defines TCP MD5 for BGP peer authentication?
• A. RFC 4271
• B. RFC 2385
• C. RFC 8092
• D. RFC 4360
Correct answer: B. RFC 2385
Explanation: TCP MD5 is specified in RFC 2385.
Q11. Which RFC defines GTSM?
• A. RFC 5082
• B. RFC 1997
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 58
• C. RFC 5925
• D. RFC 8092
Correct answer: A. RFC 5082
Explanation: RFC 5082 specifies GTSM.
Q12. Which control determines prefixes advertised to a neighbour?
• A. Inbound prefix filter
• B. Outbound prefix filter
• C. Hold timer
• D. Route distinguisher
Correct answer: B. Outbound prefix filter
Explanation: Outbound filtering controls advertised routes.
Q13. Purpose of TCP-AO?
• A. Route aggregation
• B. TCP connection authentication
• C. Route reflection
• D. Prefix origination
Correct answer: B. TCP connection authentication
Explanation: TCP-AO provides TCP authentication and is defined in RFC 5925.
Q14. Which mechanism uses TTL checks?
• A. RPKI
• B. GTSM
• C. ROA
• D. LOCAL_PREF
Correct answer: B. GTSM
Explanation: GTSM checks packet TTL or Hop Limit.
Q15. Best BGP security approach?
• A. Only RPKI
• B. Only MD5
• C. Multiple complementary controls
• D. Disable all advertisements
Correct answer: C. Multiple complementary controls
Explanation: Defence in depth combines filtering, validation, authentication, limits, control-plane protection and monitoring.
Appendix A – Advanced BGP CLI Quick Reference
Task
Illustrative command
BGP summary
show ip bgp summary
Inspect prefix paths
show ip bgp <prefix>
Inspect neighbour
show ip bgp neighbors <peer>
Advertised routes
show ip bgp neighbors <peer> advertised-routes
Routing table
show ip route <prefix>
Prefix lists
show ip prefix-list
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 59
Task
Illustrative command
Route maps
show route-map
BGP configuration
show running-config | section router bgp
Logs
show logging
TCP sessions
show tcp brief
Appendix B – QA Evidence Record
Field
Record
Test ID / title
Date / tester
Topology / router image / version
Preconditions / baseline
Configuration under test
Test steps
Expected result
Actual result
CLI / packet capture / log evidence
Pass / Fail / Blocked
Defect / root cause
Retest / regression result
Appendix C – Technical Accuracy Notes
• CLI examples are illustrative Cisco IOS/IOS-XE; syntax, defaults, support and output vary by platform/release.
• Cisco IOS network statements generally require exact matching route and mask in the local routing table.
• Route selection, MED scope, multipath eligibility, dampening and conditional advertisement vary by
implementation/configuration.
• Graceful Restart does not guarantee uninterrupted forwarding; verify forwarding continuity and stale-route handling.
• BFD detection depends on negotiated intervals, multiplier and implementation scheduling.
• RPKI states are Valid, Invalid and NotFound; routing policy determines action.
• TCP MD5: RFC 2385; TCP-AO: RFC 5925; GTSM: RFC 5082; standard communities: RFC 1997; extended communities:
RFC 4360; Large Communities: RFC 8092.
• Ping failure alone does not prove TCP/179 unavailable. Verify TCP, routing, ACLs and packet evidence.
• Established does not prove routes are received, selected, installed or forwarding.
• Illustrative configurations and QA expectations are not actual EVE-NG test evidence.
Part 2 Completion Record
Module
Topic
Status
I
BGP Route Advertisement
Approved
J
BGP Routing Policies
Approved
K
BGP Timers and Stability
Approved
L
BGP Route Reflectors
Approved
M
Advanced BGP Features
Approved
N
BGP Troubleshooting
Approved
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 60
Module
Topic
Status
O
BGP Security
Approved
Part 2 completes the Advanced BGP Theory learning sequence for SP Networking Academy. Next learning stages can include
practical EVE-NG validation, BGP interview preparation and Netmiko-based regression automation.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 61
PART 3 – BGP INTERVIEW QUESTIONS & ANSWERS
Source: SP_Networking_Academy_BGP_Part3_Interview_QA_v1.0(1).docx
SP NETWORKING ACADEMY
BGP INTERVIEW
QUESTIONS & ANSWERS
PART 3 – MASTER DOCUMENTATION
50 interview questions | Five sections | Senior Network QA focus
Version 1.0 | Draft for technical review | 13 November 2026
Document Control
Document
SP Networking Academy – BGP Interview Questions & Answers
Part
Part 3 of five-part BGP Master Documentation
Version
1.0
Status
Draft for review and approval
Coverage
Q1–Q50, Sections A–E
Audience
Network Engineers and Senior Network QA Engineers
How to Use This Document
Use these questions for interview preparation and technical revision. Answers combine protocol concepts, practical examples,
Cisco IOS-style commands and Senior QA considerations. Syntax is illustrative; validate exact command support on the target
platform and software release.
Contents
• Section A – BGP Fundamentals (Q1–Q10)
• Section B – Path Attributes & Best Path Selection (Q11–Q20)
• Section C – Configuration & Routing Policies (Q21–Q30)
• Section D – Advanced BGP (Q31–Q40)
• Section E – Troubleshooting & Senior Network QA (Q41–Q50)
SECTION A – BGP FUNDAMENTALS
Q1. What is BGP, and what is its primary purpose?
BGP (Border Gateway Protocol) is a standardized Exterior Gateway Protocol used to exchange reachability information
between Autonomous Systems. BGP-4 is a path-vector protocol that selects routes using policy and path attributes, not simply
physical distance. It supports inter-domain routing, route policy, traffic engineering and loop prevention through AS_PATH.
Example: AS65001 advertises 203.0.113.0/24 to AS65002. Senior QA: verify session, advertisements, withdrawals,
AS_PATH, best path, RIB and forwarding.
Q2. Which transport protocol does BGP use, and why?
BGP uses TCP destination port 179. TCP provides reliable, sequenced delivery, retransmission and flow control. TCP
establishes before BGP OPEN exchange. Source port is normally ephemeral. Check `nc -vz <peer> 179`, `show tcp brief`,
`show ip bgp summary`. QA: test TCP reachability, ACL/firewall behaviour and recovery. Ping success alone does not prove
TCP 179 is reachable.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 62
Q3. What is an Autonomous System?
An AS is a collection of networks and routers administered under a common routing policy and identified by an ASN.
Private-use ASN ranges include 64512–65534 and 4200000000–4294967294. Example: `router bgp 65001`. QA: validate
local/remote AS, private/public ASN handling, four-octet ASN compatibility and AS_PATH. An ASN is not the BGP Router ID.
Q4. What are the differences between eBGP and iBGP?
eBGP peers belong to different ASes; iBGP peers belong to the same AS. Cisco defaults commonly use AD 20 for eBGP and
200 for iBGP. eBGP normally prepends local AS and changes NEXT_HOP; iBGP normally preserves AS_PATH and
NEXT_HOP. iBGP split horizon prevents a route learned from one iBGP peer being advertised to another. Scale with full mesh,
RR or confederations. QA: verify session type, path attributes, next hop and route propagation.
Q5. What are the four BGP message types?
OPEN establishes parameters and capabilities; KEEPALIVE maintains the session; UPDATE advertises routes/attributes and
withdraws routes; NOTIFICATION reports protocol errors and normally terminates the session. Wireshark filter `bgp`; types are
OPEN 1, UPDATE 2, NOTIFICATION 3, KEEPALIVE 4. QA: inspect capability negotiation, timers, advertisements,
withdrawals and notification codes.
Q6. What are the BGP FSM states?
Idle, Connect, Active, OpenSent, OpenConfirm and Established. Active means BGP is retrying TCP connection establishment,
not that the session is established. Established permits UPDATE exchange. Verify with `show ip bgp summary` and `show ip
bgp neighbors`. QA: inject wrong peer, wrong AS, blocked TCP 179, authentication mismatch and link failure; verify transitions
and recovery.
Q7. Difference between BGP RIB and IP routing table?
BGP RIB stores BGP paths and attributes. IP RIB contains routes selected for installation from connected, static and routing
protocols. A BGP path may not install due to unreachable next hop, competing route or ineligibility. FIB/CEF drives forwarding.
Commands: `show ip bgp`, `show ip route <prefix>`, `show ip cef <prefix>`. QA must distinguish received, selected, installed
and forwarded.
Q8. What is BGP best-path selection?
A simplified Cisco sequence is highest Weight (Cisco-specific), highest LOCAL_PREF, locally originated, shortest AS_PATH,
lowest ORIGIN (IGP, EGP, Incomplete), lowest MED when comparison applies, eBGP over iBGP, lowest IGP metric to next
hop, then further tie-breakers. Exact order varies by platform/release/configuration. Earlier attributes can outweigh shorter
AS_PATH. QA: change one attribute at a time and verify BGP/RIB/FIB.
Q9. What does BGP Active state mean?
Active means BGP is attempting TCP connection establishment. Causes include wrong peer IP, missing route, blocked TCP
179, wrong update-source, eBGP multihop TTL, authentication mismatch, remote peer not configured or interface failure.
Check `show ip bgp summary`, `show ip route <peer>`, ping, traceroute, `show access-lists`, `show tcp brief`; Linux `nc -vz
<peer> 179`. Ping is not sufficient proof.
Q10. Can two BGP processes run on one physical router?
It depends on platform and routing-instance architecture. A conventional global BGP process generally uses one local AS in its
routing context; platforms may support separate instances through VRFs, virtual routers or logical systems. A VRF can have its
own routing table and BGP address-family configuration. Validate platform support, isolation, route leaking and independent
session behaviour.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 63
SECTION B – PATH ATTRIBUTES & BEST PATH SELECTION
Q11. What are BGP Path Attributes?
Path attributes accompany routes and support loop prevention, selection and policy. Categories: well-known mandatory
(ORIGIN, AS_PATH, NEXT_HOP), well-known discretionary (LOCAL_PREF), optional transitive (COMMUNITY), optional
non-transitive (MED). Other important attributes include Weight (Cisco-specific). QA: verify receipt, modification, propagation
and best-path impact.
Q12. Difference between Weight and LOCAL_PREF?
Weight is Cisco proprietary, local to one router and not advertised; higher is preferred. LOCAL_PREF is well-known
discretionary, distributed within the AS through iBGP and normally not sent to eBGP; higher is preferred. Use Weight for
router-specific preference and LOCAL_PREF for AS-wide outbound exit choice. QA: confirm LOCAL_PREF propagation and
Weight locality.
Q13. What is AS_PATH and how does it prevent loops?
AS_PATH records the AS sequence traversed. eBGP normally prepends the advertising AS. A router normally rejects a route
containing its own AS, preventing inter-AS loops. AS_PATH length can influence selection. Prepending influences remote
preference; allowas-in and as-override modify normal loop-prevention behaviour and require care. QA: test loop rejection and
these features.
Q14. What is the ORIGIN attribute?
ORIGIN indicates how a route entered BGP: IGP, EGP or Incomplete. Traditional preference is IGP over EGP over Incomplete.
Cisco IOS network-statement routes are normally marked `i`; redistributed routes commonly show `?`. QA: verify origin values
and selection when earlier criteria tie.
Q15. What is MED?
MED (Multi-Exit Discriminator) suggests to a neighbouring AS which entry point to prefer. Lower is preferred when comparison
applies; by default it is commonly compared among paths from the same neighbouring AS. `bgp always-compare-med` can
change behaviour. MED is a suggestion, not a guarantee. QA: test advertisement, comparison scope and path recalculation.
Q16. What is NEXT_HOP?
NEXT_HOP identifies the next-hop IP for a prefix. eBGP normally changes it to the advertising router's peering address; iBGP
normally preserves it. An unreachable next hop can prevent route installation. `neighbor <peer> next-hop-self` changes next
hop to the local router for eligible routes. Verify BGP, route to next hop and RIB.
Q17. What are BGP Communities?
Communities tag routes for policy. Standard communities are 32-bit (RFC1997), Extended 64-bit (RFC4360), Large 96-bit
(RFC8092). Well-known values include NO_EXPORT, NO_ADVERTISE, NO_EXPORT_SUBCONFED and NOPEER. Use
`set community ... additive` and `send-community` where supported. A tag requires policy/peer action; it is not automatically a
filter.
Q18. What is AS_PATH prepending?
Prepending adds repeated local ASN values to an advertised AS_PATH, making a route appear longer and potentially less
attractive to remote networks. It can influence inbound traffic but cannot guarantee it because remote LOCAL_PREF and
policies may dominate. QA: verify intended neighbour, repetition count, remote path and recovery.
Q19. What is BGP Multipath?
Multipath permits multiple eligible paths for the same prefix to be installed in routing/forwarding tables. Cisco examples include
`maximum-paths 2`; iBGP syntax/support varies. Eligibility rules are platform-specific. QA: verify paths, load-sharing, next-hop
failure and recovery. It does not install every path unconditionally.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 64
Q20. Difference between LOCAL_PREF, MED and AS_PATH?
LOCAL_PREF influences outbound exit selection inside an AS (higher preferred); MED suggests a neighbouring AS's entry
point (lower preferred when compared); AS_PATH records AS sequence, prevents loops and may influence selection (shorter
generally preferred when earlier criteria tie). Remote policy controls remote decisions.
SECTION C – CONFIGURATION & ROUTING POLICIES
Q21. How do you configure eBGP?
Configure local BGP AS and reciprocal neighbour statements. R1: `router bgp 65001`; `neighbor 11.1.1.2 remote-as 65002`.
R2 uses AS65002 and remote-as 65001. Ensure IP reachability and TCP 179. Verify `show ip bgp summary`, neighbour and
TCP. QA: correct AS, session, routes and recovery.
Q22. How do you configure iBGP?
Configure both routers with the same AS, e.g. `router bgp 65001` and `neighbor 13.1.1.2 remote-as 65001`. For loopback
peering use `update-source Loopback0` and ensure underlay reachability. iBGP preserves AS_PATH and normally
NEXT_HOP; split horizon applies. QA: peer AS, update-source, reachability, propagation.
Q23. Network statement vs redistribution?
Cisco IOS `network` originates a prefix only when an exact matching prefix and mask exist in local RIB; it does not create the
route. Redistribution injects eligible routes from another protocol and can introduce many prefixes. Control redistribution with
route maps/filters. QA: exact match, source route, filtering and withdrawal.
Q24. What is a prefix list?
A prefix list filters network prefixes and lengths using sequence numbers, permit/deny, `ge` and `le`. Example: `ip prefix-list
CUSTOMER permit 10.10.0.0/16 le 24`. Entries process in sequence order; unmatched prefixes are implicitly denied. QA:
exact match, length boundaries, ordering and direction.
Q25. Route map vs prefix list?
A prefix list matches prefixes/lengths. A route map supports ordered permit/deny sequences, match conditions and set actions
such as LOCAL_PREF, MED, communities and AS_PATH prepend. First matching sequence determines result; unmatched
routes are denied unless a matching permit applies. QA: sequence, match, set and implicit behaviour.
Q26. Inbound vs outbound filtering?
Inbound `in` controls routes received from a peer; outbound `out` controls routes advertised to it. Inbound may reject prefixes
or set LOCAL_PREF; outbound may limit advertisements or set MED/community/prepend. Verify advertised routes and
received routes where platform/configuration supports it.
Q27. What is BGP Route Refresh?
Route Refresh lets a router request that a peer resend routes without tearing down the session, useful after inbound policy
changes. `clear ip bgp <peer> soft in` is a common soft-refresh command where supported. Soft-reconfiguration inbound
stores pre-policy routes and consumes memory. QA: refresh, policy reevaluation and session stability.
Q28. How do you prevent route leaks?
Use explicit inbound/outbound prefix filters, route maps, AS_PATH filters, maximum-prefix, communities and defined
customer/provider policies. Prefer explicit permitted prefixes with deny for others where appropriate. NO_EXPORT adds scope
control but does not replace precise filtering. Test unauthorized advertisements.
Q29. What is maximum-prefix?
Maximum-prefix limits prefixes accepted from a neighbour, protecting against unexpected route growth. Illustrative syntax:
`neighbor 11.1.1.2 maximum-prefix 1000 80`; warning and teardown behaviour vary. QA: threshold, limit, logging, session
action and recovery. It does not replace prefix filtering.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 65
Q30. How do you troubleshoot a routing policy?
Confirm session, inspect received routes, verify prefix-list address/mask/ge/le, route-map order/match/set, inbound/outbound
application, advertised routes, best path, RIB and forwarding. Use soft refresh when appropriate. Document requirement,
configuration, input, expected/actual, root cause, fix and regression.
SECTION D – ADVANCED BGP
Q31. What is a Route Reflector?
A Route Reflector reduces iBGP full mesh by reflecting eligible routes. Full mesh sessions = n(n−1)/2; 10 routers need 45.
Client-learned routes reflect to other clients/non-clients; non-client-learned routes reflect to clients. Originator ID and Cluster
List prevent loops. RR usually reflects selected best path, creating possible path hiding. QA: reflection rules and redundancy.
Q32. What is a Confederation?
A confederation divides a large AS into smaller sub-ASes. iBGP operates within sub-ASes and confederation eBGP between
them; externally the confederation presents one identifier. It differs from RR, which reflects routes rather than dividing the AS.
QA: identifiers, sub-AS propagation, AS_CONFED_PATH and external visibility.
Q33. What is route aggregation?
Aggregation summarizes more-specific prefixes. Four contiguous /24s 192.168.0.0–192.168.3.0 can summarize to
192.168.0.0/22. Cisco example `aggregate-address 192.168.0.0 255.255.252.0`; `summary-only` suppresses components;
`as-set` can retain contributing AS information. QA: component presence, summary, withdrawals and blackholing.
Q34. What is Graceful Restart?
Graceful Restart aims to preserve eligible forwarding routes while BGP control plane restarts. A helper may retain previously
learned paths as stale during restart, subject to negotiated capability, timers and forwarding continuity. It does not guarantee
uninterrupted forwarding. QA: capability, restart, stale routes, refresh, stale cleanup and expiry.
Q35. What is BFD and how does it help BGP?
BFD detects forwarding-path failure quickly and can notify BGP, often faster than Hold Timer expiry. A simplified detection
estimate is negotiated interval times detection multiplier; scheduling and platform affect actual time. QA: session, failure
detection, BGP reaction, packet loss, recovery and scale.
Q36. What is conditional advertisement?
Conditional advertisement sends or suppresses specified routes depending on presence/absence of other routes. Cisco
constructs include advertise-map, exist-map and non-exist-map. Use cases include conditional backup advertisement. Exact
syntax and address-family support vary. QA: condition changes, advertisement, withdrawal and recovery.
Q37. What is route dampening?
Dampening assigns penalties to flapping routes; penalties decay over time. Above suppress threshold the route may be
suppressed; below reuse threshold it can be reused. Half-life controls decay and maximum suppress time limits suppression.
Aggressive settings can delay recovery. QA: penalty, suppression, decay and reuse.
Q38. What is RPKI?
RPKI supports validation that an AS is authorized to originate a prefix using ROAs containing prefix, origin ASN and optional
maxLength. ROV states: Valid, Invalid and NotFound. Invalid means a relevant ROA exists but origin or length violates it;
NotFound means no relevant covering ROA. ROV validates origin, not full AS_PATH; policy decides action.
Q39. What is Add-Path?
Add-Path allows multiple paths for the same prefix to be advertised, reducing Route Reflector path hiding where only the
selected best path would otherwise be reflected. Capability negotiation is required; path identifiers distinguish paths. Extra
paths consume resources. QA: negotiation, multiple paths, withdrawal and retention.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 66
Q40. Full Mesh vs RR vs Confederation?
Full mesh requires n(n−1)/2 sessions. RR reduces sessions through reflection. Confederation divides an AS into sub-ASes
while presenting one external identity. Compare scalability, complexity, path visibility, loop prevention and recovery. QA:
propagation, best-path visibility, redundancy and convergence.
SECTION E – TROUBLESHOOTING & SENIOR NETWORK QA
Q41. BGP neighbour stuck in Active: how troubleshoot?
Active means TCP establishment is being retried. Check peer IP, remote AS, interface, route to peer, TCP179, ACL/firewall,
update-source, multihop TTL and authentication. Use `show ip bgp summary`, neighbour, route, interface, ACL, TCP
commands and Linux `nc -vz`. Capture packets if needed. Ping does not prove TCP reachability.
Q42. Established but no routes received: why?
Established confirms session only. Peer may originate no routes; network statement may lack exact RIB match; outbound
policy may deny; address family may not be activated; aggregation may suppress routes. Inspect sender advertised routes and
receiver BGP table; verify source RIB and policies. Test permit/deny and recovery.
Q43. BGP route present but missing from IP RIB: troubleshoot?
Check best-path marker, NEXT_HOP reachability, competing route/administrative distance and installation eligibility. Compare
BGP RIB, IP RIB and FIB/CEF. Commands: `show ip bgp <prefix>`, `show ip route <next-hop>`, `show ip route <prefix>`,
`show ip cef <prefix>`. Separate receipt, selection, installation and forwarding.
Q44. What is route flapping and how troubleshoot?
Repeated advertisement/withdrawal or session transitions can result from physical instability, packet loss, TCP resets,
unstable underlay, BFD, timers or remote instability. Inspect interface counters, logs, reset reasons, TCP and BFD events.
Measure flap count, withdrawals, convergence, loss and stability. Fix root cause before dampening.
Q45. Incorrect AS in OPEN: what happens?
The receiver compares peer AS information with configured remote AS. A mismatch can produce OPEN error/NOTIFICATION
and terminate session, even though TCP succeeded. Inspect logs and packet capture. Four-octet ASN capability may use
AS_TRANS (23456) in legacy 16-bit field. Test correct/wrong AS and recovery.
Q46. How troubleshoot asymmetric routing?
Forward and return paths can differ due to LOCAL_PREF, AS_PATH, MED, remote policy or ECMP. Asymmetry is not
automatically a fault but can affect stateful firewalls/NAT. Trace both directions, inspect BGP and forwarding, test firewall
session and application behaviour.
Q47. How analyse BGP with Wireshark?
Capture TCP179 and filter `bgp`. Message filters: `bgp.type == 1` OPEN, 2 UPDATE, 3 NOTIFICATION, 4 KEEPALIVE.
Inspect TCP handshake, OPEN/capabilities, keepalives, UPDATE attributes/prefixes/withdrawals, NOTIFICATION
code/subcode and TCP teardown. Save timestamps and peer details as evidence.
Q48. How validate convergence and failover?
Establish primary/backup, run traffic, record baseline, inject controlled failure, measure detection, withdrawal, best-path
change, RIB/FIB update and data-plane recovery; restore link and verify policy. Measure detection, BGP convergence, packet
loss, application recovery and stability. Define thresholds from requirement/SLA, not assumed universal values.
Q49. How design a BGP test plan for Senior QA?
Cover functional, protocol, routing, policy, attributes, scale, performance, stability, security, interoperability and recovery.
Include negative tests: wrong AS/peer, TCP blocked, auth mismatch, prefix filtering, next-hop failure, max-prefix, BFD and
withdrawals. Record ID, requirement, topology, preconditions, steps, expected/actual, pass/fail, logs, captures and defect.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 67
Q50. Four routers have intermittent route loss: how investigate?
Identify prefix and scope; determine whether route is not advertised, rejected, not selected, not installed or not forwarded.
Check sessions, attributes, policies, interfaces, logs, TCP/BFD and UPDATE/NOTIFICATION captures. Inject controlled link,
ACL, policy and next-hop faults. Measure convergence. Report reproducible steps, evidence, root cause, fix and regression.
Example: unreachable next hop leaves prefix in BGP but absent from IP RIB.
Final Interview Preparation Checklist
I Explain BGP path-vector operation, TCP 179 and AS relationships.
I Explain message types, FSM states, path attributes and best-path selection.
I Configure and troubleshoot eBGP/iBGP neighbours and route origination.
I Apply prefix lists, route maps, inbound/outbound policies and maximum-prefix.
I Explain Route Reflectors, Confederations, aggregation, GR, BFD, Add-Path and RPKI.
I Trace routes through BGP RIB, IP RIB and FIB.
I Use CLI and packet captures to isolate control-plane and data-plane failures.
I Design positive, negative, scale, stability, convergence and regression tests.
Technical Accuracy and Platform Notes
• Administrative distance values such as eBGP 20 and iBGP 200 are Cisco defaults, not BGP protocol attributes.
• Best-path ordering and tie-breakers vary by vendor, platform, release, address family and configuration. The sequence
described is a simplified Cisco-oriented explanation.
• MED comparison scope, route refresh, received-routes visibility, BFD, Graceful Restart, Add-Path and conditional
advertisement syntax vary by platform and release.
• RPKI Origin Validation validates prefix-origin authorization, not the complete AS_PATH. Policy determines treatment of Valid,
Invalid and NotFound.
• Graceful Restart does not guarantee uninterrupted forwarding. BFD timing depends on negotiated parameters and
implementation scheduling.
• Use debug commands cautiously on production devices; prefer controlled lab testing and targeted packet captures.
Student Assessment Appendix – Publication Note
Five interactive 10-question assessments (one per section) were delivered alongside the learning content in the conversation.
This Part 3 master document consolidates the 50 interview questions and answers. The exact quiz wording, options, correct
answers and explanations should be appended as a separately reviewed assessment appendix before final publication. This
avoids silently reconstructing assessment wording.
Approval and Release Record
Item
Status
Notes
Q1–Q50 content
Draft assembled
Five sections included
Technical review
Pending
Verify platform-specific syntax and technical
nuances
Assessment appendix
Pending
Attach approved quiz banks and explanations
Website integration
Pending
Begin after Part 3 review and approval
Final five-part merge
Deferred
Only after Parts 1–5 are completed and approved
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 68
PART 4 – EVE-NG BGP LAB PRACTICE & AUTOMATED
VALIDATION
Source: SP_Networking_Academy_BGP_Part4_Lab_Practice_v1.0(1).docx
SP NETWORKING ACADEMY
BGP AUTOMATION
PART 4
EVE-NG BGP LAB PRACTICE & AUTOMATED VALIDATION
BGP-001 to BGP-010 | Four-router, two-AS lab | Regression evidence
Document Version: 1.0
Status: Initial lab-validation release
Execution evidence date: 13 November 2026
Document Control
Field
Value
Document
SP Networking Academy – BGP Automation, Part 4
Scope
EVE-NG BGP lab practice and automated validation for BGP-001 through
BGP-010
Version
1.0
Evidence baseline
BGP regression execution on 13-Nov-2026
Lab
Four routers: R1, R2, R3 and R4
AS allocation
AS 65001: R1/R3; AS 65002: R2/R4
Execution outcome
10 tests executed; 10 passed; 0 failed; 0 errors; 0 skipped
Approval
Pending user technical review
Purpose and Scope
This document records the four-router EVE-NG BGP lab design, the BGP-001 to BGP-010 validation cases, the observed
regression results, and the operational controls used during testing. The Python regression runner orchestrates the existing
test scripts sequentially and captures individual and suite-level timing.
• Validate router identity, BGP process configuration, neighbor establishment, route propagation and best-path selection.
• Inspect BGP path attributes and verify selected next-hop reachability.
• Exercise controlled link failure/recovery, route withdrawal/re-advertisement and inbound prefix-list filtering.
• Preserve a timestamped report for each individual test and one consolidated regression report.
Scope boundary This is Part 4 – EVE-NG BGP Lab Practice and validation evidence. The separate Part 5 remains the dedicated Netmiko/Python
automation development and engineering guide; this document records the automation-assisted execution already used by the lab.
Contents
• 1. Lab architecture and addressing
• 2. BGP design and expected routing behaviour
• 3. Lab preparation and safety controls
• 4. BGP-001 to BGP-010 test catalogue
• 5. Regression runner and execution procedure
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 69
• 6. Verified regression execution results
• 7. Observations, limitations and follow-up actions
• 8. Evidence and reporting standard
• 9. Completion and approval record
1. Lab Architecture and Addressing
The lab uses four routers in a diamond-shaped topology. R1–R2 and R3–R4 are eBGP links between AS 65001 and AS
65002. R1–R3 and R2–R4 are iBGP links within their respective ASes. An out-of-band (OOB) Ubuntu host provides SSH
management access independently of the BGP data plane.
Router
AS
Router ID
OOB management IP
Loopback test prefix
R1
65001
1.1.1.1
10.0.31.1
172.16.1.1/32
R2
65002
2.2.2.2
10.0.32.1
172.16.2.2/32
R3
65001
3.3.3.3
10.0.33.1
172.16.3.3/32
R4
65002
4.4.4.4
10.0.34.1
172.16.4.4/32
1.1 Inter-router links
Link
Router A interface / IP
Router B interface / IP
BGP relationship
R1–R2
R1 Fa0/0 – 11.1.1.1/30
R2 Fa0/0 – 11.1.1.2/30
eBGP
R1–R3
R1 Fa1/0 – 13.1.1.1/30
R3 Fa0/0 – 13.1.1.2/30
iBGP
R2–R4
R2 Fa1/0 – 12.1.1.1/30
R4 Fa0/0 – 12.1.1.2/30
iBGP
R3–R4
R3 Fa2/0 – 14.1.1.1/30
R4 Fa1/0 – 14.1.1.2/30
eBGP
1.2 Out-of-band management network
Router
Router OOB IP
Ubuntu OOB IP
EVE/Ubuntu interface mapping
R1
10.0.31.1/24
10.0.31.10/24
EVE e1 / Ubuntu ens4
R2
10.0.32.1/24
10.0.32.10/24
EVE e2 / Ubuntu ens5
R3
10.0.33.1/24
10.0.33.10/24
EVE e3 / Ubuntu ens6
R4
10.0.34.1/24
10.0.34.10/24
EVE e4 / Ubuntu ens7
The Ubuntu e0/ens3 interface connects to the EVE-NG management/cloud network. Its DHCP address may change; confirm
the current address and default route before relying on external access. Confirm actual interface names against the deployed
EVE-NG node templates before applying configurations.
Management-plane principle The OOB network is intentionally kept separate from the BGP routing links so that SSH/Netmiko access can remain
available during routing-protocol failure tests.
2. BGP Design and Expected Routing Behaviour
Router
BGP local AS
Expected neighbors
R1
65001
11.1.1.2 (AS 65002), 13.1.1.2 (AS 65001)
R2
65002
11.1.1.1 (AS 65001), 12.1.1.2 (AS 65002)
R3
65001
13.1.1.1 (AS 65001), 14.1.1.2 (AS 65002)
R4
65002
12.1.1.1 (AS 65002), 14.1.1.1 (AS 65001)
The intended design has two BGP neighbors per router and eight locally observed neighbor relationships across the four
routers (each of the four adjacencies is represented at both ends). The test logs report eight established sessions/neighbor
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 70
observations in BGP-003.
2.1 Test prefixes
Each router originates its own /32 loopback prefix using a BGP network statement, subject to the exact platform configuration
and the route being present in the local routing table.
R1 172.16.1.1/32 R2 172.16.2.2/32
R3 172.16.3.3/32 R4 172.16.4.4/32
2.2 Path and next-hop behaviour observed
• The regression run observed multiple BGP paths for selected prefixes on several routers.
• The best-path outputs commonly preferred the directly received eBGP path over an alternate iBGP path in the captured
baseline.
• Some alternate iBGP paths displayed an inaccessible next-hop in BGP-005/BGP-006. The tests still passed because their
current assertions verified prefix presence and best-path identification; this observation is recorded for follow-up rather than
treated as proof that every alternate path is usable.
• BGP-007 separately verified reachability of the selected best next-hop for 12 route checks, with zero failures.
Important Do not interpret a BGP path marked valid as proof that its NEXT_HOP is resolvable or that it is installed in the IP routing table. Check
next-hop reachability and the routing table independently.
3. Lab Preparation and Safety Controls
• Confirm EVE-NG nodes R1–R4 are powered on and their interfaces match the documented mapping.
• Confirm the Ubuntu OOB interfaces and router management IP reachability.
• Confirm SSH authentication works to all four routers before starting the suite.
• Capture and retain a baseline running configuration for all routers.
• Confirm the BGP neighbor relationships are stable and the four test /32 prefixes are present.
• Keep the OSPF baseline/configuration backup separate. Do not overwrite the original OSPF lab baseline.
• Run disruptive tests only in the isolated lab. BGP-008 shuts down/restores R1 FastEthernet0/0; BGP-009 withdraws/restores
R2's network statement; BGP-010 applies/removes an inbound prefix-list on R1.
• Do not run against production routers. Confirm cleanup and route restoration after any interrupted run.
4. BGP-001 to BGP-010 Test Catalogue
ID
Test case
Type
Core validation
Observed result
BGP-001
Router identity and AS
verification
Read-only
SSH to all routers; verify
hostname, local AS and BGP
router ID.
All four routers pass;
expected AS/IDs match.
BGP-002
BGP process configuration
verification
Read-only
Verify BGP process, local AS,
router ID, network statements
and two neighbor remote-AS
entries per router.
All four routers pass;
expected process and
neighbor configuration
present.
BGP-003
Neighbor establishment
verification
Read-only
Check each router's two
neighbors, session state,
peer AS and received prefix
count; detect unexpected
neighbors.
8/8 neighbor observations
established; 4/4 routers pass.
BGP-004
Route advertisement
verification
Read-only
Verify local prefix, three
remote prefixes, installation in
IP routing table and absence
of unexpected BGP prefixes.
12/12 remote prefixes
verified; 4/4 routers pass.
BGP-005
Best-path selection
verification
Read-only
Inspect three remote prefixes
per router, available paths
and selected best path.
12/12 prefixes and best paths
identified; multiple paths
observed on 8 prefix checks.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 71
ID
Test case
Type
Core validation
Observed result
BGP-006
BGP path attribute
verification
Read-only
Collect AS_PATH,
NEXT_HOP, LOCAL_PREF,
MED, ORIGIN, path type,
validity and best-path
indicators.
12/12 prefixes; 20 path
records; four inaccessible
alternate next-hops observed;
script status PASS.
BGP-007
Next-hop reachability
verification
Read-only
For three remote prefixes per
router, identify selected best
next-hop and verify
reachability.
12 checks passed; 0 failed;
4/4 routers pass.
BGP-008
Failure and recovery
Disruptive / cleanup
Shut R1 Fa0/0; detect R1–R2
neighbor down; verify
alternate route; restore
interface; verify neighbor and
prefix recovery.
9/9 checks passed; alternate
path retained; neighbor and
prefix recovered.
BGP-009
Route advertisement and
withdrawal
Disruptive / cleanup
Withdraw R2's 172.16.2.2/32
network statement; verify
withdrawal on all routers;
restore and verify
re-advertisement.
20 checks passed;
withdrawal and recovery
verified on all four routers.
BGP-010
Prefix-list route filtering and
validation
Policy change / cleanup
Apply inbound deny for
172.16.2.2/32 on R1 from R2;
verify filtering; remove policy;
verify route recovery.
8/8 checks passed; test
prefix-list and neighbor
attachment removed.
4.1 Test-specific operational notes
BGP-008 – Failure and recovery
• Target interface: R1 FastEthernet0/0; neighbor: 11.1.1.2; test prefix: 172.16.2.2.
• The run observed the neighbor transition down, the alternate route via 13.1.1.2 remaining available, restoration of
FastEthernet0/0, and neighbor/prefix recovery.
BGP-009 – Route withdrawal and re-advertisement
• Origin router: R2; origin AS: 65002; test prefix: 172.16.2.2/32.
• The test removes and restores the BGP network statement. It does not delete the loopback interface or its underlying route.
BGP-010 – Prefix-list filtering
• Filtering router: R1; neighbor: 11.1.1.2; prefix-list: BGP010-FILTER.
ip prefix-list BGP010-FILTER seq 5 deny 172.16.2.2/32
ip prefix-list BGP010-FILTER seq 10 permit 0.0.0.0/0 le 32
router bgp 65001
neighbor 11.1.1.2 prefix-list BGP010-FILTER in
• The test removes the neighbor attachment and the test prefix-list definition, then confirms the prefix is received again.
5. Regression Runner and Execution Procedure
The regression runner is located in the BGP project root and executes the ten existing test scripts sequentially. It streams each
test's terminal output, records individual start/end timestamps and duration, captures exit codes and statuses, then writes a
consolidated report.
Project: /home/user/network-automation/BGP
Runner : run_bgp_regression.py
Tests : /home/user/network-automation/BGP/tests/
Reports: /home/user/network-automation/BGP/REPORTS/
5.1 Execution commands
cd /home/user/network-automation/BGP
python3 -m py_compile run_bgp_regression.py
python3 run_bgp_regression.py
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 72
5.2 Runner behaviour
• Runs BGP-001 through BGP-010 in the configured order.
• Records test start time, end time, duration and process exit code.
• Streams stdout/stderr to the terminal while collecting output.
• Uses an explicit FINAL STATUS in a test's output when present; otherwise uses the process return code.
• Records missing scripts as SKIPPED and execution exceptions as ERROR.
• Returns exit code 0 only when all ten tests pass with no failures, errors or skipped cases.
• Creates one timestamped suite report under REPORTS/; each individual test also creates its own report.
Execution caution The runner is sequential, not transactional. If a disruptive test is interrupted, inspect the router configuration and route state
before rerunning. Do not assume cleanup ran after a forced process termination.
6. Verified Regression Execution Results
The attached consolidated execution report records the complete BGP-001 to BGP-010 run performed on 13 November 2026.
All ten scripts completed successfully.
Test
Result
Duration
BGP-001
PASS
24.77 sec
BGP-002
PASS
15.01 sec
BGP-003
PASS
9.49 sec
BGP-004
PASS
25.22 sec
BGP-005
PASS
14.58 sec
BGP-006
PASS
13.41 sec
BGP-007
PASS
20.42 sec
BGP-008
PASS
36.82 sec
BGP-009
PASS
53.06 sec
BGP-010
PASS
17.09 sec
Suite metric
Verified value
Suite start
2026-11-13 17:08:19
Suite end
2026-11-13 17:12:09
Total elapsed duration
3 min 49.88 sec
Total test cases
10
Executed / Passed
10 / 10
Failed / Errors / Skipped
0 / 0 / 0
Final regression status
PASS
Consolidated report: BGP-REGRESSION-20261113_170819.txt
Recorded lab path: /home/user/network-automation/BGP/REPORTS/
Verified milestone BGP-001 through BGP-010 completed in one regression execution. The suite finished in 3 minutes 49.88 seconds with 10/10
tests passed and no failed, errored or skipped tests.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 73
7. Observations, Limitations and Follow-up Actions
7.1 Observations from the captured run
• BGP-006 records four inaccessible next-hop observations on alternate paths (two on R2 and two on R4). The corresponding
script still reports PASS because its current validation collects and reports attributes rather than failing on every inaccessible
non-best path.
• BGP-005 also displays some alternate paths with an inaccessible next-hop. The selected best paths were identified and
BGP-007 verified the selected next-hop reachability for all 12 checks.
• One BGP-006 log heading labels R3 with management IP 10.0.31.1, while the configured OOB plan and BGP-003/BGP-007
evidence identify R3 as 10.0.33.1. Treat this as a likely test-log metadata/configuration defect to review; it did not cause the
regression run to fail.
• The test output uses platform-specific Cisco-style IOS commands and formatting. Command syntax and output parsing must
be adapted if the lab router image/platform changes.
7.2 Recommended follow-up
• Review the inaccessible alternate next-hops on R2 and R4 and decide whether the lab design should make those paths
resolvable (for example, by correcting next-hop handling or internal reachability).
• Correct the R3 management-IP label in BGP-006 and validate the script's router-to-management-IP mapping.
• Consider adding explicit assertions for alternate-path next-hop accessibility, separate from best-path next-hop checks.
• Verify cleanup after BGP-008, BGP-009 and BGP-010 even when the test exits unexpectedly; consider a cleanup/finally
safeguard and a post-suite baseline check.
• Retain the individual test reports and consolidated suite report as regression evidence for future changes.
Interpretation The 10/10 PASS result is the test suite's recorded outcome for its current assertions. The observations above are quality findings
for follow-up and are not silently reclassified as test failures.
8. Evidence and Reporting Standard
Evidence item
Expected content
Individual test report
Test ID, execution timestamp, router/peer under test, checks, PASS/FAIL,
errors and report path.
Regression report
Suite start/end, each test's start/end/duration, status, exit code, totals and
final status.
Configuration baseline
Router running configuration before the suite and after disruptive tests.
Failure evidence
Relevant CLI output, neighbor state, route table, BGP table, interface state
and recovery proof.
Change/cleanup evidence
Temporary configuration applied, exact removal commands and post-cleanup
verification.
9. Completion and Approval Record
Milestone
Status
Evidence / notes
Four-router BGP topology and addressing
documented
Documented
Based on the agreed lab plan.
BGP-001 to BGP-010 test catalogue
Documented
Mapped to the scripts used in the regression run.
Regression runner v1.0
Executed successfully
Sequential execution with per-test and suite timing.
Complete regression run
PASS
10/10 passed; 0 failed; 0 errors; 0 skipped.
Technical review of observations
Pending
Review alternate next-hop observations and R3 log
IP label.
Website integration
Pending
To be performed after document review and
source-code handoff.
SP NETWORKING ACADEMY | BGP MASTER DOCUMENTATION
Page 74
Prepared for: SP Networking Academy BGP Learning Project
User approval: Pending
Next phase: Continue with Part 4 review and website integration; proceed to the next lab/test cases only after approval.
Appendix A – Regression Report Reference
BGP-REGRESSION-20261113_170819.txt
Suite start : 2026-11-13 17:08:19
Suite end : 2026-11-13 17:12:09
Duration : 3 min 49.88 sec
Result : PASS (10/10)
Source of execution metrics: the user-provided consolidated regression report. This document summarizes the report and does
not replace the raw text evidence file.