Boss lesson · Unit 01
Follow one packet
Ports, sockets, ARP and NAT: one request traced end to end
What you practise
- Ports and sockets, the 4-tuple that names a connection, well-known ports, MAC vs IP and ARP, then one request traced laptop to router to ISP to server and back through NAT
Try a question from this lesson
Pick one
Your laptop has one IP address, but a browser, a chat app and a music app all receive data at once. How does each packet reach the right program?
Correct answer
Each packet carries a port number that names the program
Why
The IP address gets a packet to the machine. The port number in the transport header gets it to one program on that machine. It is the flat number after the street address.
The idea
Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.
Concept
Ports and sockets
A port is a 16-bit number. A server program listens on a well-known one, such as 443 for HTTPS. Your side of the conversation gets a random high port for each connection.
A connection is named by four values together. Change any one and it is a different connection.
source IP 192.168.1.7
source port 51514 (random, yours)
dest IP 203.0.113.9
dest port 443 (HTTPS)11 more exercises in the app
- 2× type the answer
- 1× match the pairs
- 5× multiple choice
- 1× fill the blanks
- 1× true or false
- 1× order the lines
Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.