BGP does not use its own transport protocol; instead, it relies entirely on a long-lived TCP connection over port 179. While this design makes BGP reliable, it introduces a critical security vulnerability: TCP session hijacking.

Figure 1 – One eBGP session, one long-lived TCP connection
The TCP Hijacking Vulnerability
Launch the lab below to jump into hands-on practice! Execute the required configurations directly in the terminal, complete each task, and claim your flag.
Because a BGP TCP session often stays open for months or years, an attacker capable of sniffing traffic or spoofing IP addresses can inject a malicious TCP
RST(Reset) packet.Upon receiving the spoofed reset, the router assumes the neighbor initiated a teardown, immediately killing the BGP session and dropping all associated routes.
To mitigate this attack, BGP leverages BGP leverages TCP MD5 Authentication (RFC 2385).
Answer the question below
Enter the flag:
How BGP MD5 Authentication Works
When authentication is enabled on a BGP peering:
The Mechanism: Every TCP segment carries an MD5 hash digest computed from a shared secret password combined with the TCP/IP header fields.
Silent Drop: The receiving router recalculates the hash. If the signature is missing or invalid, the packet is silently dropped at the TCP layer before BGP ever processes it.
Zero Wire Exposure: The actual secret password is never transmitted across the wire.
Let's configure this in a lab to analyze the exact error messages and behaviors when things break.
Answer the question below
Click on Complete to continue
Here is your topology: R1 in AS 65001 connected to R2 in AS 65002.

Figure 2 – The lab topology: R1 in AS 65001, R2 in AS 65002
Step 1 – Configure Router Interfaces
Start by configuring the interfaces on R1: the link to R2 on
g0/0, and the local LAN ong0/1.R1# conf t Enter configuration commands, one per line. End with CNTL/Z. R1(config)# int g0/0 R1(config-if)# ip address 10.0.12.1 255.255.255.252 R1(config-if)# no shut R1(config-if)# exit R1(config)# int g0/1 R1(config-if)# ip address 192.168.1.1 255.255.255.0 R1(config-if)# no shut R1(config-if)# endDo the same on R2 with its respective IP addresses:
R2# conf t Enter configuration commands, one per line. End with CNTL/Z. R2(config)# int g0/0 R2(config-if)# ip address 10.0.12.2 255.255.255.252 R2(config-if)# no shut R2(config-if)# exit R2(config)# int g0/1 R2(config-if)# ip address 192.168.2.1 255.255.255.0 R2(config-if)# no shut R2(config-if)# endStep 2 – Establish the eBGP Peering
Next, bring up the eBGP session using the address-family model.
Configure one neighbor and advertise one prefix on each side:R1# conf t Enter configuration commands, one per line. End with CNTL/Z. R1(config)# router bgp 65001 R1(config-router)# no bgp default ipv4-unicast R1(config-router)# neighbor 10.0.12.2 remote-as 65002 R1(config-router)# address-family ipv4 R1(config-router-af)# neighbor 10.0.12.2 activate R1(config-router-af)# network 192.168.1.0 mask 255.255.255.0 R1(config-router-af)# endR2# conf t Enter configuration commands, one per line. End with CNTL/Z. R2(config)# router bgp 65002 R2(config-router)# no bgp default ipv4-unicast R2(config-router)# neighbor 10.0.12.1 remote-as 65001 R2(config-router)# address-family ipv4 R2(config-router-af)# neighbor 10.0.12.1 activate %BGP-5-ADJCHANGE: neighbor 10.0.12.1 Up R2(config-router-af)# network 192.168.2.0 mask 255.255.255.0 R2(config-router-af)# endThe neighbor
Uplog appears: the session is up.Step 3 – Verify Baseline Session State
Before enabling authentication, verify your baseline state to ensure the peering is healthy and prefixes are exchanged:
R1# show bgp ipv4 unicast summary BGP router identifier 192.168.1.1, local AS number 65001 BGP table version is 3, main routing table version 3 <output omitted> Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.0.12.2 4 65002 5 5 3 0 0 00:00:10 1The output confirms the session has been
Establishedfor 10 seconds and R1 is receiving 1 prefix from R2.40 % Complete: you’re making great progress
Ready to pass your CCNP exam?