Switching & routing

eBGP peering and iBGP inside an AS

Two autonomous systems peer with eBGP while each AS distributes the learned prefixes internally with iBGP, and path attributes decide the best path.

AS 65001AS 65002203.0.113.0/30203.0.113.0/30iBGPiBGPiBGPiBGPOPENAS 65001 edge192.0.2.1AS 65001 edge — 192.0.2.1AS 65001 internal192.0.2.2AS 65001 internal — 192.0.2.2AS 65002 edge198.51.100.1AS 65002 edge — 198.51.100.1AS 65002 internal198.51.100.2AS 65002 internal — 198.51.100.2
Legend

Current step

The eBGP session comes up

The two edge routers open a TCP session on port 179, exchange OPEN messages and agree on the parameters.

Transport
TCP
Port
179
Session type
eBGP
eBGP exchanges routes between autonomous systems; iBGP carries them across an AS without changing the AS_PATH, so a full mesh or a route reflector is required to avoid loops.

Documentation example: addresses use the RFC 5737 ranges and ASNs use the reserved private range. Nothing here connects to a real network.

Tags

  • routing
  • bgp
  • ebgp
  • ibgp
  • autonomous-system
  • path-attributes

Lessons using this diagram