WikiNano.
IPv4 Lab

IPv4 Lab

IPv4 Lab
32 bits · 4 octets · 4,294,967,296 addresses
Learn · Basics

An IPv4 address is one 32-bit number

Every interface on an IP network — a laptop's Wi-Fi card, a router port, a printer — gets an address so packets know where to go. We write it as four decimal numbers, but the network only ever sees 32 ones and zeros.

Address decoder

Press Play to watch the address unfold.

Network part + host part

Think of a postal address. The network part is the street; every device on the same street shares it. The host part is the house number and must be unique on that street. The subnet mask (or /prefix) tells you where the street name ends.

RuleTwo devices can talk directly only if their network parts match. Otherwise the packet goes to the default gateway (a router).

How a device gets its address

Static

An admin types the IP, mask, gateway and DNS by hand. Used for servers, routers and printers.

DHCP

The device broadcasts a request and a DHCP server leases it an address (Discover → Offer → Request → Ack).

APIPA

No DHCP reply? Windows and macOS self-assign 169.254.x.x. It only works on the local link — a sign something is wrong.

Loopback

127.0.0.1 is always "this machine". It exists without any network card.

Public vs private, and why NAT exists

Hover the devices

There are only about 4.3 billion IPv4 addresses and they ran out at IANA in February 2011. Homes and offices therefore use private ranges (10/8, 172.16/12, 192.168/16) that anyone may reuse. The router's NAT rewrites the private source address to its single public address on the way out, and remembers the mapping so replies find their way back.

IPv4 vs IPv6 at a glance

IPv4 Lab — built for learning. Facts follow RFC 791 (IPv4), RFC 1918 (private ranges), RFC 4632 (CIDR), RFC 826 (ARP), RFC 792 (ICMP), RFC 2131 (DHCP) and RFC 6890 (special-purpose registry). The sandbox is a teaching simulation, not a real network.

About IPv4 Lab

Flip the bits of a real IPv4 address and watch classes, subnet masks, CIDR and the packet header change live. A free interactive networking lab.

Topic: Networking · Format: interactive simulation · Free, no sign-up · Updated 2026-10-15 · By Prince Vincent, WikiNano · Last reviewed 2026-10-15.

Inside this page

Common questions

How many bits is an IPv4 address?
32 bits, written as four numbers from 0 to 255 separated by dots, such as 192.168.1.10. That allows about 4.3 billion unique addresses.
What does the subnet mask do?
It splits an address into a network part and a host part. A /24 mask means the first 24 bits name the network and the last 8 bits identify the device.
What is NAT and why is it used?
Network Address Translation lets many devices on a private network share one public IPv4 address, which is how the world has coped with running out of addresses.

Sources and further reading

Keep exploring