← Back to Part 2 Modules
PART 2 · ADVANCED BGP THEORY · MODULE O

Module O – BGP Security

Lesson content presented from the approved Part 2 master documentation.

BGP security uses layered controls to reduce prefix hijacking, route leaks, unauthorized peer access, excessive advertisements and control-plane attacks.

Learning objectives

1. Threat landscape

ThreatDescription
Prefix hijackingAn AS originates a prefix it is not authorized to originate.
Route leakRouting information propagated beyond intended scope or contrary to policy.
Unauthorized peeringUnexpected system attempts a BGP session.
Session disruptionAttempt to interrupt BGP session.
Bogon advertisementsInvalid/reserved/unacceptable prefixes advertised.
Excessive advertisementsPeer sends unexpectedly large route count.
Control-plane attackTraffic targets router control-plane resources.

2. Hijacking versus route leak

FeaturePrefix hijackingRoute leak
Main issueUnauthorized prefix originImproper route propagation
Typical causeIncorrect/malicious originationIncorrect export policy
AS_PATHMay show unauthorized originMay show otherwise legitimate origin
ProtectionRPKI/ROV and prefix filtersImport/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 stateMeaning
ValidCovering ROA exists; origin AS and prefix length authorized.
InvalidCovering ROA exists, but origin AS mismatches or prefix length exceeds maxLength.
NotFoundNo 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

8. EVE-NG security lab plan

  1. Prefix filtering: advertise permitted/prohibited routes and verify acceptance/export.
  2. Maximum-prefix: set a low lab threshold, exceed it and inspect logs/session action.
  3. Authentication: establish with matching keys, then test controlled mismatch.
  4. RPKI: if validator and router integration are available, test all three states.
  5. GTSM: configure compatible directly connected peers and verify TTL enforcement.
  6. Route-leak prevention: apply export policies and verify prohibited propagation.

Senior QA scenarios

IDTestExpected result
O-01Authorized prefixAccepted.
O-02Unauthorized prefixRejected by filter.
O-03More-specific beyond allowed lengthRejected.
O-04Outbound filteringOnly authorized routes advertised.
O-05Exceed maximum-prefixConfigured threshold action occurs.
O-06Matching TCP MD5 keysPeer can establish subject to other checks.
O-07Mismatched keysAuthentication fails.
O-08RPKI Valid routeValidation reports Valid.
O-09RPKI Invalid routeValidation reports Invalid.
O-10No covering ROANotFound.
O-11Policy for Invalid routeOutcome matches policy.
O-12GTSM direct peerValid traffic meets TTL checks.
O-13Unauthorized TCP/179Access restricted.
O-14Prohibited exportRoute not advertised.
O-15Excessive updatesMonitoring/protection behave as designed.
O-16Restart after policy correctionSession/routes recover.
O-17Route-leak preventionProhibited propagation blocked.
O-18Security event loggingRelevant events recorded.

Interview questions

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

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

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.

Source and assessment note

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