Configure and verify eBGP between directly connected neighbors (best path selection, neighbor relationships)

3.2 Layer 3

📘CCNP Encore (350-401-ENCORE-v1.1)


1. What is BGP?

BGP (Border Gateway Protocol) is a routing protocol used to exchange routing information between different organizations or networks that are controlled by different administrators.

  • BGP is called a path-vector routing protocol
  • It focuses on policy and control, not fastest speed
  • It is widely used on the Internet and large enterprise networks

2. What is eBGP?

eBGP (External BGP) is BGP used between different Autonomous Systems (AS).

Autonomous System (AS)

  • An AS is a group of routers managed by one organization
  • Each AS has a unique AS number (ASN)

Key Point

  • eBGP = BGP between different AS numbers
  • iBGP = BGP within the same AS

📌 Exam Rule
If AS numbers are different → eBGP


3. eBGP Between Directly Connected Neighbors

In this topic, we focus on directly connected eBGP neighbors, meaning:

  • Two routers
  • Connected with a direct link
  • Each router belongs to a different AS
  • Default TTL = 1 (important exam point)

4. Basic eBGP Neighbor Relationship

For eBGP to work, both routers must agree on:

  1. Neighbor IP address
  2. Remote AS number
  3. Network connectivity between them
  4. TCP port 179

If any of these fail, BGP will not form


5. BGP Neighbor States (Very Important for Exam)

BGP uses a state machine to form neighbor relationships.

Common BGP States

  1. Idle – BGP is not active
  2. Connect – TCP connection started
  3. Active – Trying to establish connection
  4. OpenSent – OPEN message sent
  5. OpenConfirm – OPEN accepted
  6. Established – Routes are exchanged ✅

📌 Exam Tip
Only in Established state does BGP exchange routes.


6. Configuring eBGP (Directly Connected)

Step 1: Enable BGP and Define Local AS

router bgp 65001

Step 2: Define the Neighbor and Remote AS

neighbor 192.0.2.2 remote-as 65002
  • 192.0.2.2 → Neighbor IP address
  • 65002 → Neighbor’s AS number

Step 3: Advertise Networks

network 10.10.10.0 mask 255.255.255.0

📌 Important Rule
The network must already exist in the routing table, or BGP will not advertise it.


7. Verifying eBGP Neighbor Relationship

Check Neighbor Status

show ip bgp summary

Key fields to look for:

  • Neighbor IP
  • AS number
  • State = Established
  • Prefixes received

Check Detailed Neighbor Info

show ip bgp neighbors

This shows:

  • Timers
  • Capabilities
  • Received routes
  • Session state

8. BGP Best Path Selection (Very Important Exam Topic)

When BGP learns multiple paths to the same destination, it selects one best path.

BGP does NOT use bandwidth or hop count.


9. BGP Best Path Selection Order (Exam-Relevant)

BGP compares attributes in a specific order.

Simplified Best Path Selection (Must Memorize)

  1. Highest Weight (Cisco only, local to router)
  2. Highest Local Preference
  3. Locally originated routes
  4. Shortest AS Path
  5. Lowest Origin type
    • IGP < EGP < Incomplete
  6. Lowest MED
  7. eBGP preferred over iBGP
  8. Lowest IGP cost to next hop
  9. Oldest route
  10. Lowest Router ID

📌 Exam Tip
Weight and Local Preference are checked before AS Path.


10. Important BGP Attributes (Exam Must-Know)

1. Weight

  • Cisco proprietary
  • Highest value wins
  • Local to router only
  • Default = 0

2. Local Preference

  • Used inside an AS
  • Higher is better
  • Default = 100

3. AS Path

  • List of AS numbers the route passed through
  • Shorter path is preferred
  • Prevents routing loops

4. MED (Multi-Exit Discriminator)

  • Lower value is better
  • Suggests preferred entry point into an AS

11. eBGP Specific Behavior (Exam Focus)

TTL Behavior

  • Default TTL = 1
  • Requires direct connection

Next-Hop Rule

  • eBGP sets next-hop to itself
  • iBGP does not

Route Advertisement

  • eBGP advertises routes learned from anywhere
  • iBGP has more restrictions

12. Common eBGP Configuration Issues (Troubleshooting)

Neighbor Stuck in Active

  • IP connectivity problem
  • Wrong AS number
  • ACL blocking TCP 179

No Routes Advertised

  • Network not in routing table
  • Incorrect network mask
  • Route filtered

Session Flapping

  • Interface instability
  • Timer mismatch
  • CPU or memory issues

13. Useful Verification Commands (Exam Friendly)

show ip bgp
show ip bgp summary
show ip bgp neighbors
show ip route bgp

Know what each command shows, not just syntax.


14. Key Exam Points to Remember

✔ eBGP = different AS numbers
✔ Default TTL = 1
✔ Uses TCP port 179
✔ Must reach Established state
✔ Best path selection order is critical
✔ Weight > Local Preference > AS Path
✔ Network must exist before advertising


15. Summary

  • eBGP is used to exchange routes between different organizations or networks
  • Neighbor relationships must be correctly configured on both sides
  • Verification commands are essential for troubleshooting
  • BGP best path selection is policy-based, not speed-based
  • Understanding attributes and order is crucial for passing the exam

Buy Me a Coffee