TCP/IP basics

created onMay 28, 2026

some TCP/IP basics

5 layer model

There are several TCP/IP layer models with 4 or 5 layers. The OSI model consists of 7 layers. The TCP/IP layers do not fit nicely into the OSI model.
num layer function PDU protocols associated devices
5 Application Interface to user applications Data, Message BGP, DNS, DHCP, SMTP, SSH, HTTPS End user devise: PC, smartphone
4 Transport Ensures reliability and correct sequence Segment, Datagram TCP, UDP Firewall, gateway
3 Network Logical addressing, routing Packet, Datagram IP, ICMP, IGMP Layer 3 switch, router
2 Data Link Node-to-node data transfer Frame ARP, MAC, PPP Layer 2 switch, bridge, NIC, modem
1 Physical Raw transmission of binary data Bits IEEE 802.3 (Ethernet), IEEE 802.11 (WiFi) Network cable, hub, repeater, NIC

PDU: Protocol Data Unit

ports

Port numbers range from 0 to 65535. The ports are assigned by the IANA.

On Linux systems, the file lists all port numbers assigned by the IANA.

There are three different port ranges:

  • 0 - 1023 – system ports aka well-known ports, assigned to System core services like tmux and daytime, and to universal TCP/IP application protocols, such as DNS, SSH, SMTP, POP3, HTTPS.
  • 1024 - 49151 – user ports aka registered ports, assigned to application protocols, like PostgreSQL (port 5432/tcp 5432/udp).
  • 49152 - 65535 – dynamic/private ports. No port in this range is assigned by IANA and can be used by any application or protocol.

considerations for using ports in the user ports range

All port classes have “gaps”, ports that are not assigned by the IANA.

Ports within the system ports range should never be assigned to user applications. Assigning ports within the system ports range to user applications can break system core services and can cause hardware to malfunction, i.e. ports 401/tcp and 401/udp are reserved for UPS.

Some ports in the user ports range are assigned to protocols that are used in niches, i.e. port 11000/tcp and 11000/udp is assigned to IRISA, a French research institute and ports 11001/tcp and udp are assigned to Metasys developed by Johnson Controls for building automation in the 1990s. It is unlikely that using such ports for your infrastructure and/or applications will collide with ports used by other software run in your domain of operation.

Port 1100/tcp and 1100/udp is assigned to MCTP (Management Component Transport Protocol). MCTP can be used to monitor and control computer hardware components, i.e. Intel NICs can be controlled over PIC Express and I²C. Using such ports doesn’t seem to be a good idea.

A good strategy for checking if a range of ports within the user ports range can be used for one’s own applications, is to check for gaps, and which applications use the ports outside the gaps.

x