speedtest.it
← Blog

Networking Fundamentals: What Are IP, TCP/IP, and Subnetting

Networking fundamentals: IP addresses, the TCP/IP stack, the difference between TCP and UDP, subnetting, and CIDR notation explained practically.

Networking Fundamentals: What Are IP, TCP/IP, and Subnetting

Every time you open a website, send an email, or make a video call, precise and sophisticated things happen under the surface. Data doesn't "travel" magically: it gets split into packets, routed through dozens of routers, reassembled in the correct order, and delivered exactly where it needs to go. The concepts that make all this possible — IP addresses, TCP/IP, and subnetting — aren't specialist knowledge. They are the foundations that every person working with technology should understand.

What is an IP address?

An IP address (Internet Protocol Address) is a numerical identifier assigned to every device connected to a network. It works like your home postal address: without it, no one would know where to deliver the data.

There are two versions:

IPv4: dotted decimal format, four groups from 0 to 255. Example: 93.41.12.204. About 4.3 billion possible addresses — exhausted in practice.

IPv6: hexadecimal format, eight groups separated by colons. Example: 2001:db8:85a3::8a2e:370:7334. Practically infinite space (2¹²⁸ addresses). Migration is underway.

Public vs private IP

Your router has a public IP assigned by the ISP (the one the internet sees) and distributes private IPs to each device on the home network (your PC, smartphone, smart TV). Private IPs use reserved ranges that are not routed on the internet:

  • 192.168.0.0/16 — the most common in home networks
  • 10.0.0.0/8 — often used in corporate networks
  • 172.16.0.0/12 — less common, used in some configurations

NAT (Network Address Translation) is the mechanism by which the router "translates" connections from internal private IPs toward the single external public IP — and vice versa for responses.

TCP/IP: how data travels on the internet

"TCP/IP" is not a single protocol but a stack of layered protocols. The two main names give the title to the whole, but many other protocols are involved.

IP — Internet Protocol

IP is the base layer: it handles the addressing and routing of packets. Each IP packet contains the source address, destination address, and data. IP is best-effort: it takes care of routing the packet, but does not guarantee it arrives, nor that it arrives in the correct order.

Each router along the path reads the packet's destination and decides the "next hop" — which router to send it to — based on its routing tables. A packet from New York to London can pass through 15–20 different routers.

TCP — Transmission Control Protocol

TCP is the layer above IP: it adds reliability, ordering, and flow control.

How it works briefly:

  1. Before sending data, TCP establishes a connection via the three-way handshake (SYN → SYN-ACK → ACK)
  2. Data is split into numbered segments
  3. The recipient sends ACK (acknowledgment) for each received segment
  4. If a segment is not confirmed within a timeout, it is retransmitted
  5. TCP automatically adjusts the sending speed based on network capacity (congestion control)

TCP is the protocol used by HTTP/HTTPS (websites), email (SMTP, IMAP), file transfer (FTP, SFTP). Anywhere data must arrive complete and in the correct order.

UDP — User Datagram Protocol

UDP is the "reckless" sibling of TCP: no handshake, no ACK, no retransmission. It just sends packets.

When is it needed? When speed matters more than completeness:

  • Video streaming (a lost frame is less serious than a pause for retransmission)
  • Online gaming (low latency is crucial, a lost packet can be ignored)
  • DNS (short requests, the client retries if no response is received)
  • VoIP and video conferencing

The layered model

Network communication is organized in layers, each with a specific responsibility:

| Layer | Example | Responsibility | |-------|---------|----------------| | Application | HTTP, SMTP, DNS | Data format for the application | | Transport | TCP, UDP | Reliable (or not) delivery | | Network | IP | Addressing and routing | | Link | Ethernet, Wi-Fi | Physical transmission on the local network |

Each layer "speaks" only with the one immediately above and below. This isolation is what allows updating or replacing a protocol without breaking everything else.

Subnetting: dividing a network into subnets

Subnetting is the technique by which an IP network is divided into smaller segments (subnets). It is one of the fundamental concepts for anyone managing networks, even small ones.

The subnet mask

Every IP address is accompanied by a subnet mask that specifies how many bits of the address identify the network and how many identify the host.

Example: 192.168.1.0/24

  • /24 means the first 24 bits are the network, the last 8 bits identify hosts
  • The equivalent mask is 255.255.255.0
  • Available addresses: 2⁸ = 256, of which 254 are usable (the first is the network address, the last is broadcast)

CIDR: the modern notation

CIDR (Classless Inter-Domain Routing) has replaced the old class A/B/C system, allowing masks of any length:

| Notation | Mask | Available hosts | Typical use | |----------|------|-----------------|-------------| | /30 | 255.255.255.252 | 2 | Point-to-point links | | /29 | 255.255.255.248 | 6 | Small subnets | | /24 | 255.255.255.0 | 254 | Home/office networks | | /22 | 255.255.252.0 | 1022 | Medium networks | | /16 | 255.255.0.0 | 65534 | Large corporate networks |

Why do subnetting?

Dividing a large network into smaller subnets brings concrete benefits:

Security: devices in different subnets cannot communicate directly without going through a router or firewall. You can isolate production servers from the office network.

Performance: broadcast traffic (which goes to all devices on the network) remains confined to the subnet. In a network with 1000 devices in a single segment, broadcast would saturize the bandwidth.

Organization: separating company departments into different subnets simplifies troubleshooting and policy management.

Useful tools for those who want to go deeper

To check IP addresses, latency, and connectivity directly from the browser:

  • My IP — shows public IP, ISP, location, and whether you're using IPv4 or IPv6
  • Online Ping — measures latency to any host
  • DNS Lookup — resolves DNS records for a domain

Frequently asked questions

What is the difference between an IP address and a MAC address? The IP address is logical and can change: it identifies a device on the network at the software level. The MAC address is physical and permanent: it's "burned" into the network card by the manufacturer. On the local network, ARP (Address Resolution Protocol) associates IP addresses with MAC addresses. On the internet, only IP addresses are relevant.

What is NAT and why does it sometimes cause problems? NAT allows many devices with private IPs to share a single public IP. The problem: it hides the identity of individual devices. P2P applications, online gaming, and some VPNs must do "NAT traversal" to establish direct connections. IPv6, not needing NAT, eliminates these problems.

What is DNS and how does it relate to IP? DNS (Domain Name System) is the internet's "phone book": it translates readable names like www.google.com into numerical IP addresses. When you type a URL, the browser first makes a DNS query to find the server's IP, then connects to that IP. You can check the DNS records of any domain with our DNS Lookup.


← All articles