You will be able to explain why data is chopped into small pieces at all,
instead of being sent as one long stream, and name the four separate reasons.
You will be able to draw a real packet, layer by layer, with byte counts,
and work out how much of the wire is spent on wrapping rather than content.
You will be able to read every field of an IPv4 header, say what each one is
for, and decode a real header from the reader’s laptop by hand.
You will be able to explain what happens when a packet is too big for a link,
what IPv4 does, what IPv6 refuses to do, and why a filtered ICMP message can
make a connection die in silence.
You will be able to list, in order, the eight things a router does to a
packet, and say which addresses change at every hop and which never change.
You will be able to read a real routing table, apply longest prefix match to
a real address, and explain the reader’s default route through 192.168.0.1.
You will be able to say how routers learn routes, from static lines typed by
hand up to BGP, and explain what convergence is and why it is not instant.
You will be able to explain autonomous systems, transit, peering and internet
exchanges, look up which network owns an address, and read AS8075 correctly.
You will be able to explain why BGP is about money and policy rather than
distance, and describe three real incidents where it went badly wrong.
You will be able to explain why the reader can see twelve hops outward and
still know nothing at all about the way back.
Think about how you would move a house full of furniture across a country.
You would pack it into boxes. Each box has a label with the new address.
The boxes travel separately. Some go on one lorry, some on another.
If one box is dropped, you replace the contents of that box only. The other
boxes are unaffected.
Other people’s boxes ride on the same lorries at the same time. The lorry is
never held for one customer.
This is exactly what packets do, and it is why the postal system is a much
better picture of a network than a pipe is.
A pipe suggests a continuous stream that arrives in order, complete, with
nothing else in it. None of that is true of a network.
Where this comparison breaks: real parcels are almost never lost or
reordered, and the post office never sends two boxes by two different
routes on purpose. A network does all three, routinely, every second.
Suppose two people share one 100 megabit per second link.
Person A wants to send a one gigabyte file. Person B wants to load a web
page of 50 kilobytes.
One gigabyte is 8,000,000,000 bits. At 100 megabits per second that takes
80 seconds to push onto the wire.
If the link carried whole files one at a time, person B would wait 80 seconds
for a page that needs half a second of transfer.
With packets, the link carries a piece from A, then a piece from B, then a
piece from A, and so on. Person B finishes in about a second.
Now the error case. Assume 1 packet in 1,000 is lost.
Sent as packets of 1,448 bytes each, the file is 690,608 packets, and one
lost packet costs 1,448 bytes, which is about 0.116 milliseconds of link
time.
Packet switching was invented twice, independently, in the early 1960s.
Leonard Kleinrock published queueing analysis of message flow in large
communication networks at MIT in 1961, later expanded into his 1962 thesis.
Paul Baran at the RAND Corporation published the eleven-volume report On
Distributed Communications in August 1964, describing what he called
distributed adaptive message block switching, designed to survive damage.
Donald Davies at the National Physical Laboratory in the United Kingdom
reached the same design in 1965 and gave it the name that stuck: packet.
The ARPANET, the first large working packet network, carried its first
message on 29 October 1969 from UCLA to the Stanford Research Institute.
Vint Cerf and Robert Kahn published A Protocol for Packet Network
Intercommunication in IEEE Transactions on Communications in May 1974, which
is the direct ancestor of TCP and IP.
The ARPANET switched from the older NCP to TCP/IP on 1 January 1983, a
single cut-over now remembered as flag day.
Serialization delay is the time to clock a frame onto the wire, and it is
exactly frame bits divided by link rate.
Link rate
1,518 B frame
64 B frame
10 Mbit/s
1,214 us
51.2 us
100 Mbit/s
121.4 us
5.12 us
1 Gbit/s
12.14 us
0.512 us
10 Gbit/s
1.214 us
0.0512 us
Tools: ping -s varies packet size, iperf3 measures throughput, and
tc qdisc on Linux shows the queue behaviour underneath.
Think of a diplomatic pouch being sent between two countries.
Inside the outer canvas sack there is a sealed courier bag.
Inside the envelope there is a single sheet of paper with the message.
The airline handles the sack. It reads the sack’s tag and nothing else.
The courier company handles the bag. It reads the bag’s tag and nothing else.
The embassy opens the case. The ambassador opens the envelope. Only the
ambassador reads the paper.
Where this comparison breaks: in a real network the outer wrapper is thrown
away and rebuilt at every single hop, not carried end to end. The airline
tag is replaced at every airport. That is section 26.5.
Ethernet II framing carries a 6 byte destination MAC, a 6 byte source MAC and
a 2 byte EtherType, followed by payload and a 4 byte frame check sequence.
EtherType 0x0800 means IPv4, 0x86DD means IPv6 and 0x0806 means ARP.
These are assigned by the IEEE Registration Authority.
The standard Ethernet payload maximum is 1,500 bytes, so the standard frame
is 1,518 bytes including the check sequence, and the wire slot is 1,538.
On 802.11 Wi-Fi the picture differs: a data frame header is 24 to 30 bytes
plus an 8 byte LLC/SNAP shim, so the same IP packet costs more.
The reader is on home broadband over a router at 192.168.0.1. If the laptop
is on Wi-Fi, the first hop uses 802.11 framing and only the wired hops beyond
the router use Ethernet framing. The IP packet inside is identical.
TLS 1.3, specified in RFC 8446 from August 2018, adds 5 bytes of record
header, 1 byte of inner content type and a 16 byte AEAD tag per record.
Packet kind
Useful bytes
Frame bytes
Overhead
Pure TCP ack
0
70
100 percent
Small request
512
604
15.2 percent
Full segment
1,426
1,518
6.1 percent
Tools: tcpdump -e -x prints the frame header and the raw bytes; Wireshark
shows the same nesting as a tree you can expand layer by layer.
Picture a customs declaration form stuck to the outside of a parcel.
Line one says which version of the form this is, so the clerk knows the
layout.
Line three says how urgent the parcel is and whether the depot was crowded.
Lines five to seven exist only for parcels that had to be split: a batch
number, a flag saying whether more pieces follow, and where this piece sits.
Line eight is a stamp saying how many more depots this parcel may pass
through before being thrown away.
Line nine says what is inside so the right department gets it.
Where this comparison breaks: a customs form is read once. An IP header is
read, altered and re-stamped at every single depot, and the checksum has to
be recomputed each time.
Here is the IP header of the first packet the reader’s laptop sent towards
github.com, the TCP SYN that opens the connection to port 443.
The laptop’s own address on the home network is not recorded in the session
notes, so we write it as 192.168.0.14. Treat that one number as a
stand-in. Every other value here is exactly what such a packet carries.
The IPv4 header is defined in RFC 791, Internet Protocol, September 1981, and
its layout has not changed since.
Field
Bits
Purpose
Version
4
Always 4
IHL
4
Header length in 32-bit words
DSCP
6
Class-of-service marking
ECN
2
Congestion experienced signal
Total Length
16
Header plus payload, in bytes
Identification
16
Groups fragments of one datagram
Flags
3
Reserved, DF, MF
Fragment Offset
13
Position, in 8-byte units
TTL
8
Hop budget
Protocol
8
Next header type
Header Checksum
16
One’s complement, header only
Source Address
32
Sender IPv4 address
Destination Address
32
Target IPv4 address
Options
0 to 320
Rare, usually absent
IHL is measured in 32 bit words, so the minimum legal value is 5, meaning
20 bytes, and the maximum is 15, meaning 60 bytes.
The 8 bits after version and IHL were originally a Type of Service byte. RFC
2474, December 1998, redefined the top 6 bits as the Differentiated Services
Code Point, and RFC 3168, September 2001, took the bottom 2 for Explicit
Congestion Notification.
Total Length is 16 bits, so an IPv4 datagram cannot exceed 65,535 bytes.
RFC 6864, February 2013, updated the Identification field: it is only
meaningful when a datagram is actually fragmented, and senders that always
set DF may leave it as anything, including zero.
Common Protocol numbers, assigned by IANA: 1 is ICMP, 6 is TCP, 17 is UDP,
41 is IPv6 encapsulation, 47 is GRE, 50 is ESP, 89 is OSPF, 132 is SCTP.
RFC 1812, Requirements for IP Version 4 Routers, June 1995, is the document
that tells a router exactly how to treat each of these fields.
Tools: tcpdump -vvn -x host 20.207.73.82 prints the decoded fields and the
raw hex; in Wireshark the display filter ip.ttl < 5 finds nearly expired
packets, and ip.flags.df == 1 finds Do Not Fragment packets.
IPv4 lets any router on the path fragment a packet. IPv6 does not.
IPv6 made a deliberate decision: routers never fragment. If a packet is too
big, the router drops it and sends back a “packet too big” message.
Modern IPv4 senders behave the same way voluntarily. They set the DF bit on
every packet, which forbids any router from cutting it up.
That means the sender must find out for itself how big it may go. The method
is called path MTU discovery.
It works like this. Send a full-size packet with DF set. If a link on the way
cannot take it, that router drops it and sends back an ICMP message saying
“fragmentation needed” together with the MTU it can accept.
The sender reads that number, shrinks its packets to fit, and retransmits.
The whole scheme depends on one thing: the ICMP message must get back.
When that happens, the big packets vanish and no message comes back. The
sender keeps retransmitting the same too-big packet forever.
This is called a path MTU black hole, and it produces a very particular
symptom: small things work, big things hang.
Path MTU discovery for IPv4 is RFC 1191, November 1990. For IPv6 it is
RFC 8201, July 2017, which obsoleted RFC 1981.
The IPv4 signal is ICMP type 3, code 4, Destination Unreachable with
Fragmentation Needed and DF set. The next-hop MTU is carried in the message.
The IPv6 signal is ICMPv6 type 2, Packet Too Big. IPv6 forbids router
fragmentation entirely, by RFC 8200, so the sender must react or fail.
IPv6 sets a hard floor: every link must support at least 1,280 bytes. IPv4’s
equivalent floor is 68 bytes to forward and 576 bytes to reassemble.
Link type
Typical MTU
Note
Ethernet
1,500
The default everywhere
PPPoE DSL
1,492
8 bytes of PPPoE header
IPsec tunnel
1,400 to 1,438
Depends on ciphers
WireGuard
1,420
Common default
IPv6 minimum
1,280
Floor set by RFC 8200
Jumbo frames
9,000
Data centre convention
Because ICMP filtering is so common, the IETF specified a method that does
not need ICMP at all: Packetization Layer Path MTU Discovery, RFC 4821,
March 2007, extended to datagram transports in RFC 8899, September 2020.
A quick manual probe on macOS, which sends a 1,472 byte payload plus 8 bytes
of ICMP header plus 20 bytes of IP header, exactly 1,500 bytes:
If the 1,472 probe fails and the 1,200 probe succeeds, you have found an MTU
restriction on the path. On Linux the flag is -M do instead of -D.
Tunnels are the usual cause, and the reader’s machine showed several utun
interfaces, which on macOS are tunnel devices. A tunnel always reduces the
usable MTU.
Now the honest part, because it matters. A path MTU black hole is a genuine
and common cause of exactly the kind of silent failure the reader saw, and
it belongs on the candidate list.
But the evidence here points elsewhere. curl printed Trying 20.207.73.82:443... and then nothing for 15 seconds. curl prints
Connected to only after the TCP handshake completes, and it never did.
So the packet that got no answer was the SYN, which is 64 bytes. An MTU
problem does not stop a 64 byte packet.
What is PROVEN: the first small packet of the connection received no reply
of any kind. What is merely SUGGESTED: something on that path silently
discarded it.
The classic MTU black hole signature is the opposite shape: handshake
succeeds, small responses arrive, and the connection stalls on the first
full-size packet. That is not what happened.
Three different frames carry one packet. Each frame lives for exactly one
link and is then discarded.
The MAC addresses below are illustrative, since the session notes do not
record them, but the pattern is exact.
Frame
Source MAC
Destination MAC
TTL
A
laptop card
router LAN port
64
B
router WAN port
ISP access port
63
C
ISP access port
next ISP port
62
Now the same journey seen from the IP header.
Field
Frame A
Frame B
Frame C
Dest IP
20.207.73.82
unchanged
unchanged
Source IP
192.168.0.14
router WAN
unchanged
TTL
64
63
62
Checksum
d1a5
d2a5
d3a5
Notice the checksum column. Each hop adds 0x0100, because the TTL is the
high byte of a 16 bit word and it went down by one.
The honest version: the source IP address is not really unchanged. The
reader’s home router does network address translation, so it rewrites the
source from 192.168.0.14 to its own public-facing address.
Step seven above, finding the hardware address of the next machine, deserves
its own explanation, because it is where two different address systems meet.
The routing table gives the router an IP address for the next hop, not a
hardware address.
To build the new frame it needs a hardware address. It gets one by asking on
the local wire: “who has this IP address, tell me your hardware address”.
That question and answer is the Address Resolution Protocol. The answers are
kept in a small table so the question is only asked occasionally.
If the next hop is not a router at all but the final destination on the same
wire, the same lookup happens for the destination address itself.
Now the speed problem. Doing a full table lookup in software for every packet
is far too slow for a serious router.
So real routers split in two. The control plane works out what the routes
should be, slowly, in software.
The data plane forwards packets, fast, using a stripped-down copy of the
answers built into dedicated hardware.
The full forwarding path for an IPv4 unicast packet, per RFC 1812:
1) receive frame, verify FCS, check dst MAC is ours
2) demultiplex on EtherType 0x0800 -> IPv4
3) verify IHL, total length and header checksum
4) if TTL <= 1: drop, send ICMP time exceeded
5) longest prefix match on destination in the FIB
6) decrement TTL, update header checksum incrementally
7) resolve next-hop IP to MAC via ARP cache or request
8) encapsulate in a new L2 header, enqueue on egress
Those eight steps are the forwarding plane. Nothing in the list consults any
state about previous packets, which is what makes IP stateless.
The routing table is the Routing Information Base, the RIB. The hardware copy
is the Forwarding Information Base, the FIB.
The RIB holds every route learned from every source, including losers. The
FIB holds only the winner for each prefix, in a form the silicon can search.
FIB lookup in hardware is typically a TCAM, ternary content addressable
memory, which compares a key against every stored prefix in one clock cycle.
TCAM is expensive and power hungry, which is why routers have hard limits on
route counts. A switch sold as supporting 16,000 IPv4 routes cannot hold a
full internet table.
As of the CIDR Report for 13 August 2026, the global IPv4 table held about
1,071,273 prefixes originated by 79,217 autonomous systems.
Address resolution is ARP for IPv4, RFC 826 from November 1982. IPv6 uses
Neighbor Discovery instead, RFC 4861.
Tools: arp -a on macOS lists the resolved neighbours; netstat -rn shows
the routing table; ip route get 20.207.73.82 on Linux shows the exact
decision for one destination.
One sign says “All departures, this way”. That is the default route.
Further on, a sign says “International departures, this way”. More specific,
so it overrides the general one.
Further on again, “Flights to Mumbai, gate 34”. More specific still.
All four signs point at your flight. You obey the most specific one that
applies to you, and you ignore the vaguer ones.
Where this comparison breaks: an airport arranges the signs so you meet the
general one first and the specific one later. A router sees all its rules at
once and picks the most specific in a single step.
Take a router with these five rules, and a packet for 20.207.73.82, which
is the address the reader’s github.com resolved to.
Rule
Next hop
Matches?
0.0.0.0/0
192.168.0.1
yes
20.0.0.0/8
10.9.0.1
yes
20.192.0.0/10
10.9.0.5
yes
20.207.64.0/18
10.9.0.9
yes
20.207.73.0/24
10.9.0.13
yes
All five match. Now check the bits and see why.
20.207.73.82 = 00010100 11001111 01001001 01010010
/0 (nothing to compare) match
/8 00010100 match
/10 00010100 11 match
/18 00010100 11001111 01 match
/24 00010100 11001111 01001001 match
Take the third one slowly. 20.192.0.0/10 compares the first 10 bits.
The route’s second byte is 192, which is 11000000. Its first two bits are
11.
The address’s second byte is 207, which is 11001111. Its first two bits are
also 11. So the first 10 bits agree.
Now a rule that does not match, for contrast: 20.207.128.0/18. The third
byte 128 is 10000000, whose first two bits are 10, and the address’s
third byte 73 is 01001001, whose first two bits are 01. No match.
Winner: 20.207.73.0/24, because 24 is the largest number of matching bits.
The packet goes to 10.9.0.13.
The default route loses every time anything else matches, which is exactly
what “default” means.
Routes get into the table in four different ways, and the difference matters.
Connected routes appear automatically. Give an interface the address
192.168.0.14/24 and the machine knows 192.168.0.0/24 is reachable
directly on that interface, with no next hop at all.
Static routes are typed in by a person or set by a script. They stay
until someone removes them.
Dynamic routes are learned from a routing protocol talking to other
routers. Section 26.7 covers those.
When two sources offer a route to the very same prefix, longest prefix match
cannot break the tie, because the prefixes are identical.
Two more tie-breakers exist, in this order.
First, administrative distance: a trust score per source. A lower number
means “trust this source more”. Connected beats static beats OSPF beats RIP.
Second, metric: within one protocol, the cheaper route wins. What
“cheaper” means depends entirely on the protocol.
default 192.168.0.1 is 0.0.0.0/0 via the home router. Every packet for
20.207.73.82 used this line.
127 and 127.0.0.1 are loopback, so the machine can talk to itself
without touching any wire.
169.254 is the link-local block from RFC 3927, used when DHCP fails.
192.168.0 is the connected route for the home network, reachable
directly on en0 with no gateway.
192.168.0.1/32 and 192.168.0.14/32 are host routes macOS creates for
the gateway and for the machine’s own address.
192.168.0.1 ac:22:0b:4e:1f:2a is the resolved ARP entry for the router,
with 978 seconds left before it expires.
192.168.0.255 is the broadcast address for the subnet.
224.0.0/4 is the multicast block.
255.255.255.255/32 is the all-hosts broadcast address.
The Flags column is a set of letters, documented in the macOS netstat
manual page.
Flag
Name
Meaning
U
RTF_UP
Route is usable
G
RTF_GATEWAY
Send via an intermediary
S
RTF_STATIC
Added manually
H
RTF_HOST
A single host, not a net
L
RTF_LLINFO
Has link-address info
W
RTF_WASCLONED
Generated by cloning
I
RTF_IFSCOPE
Scoped to one interface
i
RTF_IFREF
Holds an interface reference
r
RTF_ROUTER
Peer is a default router
C
RTF_CLONING
Spawns routes when used
c
RTF_PRCLONING
Protocol-specified cloning
m
RTF_MULTICAST
A multicast address
b
RTF_BROADCAST
A broadcast address
g
RTF_GLOBAL
Destination is on the global internet
So UGScg on the default route reads: usable, via a gateway, static,
protocol-cloning, global. The ! on some lines marks a reject route for
addresses inside the block with no more specific entry.
Administrative distance is a Cisco convention, not an internet standard.
Other vendors use the term route preference with different numbers. Juniper’s
defaults, for instance, differ from the list below.
Source
Cisco distance
Notes
Connected
0
Trusted absolutely
Static
1
Typed by a human
eBGP
20
From another AS
EIGRP internal
90
Cisco only
OSPF
110
Link state
IS-IS
115
Link state
RIP
120
Distance vector
iBGP
200
Inside one AS
Tools: netstat -rn on macOS and BSD, ip route show on Linux, route print on Windows, show ip route on Cisco IOS, and route get 20.207.73.82 on macOS to see exactly which line wins.
Imagine a village with no maps, where you find your way by asking people.
Distance vector is asking your neighbour, “how far is the market?” They say
“twelve minutes that way”. You add the two minutes to reach them and tell
the next person “fourteen minutes”.
This works, but nobody can check anything. If your neighbour is wrong,
everyone downstream of you is wrong too, and confidently so.
Worse: if the market closes, your neighbour hears from you that the market is
fourteen minutes away, and tells you it is sixteen, and you tell them
eighteen. The number climbs forever while the market stays shut.
Link state is different. Every person writes down only what they can see from
their own doorstep, and copies of every note are posted to everybody.
Now everyone holds the same stack of notes, draws the same map, and works out
their own shortest path.
Where this comparison breaks: real people would not re-post the entire note
stack every thirty minutes, but link state protocols do refresh, and the
flooding costs real bandwidth on very large networks.
Four routers, A, B, C and D, in a line, with A connected to a network N.
N --- A --- B --- C --- D
With RIP, which counts hops, the table for network N fills in over time. A
says N = 0 throughout, because N is connected to it.
Round
B says
C says
D says
0
unknown
unknown
unknown
1
N = 1
unknown
unknown
2
N = 1
N = 2
unknown
3
N = 1
N = 2
N = 3
Each round is one update interval. RIP’s default update interval is 30
seconds, so full knowledge of a four-router line takes about a minute and a
half.
Now break the link between A and B. A knows immediately. B does not.
Without protection, B hears from C that N is reachable at distance 2, adds
one, and announces N at distance 3. C then hears 3 and announces 4.
The count climbs: 3, 4, 5, and onward, one per update round, until it reaches
16, which RIP defines as unreachable. That takes many rounds.
This is the famous count to infinity problem, and it is why RIP declares
16 to mean unreachable rather than allowing large numbers.
Interior gateway protocols run inside one administrative domain. Exterior
gateway protocols run between domains. Sections 26.8 and 26.9 cover the
exterior side.
Protocol
Family
Metric
Specification
RIPv1
Distance vector
Hop count
RFC 1058, 1988
RIPv2
Distance vector
Hop count
RFC 2453, 1998
OSPFv2
Link state
Cost
RFC 2328, 1998
IS-IS
Link state
Wide metric
ISO 10589, RFC 1195
EIGRP
Advanced DV
Composite
RFC 7868, 2016
RIP runs over UDP port 520, updates every 30 seconds, times a route out after
180 seconds, and treats metric 16 as infinity. RIPv2 added subnet masks and
uses multicast address 224.0.0.9.
OSPFv2 was specified by John Moy. Version 1 appeared as RFC 1131 in 1989 and
the current version 2 as RFC 2328 in April 1998. OSPFv3 for IPv6 is RFC 5340.
OSPF runs directly over IP as protocol number 89. On a broadcast network it
sends hellos every 10 seconds and declares a neighbour dead after 40 seconds.
OSPF divides a large network into areas, all joined to area 0, the backbone.
Link state flooding is confined within an area, which bounds both the
database size and the computation.
IS-IS comes from the OSI world, standardized as ISO/IEC 10589, and was
adapted to carry IP by RFC 1195 in December 1990. Radia Perlman designed it
at Digital Equipment Corporation for DECnet Phase V.
IS-IS runs directly on the link layer rather than inside IP, which is one
reason very large carriers favour it: it is harder to attack from an IP
packet, and it carries IPv4 and IPv6 in one protocol without change.
Dijkstra’s algorithm was conceived by Edsger Dijkstra in 1956 and published
in Numerische Mathematik in 1959. Its cost with a binary heap is on the
order of E log V, where E is links and V is routers.
Convergence stage
Typical time
Link failure detection
10 ms to 40 s
LSA flooding
10 to 100 ms
SPF computation
1 to 100 ms
FIB update
10 ms to seconds
Tools: show ip ospf neighbor and show isis adjacency on router command
lines, and birdc show route or vtysh for the open source stacks BIRD
and FRRouting.
Distance vector — ask a neighbour how far it is — a protocol where routers
exchange destination and metric pairs, without topology knowledge.
Link state — everyone gets the same map — a protocol where routers flood
descriptions of their own links and each computes paths independently.
Count to infinity — a distance that climbs while the destination is gone — a
distance vector loop where metrics increment until reaching the infinity
value.
Split horizon — do not tell a neighbour what it told you — suppressing
advertisement of a route out of the interface it was learned on.
Dijkstra’s algorithm — repeatedly finish the cheapest unfinished node — a
shortest path first algorithm, published 1959, used by OSPF and IS-IS.
Convergence — everyone agreeing again after a change — the interval from a
topology change to a consistent forwarding state network-wide.
Each country runs its own post inside its borders however it likes. Different
vans, different sorting rules, different rates. That is autonomy.
For letters leaving the country, two arrangements exist.
A small country might pay a big neighbour to handle everything international.
That is transit. One bill, global reach.
Two countries that exchange a lot of post might set up a direct exchange at
the border and simply swap sacks, no invoice. That is peering.
A border exchange building where twenty countries all bring sacks and swap
with whoever they like is an internet exchange point.
Where this comparison breaks: postal countries have fixed geography and
cannot choose their neighbours. Networks connect to whoever they wish,
anywhere, so an AS in India can peer directly with one in Germany.
The second one reverses the four octets and asks a special DNS zone. It is
the fastest, because it is just a DNS lookup.
The answer for this address, checked in August 2026: AS8075, Microsoft
Corporation, with the covering route 20.192.0.0/10, registered in the
United States, and the address itself geolocating to Pune, India.
That last detail lines up neatly with the trace. Hops 10, 11 and 12 carry
pnq20 and pnq21 in their names, and pnq is the airport code for Pune.
AS8075 is registered under the name MICROSOFT-CORP-MSN-AS-BLOCK, which is
also why the hop names use msn.net.
Networks are informally sorted into tiers, and the definition is about
whether you pay anyone.
A tier 1 network can reach every destination on the internet without
buying transit from anybody. It peers with all the other tier 1 networks.
A tier 2 network peers with many networks but still buys transit from at
least one provider to reach everything.
A tier 3 network buys transit and does little or no peering. Most small
ISPs are here.
Experts disagree about who counts as tier 1, because the list depends on
private contracts nobody publishes. Treat any published list as an informed
estimate.
An internet exchange point, or IXP, is a neutral room with a large
ethernet switch in it.
Every member plugs one port into that switch. Once connected, a member can
exchange traffic with any other member that agrees to peer.
The exchange does not route anything. It provides a shared layer 2 fabric.
The peering itself is BGP sessions between members over that fabric.
Most exchanges also run a route server, so a new member can get routes
from dozens of others by setting up one session instead of dozens.
AS numbers were originally 16 bit, giving 0 to 65,535. RFC 6793, December
2012, extended them to 32 bit, giving 0 to 4,294,967,295.
Range
Purpose
Reference
0
Reserved
RFC 7607
1 to 64495
Public, 16 bit
IANA to RIRs
64496 to 64511
Documentation
RFC 5398
64512 to 65534
Private use
RFC 6996
65535
Reserved
IANA
65536 to 65551
Documentation
RFC 5398
65552 to 4199999999
Public, 32 bit
IANA to RIRs
4200000000 to 4294967294
Private use
RFC 6996
AS23456 is reserved as AS_TRANS, a placeholder used when a 32 bit AS number
must be shown to a router that only understands 16 bit numbers.
IANA allocates blocks of AS numbers to the five regional internet registries,
ARIN, RIPE NCC, APNIC, LACNIC and AFRINIC, which then assign them.
Real AS numbers worth knowing:
AS number
Network
Role
8075
Microsoft
Owns 20.207.73.82
13335
Cloudflare
Runs the 1.1.1.1 resolver
15169
Google
Content and cloud
16509
Amazon
Most IPv4 prefixes: 15,814
32934
Meta, formerly Facebook
Subject of 26.9
3356
Lumen, formerly Level 3
Large transit
174
Cogent
Large transit
1299
Arelion, formerly Telia
Large transit
2914
NTT
Large transit
6453
Tata Communications
Large transit, India
3491
PCCW Global
Large transit
17557
Pakistan Telecom
Subject of 26.9
The reader’s resolver, 1.1.1.1, is announced by AS13335. The name the
resolver returned, 20.207.73.82, sits inside AS8075. Two entirely separate
networks were involved before a single packet went anywhere.
Real internet exchange figures, all checkable:
Exchange
Figure
Date
DE-CIX, all sites
25 Tbit/s peak
8 April 2025
DE-CIX Frankfurt
Launched 1995
1995
DE-CIX Frankfurt
About 1,100 networks
April 2025
AMS-IX Amsterdam
15 Tbit/s peak
15 April 2026
India, all IXPs
31 active, 934 members
August 2026
Tools: whois -h whois.cymru.com, the PeeringDB directory for who peers
where, bgp.he.net and bgp.tools for AS relationships, and the CIDR
Report for daily table statistics.
Inside one network, routers use protocols like OSPF to find the best path.
Between networks, none of that works, because the two sides do not trust each
other, do not share a map, and have contracts to honour.
So there is a second protocol just for the boundaries between autonomous
systems. It is called the Border Gateway Protocol, or BGP.
BGP is how one network announces to another: “I can reach these address
blocks, and here is the list of networks a packet would cross to get there”.
That list of networks is called the AS path, and it is the heart of the
protocol.
There are only two things BGP ever says. “I can reach this block”, which is
an announcement, and “I can no longer reach this block”, which is a
withdrawal.
Here is the part that surprises engineers: BGP does not pick the fastest
path. It picks the path its operator’s policy prefers.
Policy usually means money. A route through a network you do not pay is
preferred over a route through a network you do pay, even if it is longer.
And here is the uncomfortable part: in the original design, BGP has no way to
check whether an announcement is true.
Imagine a shipping company deciding how to send goods to Chennai.
Three freight brokers phone in. Each says “I can get it there”, and each
gives you a chain of firms it would pass through.
Broker A quotes a chain of two firms. Broker B quotes three. Broker C quotes
two, but one of them charges you per container while the others do not.
You do not pick the shortest chain. You pick the one that costs you least,
then use chain length only to break ties.
Now the flaw. Nobody verifies that any broker can actually reach Chennai.
Whoever claims the most direct-sounding route gets the goods.
Where this comparison breaks: a shipping company would notice quickly that
its goods never arrived. On the internet, the sender often sees only silence,
which is exactly the shape of the reader’s failed connection.
This is the YouTube hijack of Sunday 24 February 2008, one of the clearest
real examples ever recorded, documented by the RIPE NCC.
YouTube, then AS36561, announced 208.65.152.0/22, a block containing its
servers.
Pakistan’s government ordered access to YouTube blocked. Pakistan Telecom,
AS17557, decided to do it by announcing a more specific route internally so
its own users would be sent nowhere.
At 18:47 UTC, AS17557 began announcing 208.65.153.0/24. That is a /24
inside YouTube’s /22, so it is more specific.
The announcement escaped. Pakistan Telecom’s upstream provider, PCCW Global,
AS3491, accepted it and passed it to the rest of the world.
Longest prefix match then did what it always does. A /24 beats a /22, so
routers everywhere sent YouTube traffic to Pakistan Telecom.
Time UTC
Event
18:47
AS17557 announces 208.65.153.0/24
20:07
AS36561 announces the same /24 back
20:51
AS17557 path seen prepended
21:01
AS3491 withdraws AS17557 prefixes
Notice YouTube’s counter-move at 20:07. It announced the same /24 itself, so
the two announcements were equally specific and the tie fell to AS path
length. That recovered some traffic but not all.
It ended only when PCCW stopped accepting the announcement at 21:01.
BGP is a path vector protocol. Each announcement carries the full list of
autonomous systems it has crossed, not just a distance.
That list has two jobs. It breaks loops, because a router discards any
announcement that already contains its own AS number. And it is a tie-break,
because a shorter list is preferred.
Two kinds of BGP session exist and they behave differently.
eBGP runs between two different autonomous systems. Every time an
announcement crosses an eBGP session, the sender adds its own AS number to
the front of the path.
iBGP runs between routers inside one autonomous system. The AS path is
not changed, because the announcement has not left the AS.
iBGP has a rule that catches everyone out: a router will not pass a route
learned from one iBGP peer on to another iBGP peer. That prevents loops, but
it means every iBGP router must talk to every other one, or you need route
reflectors.
When several announcements offer the same prefix, BGP runs a fixed list of
tie-breakers, in strict order, and stops at the first one that decides.
The first real tie-break is local preference, a number set by your own
policy. It exists to encode “prefer the free path over the paid path”.
Only after local preference does AS path length matter. This is why the
internet’s routes are frequently not the shortest ones available.
BGP-4 is specified in RFC 4271, January 2006, which obsoleted RFC 1771 from
1995. The first version, RFC 1105, dates from June 1989 and was written by
Kirk Lougheed of Cisco and Yakov Rekhter of IBM.
The best path selection order, as implemented by Cisco IOS. Steps 1 and parts
of the ordering are vendor conventions, not parts of RFC 4271.
Step
Criterion
Prefer
1
Weight
Highest, Cisco only, local
2
Local preference
Highest
3
Locally originated
Self-originated
4
AS path length
Shortest
5
Origin type
IGP over EGP over incomplete
6
MED
Lowest
7
eBGP versus iBGP
eBGP
8
IGP metric to next hop
Lowest
9
Router ID
Lowest
Read that table as a statement about economics. The two strongest knobs,
weight and local preference, are both purely local policy. Distance does not
appear until step 4, and physical latency never appears at all.
Three incidents worth knowing exactly:
25 April 1997, the AS 7007 incident. A router at a small Florida provider
re-announced large parts of the internet as /24s, and much of the global
routing system followed the more specific routes into it.
24 February 2008, the Pakistan Telecom YouTube hijack described above.
4 October 2021, the Facebook outage. Cloudflare recorded a burst of BGP
updates from Facebook’s network beginning around 15:39 UTC, including
withdrawal of the routes covering all of its authoritative DNS servers.
The Facebook case is the cleanest illustration of withdrawal. Facebook’s DNS
servers were designed to withdraw their own routes if they lost contact with
the data centres, and a backbone configuration change triggered exactly that.
Resolvers worldwide, including the 1.1.1.1 service the reader uses, then
returned SERVFAIL for facebook.com, because the name servers were not
merely down, they were unreachable at the routing layer.
BGP activity resumed shortly before 21:00 UTC, routing was restored at about
21:50 UTC, and services were generally usable again by about 22:45 UTC. Six
to seven hours, from a routing change, not an attack.
A route leak is different from a hijack. The prefixes are genuine, but
they are passed to a party that should never have received them, usually by
a network announcing its providers’ routes to its other providers.
On 16 April 2021, AS55410, Vodafone Idea in India, leaked more than 30,000
prefixes it did not own, drawing a large multiple of its normal inbound
traffic and disrupting reachability well beyond India.
The current defence is the Resource Public Key Infrastructure, RPKI,
architecture in RFC 6480, February 2012.
An address holder publishes a signed Route Origin Authorization, a ROA,
saying “AS number X is authorized to originate this prefix, up to this
length”. 20.207.73.82 is covered by a valid ROA today.
Routers then perform Route Origin Validation, RFC 6811, January 2013,
marking each route Valid, Invalid or NotFound, and operators normally drop
the Invalid ones.
Deployment figures from the NIST RPKI Monitor for 1 August 2026, IPv4:
State
Prefix-origin pairs
Share
Valid
842,771
68.57 percent
NotFound
372,904
30.34 percent
Invalid
13,370
1.09 percent
Measured by address space rather than by prefix count, 61.64 percent of
announced /24 equivalents were covered by a valid ROA on the same date.
Coverage is not the same as enforcement. Published assessments in 2026 put
the share of autonomous systems actually enforcing ROV at roughly a quarter,
and this is the number that matters.
RPKI origin validation only proves who may originate a prefix. It says
nothing about whether the rest of the AS path is real, so it stops the 2008
style hijack but not every route leak.
Tools: birdc show protocols, RIPE RIS and RouteViews for historical BGP
data, BGPlay for animated replays of incidents, and public looking glasses
for a live view from another network.
The reader’s traceroute shows 12 hops outward before the replies stop.
Hop 1 is the router in the flat. Hops 2 to 6 are private ISP addresses. Hop 3
is the ISP’s public address 137.97.29.249. From hop 7 the names become
ntwk.msn.net, so the packets are inside Microsoft’s network.
The names then read Delhi, then Mumbai, then Pune. That is a real geographic
journey, visible in the site codes del01, bom01, pnq20 and pnq21.
Now the honest limit. Every one of those 12 lines was learned from a reply
sent back to the reader.
A reply is generated when a packet’s TTL hits zero. The reply is a brand new
packet, sent from that router to the reader, over whatever path that router
chooses.
So each line tells you one address on the forward path, and nothing whatever
about how the answer travelled home.
If the fault lies on the return path, a traceroute from the reader’s laptop
cannot see it at all. That is a limit of the model, not of the tool.
Paths differing in the two directions is called asymmetric routing, and
it is the normal case on the internet, not the exception.
It happens because forward and reverse decisions are made by different
parties. Your ISP decides how to reach Microsoft. Microsoft decides how to
reach your ISP.
Both apply their own local preference, so both may pick a cheaper path than
the other side chose.
A stateful firewall that only sees one direction of a flow will drop it,
because it never saw the handshake it expects.
To diagnose properly you need a trace from both ends, or a looking glass at
the far network that can trace back towards you.
Traceroute was written by Van Jacobson in 1987 and released in 1988. It works
by sending probes with TTL 1, 2, 3 and upward, and reading the ICMP time
exceeded messages, ICMP type 11 code 0, from RFC 792.
Classic Unix traceroute uses UDP to high destination ports. macOS supports
-I for ICMP echo probes and -T for TCP probes.
traceroute -T -p 443 20.207.73.82 is the version worth running for the
reader’s fault, because it probes the exact port that failed. Firewalls
frequently treat UDP, ICMP and TCP port 443 completely differently.
Silence at the end of a trace proves nothing on its own. Routers commonly
rate limit ICMP generation, and many networks suppress it entirely. Hops 13
to 20 showing * * * is consistent with a healthy path.
Reverse path visibility requires cooperation: a public looking glass, a RIPE
Atlas measurement from a probe near the target, or mtr run from both ends.
mtr is the better everyday tool, because it runs continuously and shows
per-hop loss and jitter rather than a single snapshot.
Between two big routers there is rarely one cable. There are often four,
eight or sixteen, run in parallel for capacity and safety.
When a router has several equally good ways to reach a destination, it uses
all of them. This is called equal cost multipath, or ECMP.
Now the question: how does it decide which cable each packet takes?
The safe method is to keep each conversation on one cable. All packets of one
connection follow the same link, in order.
The router works out which cable by mixing a few fields from the packet
header into a number and taking the remainder. The same conversation always
produces the same number.
This is why the reader’s traceroute shows two or three different addresses at
hops 5, 6, 8, 9 and 11.
Traceroute sends many probe packets, and probes are usually not all part of
one conversation, so they scatter across the parallel links and come back
with different router addresses.
That is not a fault. It is the visible fingerprint of a healthy, redundant
network, and it is PROVEN evidence of parallel paths rather than of trouble.
Think of a toll plaza with eight lanes going the same way.
If you sent every car down whichever lane was shortest right now, cars from
the same convoy would arrive out of order.
So the plaza uses a rule instead: take the number plate, add up the digits,
and send the car to lane number remainder-of-that.
Every car from the same fleet, with related plates, ends up in the same lane,
in order. Different fleets spread evenly across all eight.
Where this comparison breaks: a lane that closes forces a re-computation, and
with a naive rule that reshuffles everybody, not just the affected cars.
Real networks use hashing schemes designed to limit that damage.
The fields used are called the five-tuple: source address, destination
address, protocol number, source port and destination port.
For the reader’s connection those are 192.168.0.14, 20.207.73.82,
protocol 6, some ephemeral source port, and destination port 443.
Suppose a router has four equal paths. It hashes the five-tuple to a number
and takes that number modulo 4.
A second connection from the same laptop to the same server uses a different
source port, so a different hash, so possibly a different path.
Flow
Differs by
Same path?
Same TCP connection
nothing
Yes
New connection, same host
source port
Not necessarily
Ping probes
protocol is ICMP
Different hash space
Different destination
dest address
Not necessarily
Now look at the trace again. Hop 8 shows be23.rwa02.bom01.ntwk.msn.net
and po22.rwa04.bom01.ntwk.msn.net. Two different Mumbai routers answered
probes with the same TTL.
That means the probes took two different equal-cost paths through Mumbai.
Both are correct answers.
ECMP is described in RFC 2991, Multipath Issues in Unicast and Multicast
Next-Hop Selection, and RFC 2992, Analysis of an Equal-Cost Multi-Path
Algorithm, both from November 2000.
RFC 2992 analyses hash-threshold assignment, chosen specifically because it
disturbs fewer existing flows when the number of paths changes than a naive
modulo does.
Typical hash inputs by layer:
Layer
Fields hashed
L2 bundle
Source and dest MAC
L3 only
Source and dest IP
L3 plus L4
The five-tuple
Tunnelled
Outer header, or entropy label
Tunnels break flow spreading. If thousands of flows share one outer header,
the hash sees one flow. MPLS entropy labels and the UDP source port in VXLAN
and in QUIC exist to restore variety.
Traceroute has a specific defence. The Paris traceroute technique keeps the
flow identifier constant across probes so that all probes follow one path,
which makes multipath fan-out disappear and reveals the true single path.
On macOS and Linux, traceroute -T -p 443 fixes the destination port and
protocol, which alone removes much of the scatter.
Think of a single checkout in a shop with a very long roped queue behind it.
Adding more rope does not make the checkout faster. It only lets more people
stand in line, so everybody waits longer.
Somebody who wants one item now waits behind a trolley shopper’s whole load.
The fix is not more rope. It is a shorter permitted queue, and a rule that
turns people away early rather than letting the line grow without limit.
Where this comparison breaks: shoppers who are turned away go home. A sender
whose packet is dropped simply slows down and tries again, which is exactly
the message the drop was meant to send.
Two different tools are often confused: shaping and policing.
Shaping delays traffic to make it fit a target rate. Packets queue and
come out smoothly. Nothing is thrown away unless the queue overflows.
Policing simply discards anything above the target rate. There is no
queue, so there is no added delay, but there is more loss.
Shaping is kinder to TCP. Policing is cheaper to implement and common on
provider edges.
Marking is a third idea. The DSCP field in the IP header lets a sender label
a packet as more or less urgent.
The honest version: your marking usually does not survive. Most networks
rewrite or zero the DSCP field at their boundary, because they will not let
an outsider decide their queueing.
Jim Gettys named bufferbloat in 2010 and wrote it up as Bufferbloat: Dark
Buffers in the Internet in ACM Queue in 2011.
Kathleen Nichols and Van Jacobson published CoDel, Controlling Queue Delay,
in ACM Queue in 2012. It became RFC 8289, and the flow-queueing variant
fq_codel became RFC 8290, both in January 2018.
CoDel does not target a queue length. It targets a queue delay, with a
default target of 5 milliseconds measured over a 100 millisecond interval.
fq_codel adds per-flow queues with round-robin service, so a bulk transfer
cannot delay a DNS lookup or a video call sharing the same link.
Earlier active queue management used Random Early Detection, from the 1993
paper by Sally Floyd and Van Jacobson, which drops with rising probability as
the average queue grows. RED needs tuning; CoDel does not.
ECN, RFC 3168, lets a router set a bit instead of dropping. The receiver
echoes it, the sender slows down, and nothing is lost.
DSCP name
Value
Typical use
CS0, default
0
Everything unmarked
AF41
34
Interactive video
EF
46
Voice
CS6
48
Network control
Tools: tc qdisc on Linux shows and sets the queue discipline, and
fq_codel is the default on most current distributions. The flent test
suite measures bufferbloat directly.
Whether providers should deprioritize particular traffic is a policy
argument, not a technical one, and experts disagree. In India, the regulator
TRAI barred discriminatory pricing of data services in February 2016 and
net neutrality rules followed in 2018.
A capture filter is the security guard at the door of a building, deciding
who is allowed in at all.
A display filter is you, later, searching the visitor book for one name.
If the guard turned somebody away, no amount of searching the book will find
them. The record simply does not exist.
Where this comparison breaks: the guard is fast and free, and letting
everybody in has a real cost. On a busy link, capturing everything can fill
a disk in minutes and drop packets while doing so.
Capturing works by putting the network card driver into a mode where it hands
a copy of every frame to a special kernel facility.
That facility applies the capture filter, compiled into a tiny program, and
copies only matching frames into a ring buffer for the tool to read.
Because the filter runs in the kernel, a narrow capture filter costs almost
nothing even on a fast link.
Two cautions. On Wi-Fi you normally see only your own traffic unless the card
is put into monitor mode. And on a switch you see only frames addressed to
you, unless a port is configured to mirror others.
Encrypted payloads stay encrypted. You can see that a TLS handshake happened,
its size and its timing, but not the HTTP request inside it.
tcpdump was written in 1988 at Lawrence Berkeley Laboratory by Van Jacobson,
Craig Leres and Steven McCanne. The filtering engine underneath it, the BSD
Packet Filter, was described by McCanne and Jacobson in 1993.
Wireshark began as Ethereal, released by Gerald Combs in 1998, and was renamed
Wireshark in 2006 after a trademark problem.
Capture filters use BPF syntax. Display filters use Wireshark’s own syntax.
They are not interchangeable, and this trips up nearly everyone once.
sudo tcpdump -ni en0 -s0 -w gh.pcap \
'host 20.207.73.82 and tcp port 443'
tcpdump -r gh.pcap -vvn
Useful display filters in Wireshark for this fault:
ip.addr == 20.207.73.82, tcp.flags.syn == 1 && tcp.flags.ack == 0,
tcp.analysis.retransmission, and icmp.
-s0 captures whole frames rather than truncating them. -w writes a pcap
file. Analysis should always be done on a file, never on live scrolling text.
A checklist for diagnosing silence, in order:
Is there an outbound SYN at all, and to the right address?
Is anything at all coming back, including ICMP?
Are the retransmissions identical, or is the stack trying new ports?
Does a capture on another network, such as mobile data, differ?
Tools worth having beside tcpdump: mtr for continuous per-hop loss, dig
for name resolution, curl -v --trace-time for per-stage timing, and
tshark for scripted analysis of a saved capture.
Wrong: packets travel down a fixed path that is set up when the connection
starts. Right: nothing is set up. Each router decides independently, per
packet, and the path can change mid-conversation without anyone being told.
Wrong: the internet routes around damage automatically and instantly. Right:
it routes around damage eventually, if an alternative exists and if policy
allows it. Convergence takes seconds inside one network and can take minutes
across BGP, during which traffic is lost.
Wrong: a traceroute shows the return path. Right: it shows one address per
hop on the way out, learned from replies that came back by an unknown route.
The return path is invisible from one end.
Wrong: more hops means slower. Right: hop count and latency are only loosely
related. Twelve hops inside one well-run backbone can beat four hops over a
congested link or a satellite.
Wrong: stars at the end of a traceroute prove a fault. Right: many routers
rate limit or block ICMP replies. The reader’s hops 13 to 20 showing * * *
is consistent with a perfectly healthy path.
Wrong: seeing two or three addresses for one hop means something is broken.
Right: it means parallel links are in use, which is normal and desirable.
Wrong: BGP picks the shortest path. Right: BGP picks the path its operator’s
policy prefers. Local preference, which is pure business policy, is compared
before AS path length, and physical distance is never compared at all.
Wrong: my ISP can see which pages I loaded because it carries my packets.
Right: it sees addresses, sizes and timing. With TLS it does not see the
content, though it can often infer a great deal from the pattern.
Data is split into packets for fairness, cheap error recovery, small buffers
and the ability to interleave many conversations on one wire.
Circuit switching reserves a path and wastes capacity. Packet switching
reserves nothing and accepts variable delay. The internet chose the second.
A packet is a header plus a payload, and the payload is normally another
whole packet with its own header.
A 512 byte HTTPS request from the reader’s laptop becomes a 604 byte Ethernet
frame, which is 15.2 percent overhead.
The IPv4 header is 20 bytes and 13 fields, unchanged since RFC 791 in 1981.
TTL stops packets circling forever. Decrementing it forces the header
checksum to be recomputed, which routers do incrementally.
Every link has an MTU. Oversized packets are fragmented, rejected with an
ICMP message, or silently dropped, and the third case is the painful one.
IPv6 never fragments in the network. Modern IPv4 senders set the Do Not
Fragment bit and discover the path MTU for themselves.
A router receives a frame, strips it, looks up the destination, decrements
TTL, fixes the checksum, resolves the next hop and builds a brand new frame.
MAC addresses change at every hop. IP addresses do not, unless a device is
performing NAT.
A routing table is matched by longest prefix. 20.207.73.0/24 beats
20.192.0.0/10 beats 0.0.0.0/0 for the address 20.207.73.82.
The reader’s default route, 0.0.0.0/0 through 192.168.0.1, carried every
one of these packets out of the flat.
Inside a network, routes are learned by RIP, OSPF, IS-IS or EIGRP. Link
state protocols flood a map and run Dijkstra’s algorithm on it.
Between networks, routes are learned by BGP, which carries a full AS path
and chooses by policy, with local preference outranking path length.
20.207.73.82 belongs to AS8075, Microsoft, inside the route
20.192.0.0/10, which is why hop 7 onwards reads ntwk.msn.net.
BGP has no built-in way to verify an announcement. RPKI adds signed origin
authorizations, and about 69 percent of IPv4 prefix-origin pairs were valid
in August 2026, but only about a quarter of networks enforce checking.
Nobody knows the whole path in advance. Each router knows only the next hop,
and the return path is chosen by different networks entirely.
Multiple addresses at hops 5, 6, 8, 9 and 11 are equal cost multipath at
work, selected by hashing the five-tuple, and are healthy rather than faulty.
Oversized buffers turn loss into delay and make fast links feel slow. Short
managed queues, such as fq_codel, fix it without more bandwidth.
A capture showing four identical SYNs at 1, 2 and 4 second gaps with no
reply of any kind PROVES the request left and nothing came back, and
SUGGESTS a silent drop somewhere on that path.