Menu
Coddy logo textTech

Ports

Lesson 16 of 32 in Coddy's The OSI Model course.

Layer 3 delivers to a machine; layer 4 delivers to a program on that machine. The program's address is a port: a 16-bit number, so ports run from 0 to 65535.

The first 1024 ports (0-1023) are well-known: reserved by convention for standard services, like 80 for HTTP and 22 for SSH. Ports above that are free for anyone.

An IP address plus a port, like 10.0.0.5:443, pins down exactly one conversation endpoint on the entire internet.

challenge icon

Challenge

Beginner

Print two numbers, one per line: the highest possible port, and how many well-known ports there are.

Expected output:

65535
1024

Try it yourself

Terminal

All lessons in The OSI Model

Practice on your own: Terminal playground