Notes
IPv6 addresses
IP version six addresses are a hundred and twenty eight bits, written as eight groups of hexadecimal. Leading zeros drop and one run of zero groups becomes a double colon, so Python shortened our long example to two thousand and one colon d b eight colon colon one. A typical site gets a slash forty eight: sixty five thousand five hundred and thirty six subnets of slash sixty four, the standard subnet size. Colon colon one is loopback, fe eighty is link-local, and fd ranges are private.
2001:0db8:0000:0000:0000: 0000:0000:0001 → 2001:db8::1 a /48 site: 2^80 addresses = 65,536 /64 subnets ::1 loopback fe80::/10 link-local fd00::/8 private (ULA) 2001:db8::/32 docs only
Living with IPv6
Most networks run dual stack, both versions side by side. If a name has an AAAA record, clients usually try IP version six first, so a broken v six path causes slow or failed connections even though v four works. There is usually no NAT, so every host can be globally routable, and your firewall must cover v six too. Neighbour discovery over ICMP v six replaces ARP, so ICMP v six must not be blocked. Our lab kernel had IP version six disabled, a reminder to test both stacks.
- dual stack: v4 and v6 side by side; clients prefer v6
- AAAA records → v6 attempts
- no NAT: every host routable → firewall v6 too
- NDP replaces ARP; ICMPv6 must not be blocked
- cloud: dual-stack VPCs, egress-only IGW
MTU
MTU is the largest packet a link carries. We set the second link in our namespace lab to fourteen hundred bytes and sent a ping that filled a fifteen hundred byte packet with the do not fragment flag. The router refused: fragmentation needed and DF set, MTU fourteen hundred. A ping with thirteen hundred and seventy two bytes of data, plus eight of ICMP header and twenty of IP header, is exactly fourteen hundred, and it passed.
$ ping -M do -s 1472 host From 10.0.1.1: Frag needed and DF set (mtu = 1400) $ ping -M do -s 1372 host 1380 bytes from host: ttl=63 1372 + 8 ICMP + 20 IP = 1400 exactly
Path MTU discovery
That error message is how path MTU discovery works. TCP sends with do not fragment set; a router with a smaller link replies with the MTU, and the sender remembers it. After our test, ip route get showed a cached route with MTU fourteen hundred, valid for about ten minutes. Now the classic outage: a firewall blocks all ICMP, the message never arrives, and large packets silently disappear. Handshakes and small requests work; big responses hang forever.
send with DF set router: ICMP "frag needed, mtu 1400" sender lowers its size $ ip route get 10.0.2.20 cache expires 599sec mtu 1400 block that ICMP → large packets vanish: "black hole"
Where it bites
Where does this bite? Every tunnel adds headers, so VPNs, VXLAN overlays and GRE have a smaller inner MTU than fifteen hundred. AWS uses jumbo frames of up to nine thousand and one bytes inside a VPC, but traffic to the internet or over a VPN is limited to fifteen hundred or less. Kubernetes network plugins must set the pod MTU to match. Fixes: allow the ICMP messages, clamp TCP's maximum segment size on the tunnel, and set MTUs consistently.
- Ethernet 1500
- VPNs, VXLAN, GRE: overhead → inner MTU smaller
- AWS inside a VPC: up to 9001 (jumbo), but 1500 to the internet and over VPN
- Kubernetes CNIs set pod MTU
- fixes: allow ICMP, MSS clamping, set MTU right
BGP
Between organisations, the internet is routed by BGP. Each network, an autonomous system with its own number, announces the address prefixes it can reach to its neighbours, who pass them on. Routers choose paths by policy and path length. If your network withdraws its announcements, the rest of the internet forgets how to reach you. You meet BGP in the cloud too, in Direct Connect, VPN gateways and transit gateways, and some Kubernetes networking uses it inside the cluster.
- networks = autonomous systems (AS numbers)
- each announces its prefixes to neighbours
- routers pick paths by policy and AS-path length
- withdraw a route → the world forgets how to reach you
- cloud: Direct Connect, TGW
BGP outages
BGP mistakes have caused some of the largest outages. A faulty change can withdraw a company's own prefixes, making its DNS servers and every service unreachable at once, including the tools engineers need to fix it, which is why out of band access matters. Route leaks and hijacks happen when another network announces your prefixes. Defences include RPKI route validation, strict filters, and rolling out network changes in stages.
- a config change withdraws your own prefixes → DNS and services unreachable, remote tools too
- leaks/hijacks: someone else announces your prefix
- defences: RPKI, filters, out-of-band access, staged network changes
Anycast
Anycast uses BGP cleverly: the same address is announced from many locations, and routing sends each user to the nearest one, in network terms. Root DNS servers, public resolvers and CDNs work this way, and it absorbs DDoS attacks by spreading them across sites. The trade-off: if routes shift mid-connection, a user may land on another site, so anycast suits DNS and short connections, and CDNs engineer around it for longer ones.
- announce one prefix from many locations
- BGP sends each user to the nearest (in routing terms)
- used by: root DNS servers, public resolvers, CDNs, DDoS protection
- mostly UDP / short TCP; a route change moves users
Common mistakes
Mistakes. Blocking all ICMP, which breaks path MTU discovery, and all ICMP v six, which breaks IP version six entirely. Publishing AAAA records without a working v six path. Forgetting v six firewall rules. Leaving tunnel interfaces at fifteen hundred. And making network changes without a staged rollout or another way in when the network breaks.
- blocking all ICMP / ICMPv6
- AAAA record without a working v6 path
- no v6 firewall rules
- tunnel MTU left at 1500
- network changes without staged rollout or out-of-band access
Say it like this
In the interview: small requests working while large ones hang points to an MTU black hole: a link with a smaller MTU, often a VPN or overlay, and the ICMP fragmentation needed messages are blocked, so path MTU discovery fails. I confirm with ping and the do not fragment flag at decreasing sizes, then allow that ICMP, clamp MSS on the tunnel or set the right MTU. If the name has an AAAA record, I also check the IP version six path.
- "That smells like an MTU black
- hole: a smaller link, often a tunnel, and ICMP frag-needed
- blocked. I test with ping -M do
- at decreasing sizes, then allow
- the ICMP, clamp MSS or set the right MTU. I also check IPv6 if the name has AAAA."