A friend wants to show you a prototype of the new sloth webcam website they’re building, so they share their device with you using Tailscale. Yo

The long wondrous life of a Tailscale packet

submited by
Style Pass
2021-05-24 18:00:11

A friend wants to show you a prototype of the new sloth webcam website they’re building, so they share their device with you using Tailscale. You accept. Grabbing their IP address from the Tailscale GUI, you visit http://100.101.102.103/ in your browser. (Not https. It’s OK! We’ll come back to that.)

The browser asks the kernel for a TCP connection to 100.101.102.103. The kernel creates a TCP SYN packet addressed to 100.101.102.103. Our packet is born.

The kernel manages network interfaces. A network interface is a way to send and receive network traffic. Your wifi card is a network interface. So are the seven ethernet cards you’ve installed. So is the loopback interface, which delivers packets to other processes running on the same device.

To decide which network interface should receive a packet, the kernel maintains a routing table. On Linux, you can see the routing table by running ip route. It’s based primarily on destination IP address, with a default route to use when nothing else matches.

Leave a Comment