eBGP Multihop: Evolution, Behavior, and Practical Design
When you need to exchange routes with an external BGP peer that isn’t directly connected, eBGP Multihop becomes essential. While the concept is simple, its behavior has evolved significantly—especially in terms of safety, predictability, and operational clarity.
For background on BGP: Border Gateway Protocol (Wikipedia)
๐ Table of Contents
- The Core Problem
- How eBGP Multihop Works
- Earlier Implementations
- Modern Behavior
- Math Behind TTL
- Configuration Example
- CLI Output
- Design Best Practices
- Conclusion
The Core Problem
By default, eBGP assumes neighbors are directly connected. This is enforced using a TTL (Time To Live) of 1.
If the peer is more than one hop away:
- The packet TTL expires
- The session fails to establish
How eBGP Multihop Works
eBGP Multihop modifies TTL behavior, allowing communication across multiple hops.
Key Capabilities
- Custom TTL value
- Loopback-based peering
- Non-direct adjacency support
๐ Expand: Why Loopbacks Matter
Loopbacks provide stability because they are not tied to a physical interface. If one link fails, routing can still reach the loopback via another path.
Earlier Implementations
Older implementations were functional but lacked safeguards.
Characteristics
- Static TTL behavior
- High default TTL values
- Minimal validation
Risks
- Unexpected route paths
- Accidental ISP crossover peering
- Difficult troubleshooting
⚠️ Expand: Real Risk Scenario
If a primary link fails, traffic may reroute via another ISP. Without strict TTL limits, BGP sessions may re-establish unintentionally over that path.
Modern Implementations
Modern behavior is significantly more structured and predictable.
Improvements
- TTL aligned with actual topology
- Better recursion checks
- Improved debugging visibility
Mathematics Behind TTL
TTL decreases by 1 at each hop:
\[ TTL_{final} = TTL_{initial} - hops \]
For a session to succeed:
\[ TTL_{initial} > hops \]
Example
\[ TTL = 5,\quad hops = 3 \]
\[ TTL_{final} = 5 - 3 = 2 \quad (\text{valid}) \]
Failure Case
\[ TTL = 2,\quad hops = 3 \]
\[ TTL_{final} = -1 \quad (\text{packet dropped}) \]
๐ Expand: Why TTL Matters for Security
TTL prevents remote attackers from forming BGP sessions. If TTL is too high, unintended peers can connect from far away.
Configuration Example
router bgp 65001 neighbor 10.1.1.1 remote-as 65002 neighbor 10.1.1.1 ebgp-multihop 5 neighbor 10.1.1.1 update-source Loopback0
CLI Output Example
BGP neighbor is 10.1.1.1, remote AS 65002
BGP state = Established
Last read 00:00:10, hold time 180
Neighbor capabilities:
Route refresh: advertised and received
Message statistics:
InQ depth is 0
OutQ depth is 0
Design Best Practices
- Use specific TTL values
- Prefer loopbacks
- Apply prefix filtering
- Control failure domains
๐ Expand: Failure Domain Thinking
Always design assuming partial failure. Ask:
- What happens if one ISP fails?
- Will sessions re-establish incorrectly?
- eBGP Multihop solves non-direct peering
- TTL is both functional and security control
- Modern implementations reduce risk
- Design discipline is still essential
Conclusion
eBGP Multihop has evolved from a flexible workaround into a robust and reliable tool. Its effectiveness today depends less on configuration and more on design discipline.
Used correctly, it enables resilient architectures. Used carelessly, it introduces subtle and hard-to-detect risks.
The difference lies in understanding—not just configuring—the network.
No comments:
Post a Comment