Concepts / Addressing

Addressing

IP address

Also called IPv4 address, address

A device's address across networks: 32 bits, written as four numbers like 10.0.1.10.

An address is a network part and a host part
An address is a network part and a host part

10.0.1.10/24 is 32 bits: the /24 says the first 24 name the network (10.0.1) and the last 8 the host (10). Every host on that network shares the first part, so the laptop reaches 10.0.1.20 directly and anything else through a router. A router has one address per network it joins: gatewayRouter is 10.0.1.2 on one side and 10.0.2.2 on the other.

An address is always paired with a prefix length (/24) that says which part names the network and which the device. Routers forward by the network part. A device can have several addresses, one per network it is on; ip -br addr lists them.

See it on real machines

Read next

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab