The idea
Everything up to this point — distance vector, link state, RIP, OSPF — assumes one administrator who controls the whole network and just wants the best path. The moment routing has to cross from one organisation’s network into another’s, that assumption breaks. Each AS has its own business reasons for preferring one route over another, and no protocol can just optimise for speed and ignore who owns which network.
How it works
BGP overview and functions
BGP — the Border Gateway Protocol — is the de facto inter-domain routing protocol, described in the lecture as “the glue that holds the Internet together.” It lets a subnet advertise its own existence, and the destinations it can reach, to the rest of the Internet: “I am here, here is who I can reach, and how.”
BGP gives each AS a means to:
- eBGP — obtain subnet reachability information from neighbouring ASes.
- iBGP — propagate that reachability information to all AS-internal routers.
- Determine “good” routes to other networks, based on both reachability information and policy.
How it works
eBGP and iBGP connections
The lecture illustrates this with a topology of three autonomous systems (AS1, AS2, AS3), each with its own set of routers, connected by eBGP links between ASes and logical iBGP connectivity inside each AS. The gateway routers — the ones sitting on an AS boundary — run both eBGP and iBGP simultaneously: eBGP to talk to the neighbouring AS, iBGP to distribute whatever it learns to the rest of its own AS.
Aside
The full diagram of this three-AS topology — the exact router labels and which specific routers connect to which — did not survive extraction from the slides. The relationship described above (gateway routers run both protocols; eBGP crosses AS boundaries, iBGP stays inside one) is what the surrounding text states plainly and is not affected by the missing diagram.
How it works
BGP session
A BGP session is two BGP routers — “peers” — exchanging BGP messages over a semi-permanent TCP connection, advertising paths to different destination network prefixes.
How it works
Path advertisement example
When AS3’s gateway router 3a advertises path AS3, X to AS2’s gateway
router 2c, AS3 is promising AS2 that it will forward datagrams towards
X. This reflects a peering agreement AS3 has with AS2 — the advertisement
is a commitment to actually carry the traffic, not just a topology
announcement.
How it works
Path attributes and BGP routes
A BGP advertised route carries a prefix — the destination being advertised — plus two important attributes:
- AS-PATH — the list of ASes the prefix advertisement has passed through.
- NEXT-HOP — the specific internal-AS router to use as the next hop toward the next AS.
Policy-based routing. A gateway receiving a route advertisement uses its own AS’s import policy to decide whether to accept or decline the path — for example, a rule like “never route through AS Y.” The AS’s policy also determines whether it re-advertises that path onward to its own neighbouring ASes.
Where marks get lost
AS-PATH is not a hop count
AS-PATH lists whole autonomous systems, not individual routers. Do not treat it as a distance vector hop count — the number that matters for BGP route selection, covered on the next topic, is the length of this AS list, not the number of routers or physical links a datagram actually crosses.
How it works
BGP messages
Four message types are exchanged between BGP peers over their TCP connection:
- OPEN — opens the TCP connection to a remote BGP peer and authenticates the sending peer.
- UPDATE — advertises a new path, or withdraws an old one.
- KEEPALIVE — keeps the connection alive in the absence of UPDATE messages; also acknowledges an OPEN request.
- NOTIFICATION — reports errors in a previous message; also used to close the connection.
How it works
Why different intra-AS and inter-AS routing?
Policy. Inter-AS: an administrator wants control over how its own traffic is routed, and over who routes through its network. Intra-AS: a single administrator controls everything, so policy is far less of an issue.
Scale. Hierarchical routing — separating intra-AS from inter-AS — saves routing table size and reduces update traffic, compared to one flat routing system for the whole Internet.
Performance. Intra-AS routing can focus purely on performance. Inter-AS routing cannot — policy dominates over performance, meaning an administrator’s routing preference can override what would otherwise be the fastest path.
Check yourself
- BGP’s three functions: eBGP (learn from neighbouring ASes), iBGP (propagate internally), route determination (reachability + policy).
- Gateway routers run both eBGP and iBGP.
- A BGP advertisement is a forwarding commitment, not just an announcement.
- AS-PATH and NEXT-HOP are the two key path attributes; four message types are OPEN, UPDATE, KEEPALIVE, NOTIFICATION.
- Intra-AS vs inter-AS differ on policy (single admin vs many), scale (hierarchy saves table size), and performance (policy can override it inter-AS, but not intra-AS).
In the exam
- Name all three BGP functions, correctly split between eBGP and iBGP — mixing up which one propagates internally versus which one talks to neighbours is the most common error here.
- State that a BGP advertisement is a promise to forward traffic, using the lecture’s own phrasing if asked to explain the path advertisement example.
- Give both path attributes by name and function: AS-PATH (list of ASes traversed) and NEXT-HOP (internal router to use).
- List all four BGP message types, each with its specific purpose — a question can ask which message does what.
- Give all three reasons intra-AS and inter-AS routing differ: policy, scale, performance. This is a direct list question the lecture poses as its own heading.