In networking a few terms keep coming up: IP address, mask, gateway, broadcast. Once you understand them, they stop being a mystery and you find your way around a network. Let us explain them clearly, and at the end you can play with an IP calculator right in the article.

IP address

An IP address is the address of a device on the network, much like a house has an address on a street. In the most widespread version, IPv4, it is made up of four numbers from 0 to 255 separated by dots, for example 192.168.1.10. We distinguish a public IP (your address toward the internet) and a local IP (within the home network). You can read more in the article what an IP address is.

MAC address

While an IP address can change, a MAC address is a fixed identifier of the network card given to the device by the manufacturer. It is written as six pairs of characters, for example 00:1A:2B:3C:4D:5E. Put simply: the IP address says where the device is on the network, the MAC address says which specific device it is. A switch uses it to decide which port to send data to, and in a router you can use the MAC address to always assign the same IP to a device.

Subnet mask and prefix (/24)

The mask determines which part of the IP address marks the network and which the specific device. Most often you will see the mask 255.255.255.0, which is written in short as the prefix /24. It means the first three numbers are shared by the whole network and only the last one changes, so such a network has room for 254 devices. A smaller prefix (for example /16) means a larger network, a larger prefix (/30) a smaller one.

Network and broadcast address

In every range, two addresses have a special role:

  • The network address is the first address in the range and identifies the network itself. It is not assigned to a device.
  • The broadcast address is the last address in the range and is used to address all devices on the network at once.

All the addresses between them are free for your devices.

Gateway

The gateway is the address of the router through which you leave the network, typically to the internet. When a device communicates with something outside its network, it sends it to the so-called default gateway. At home this is usually the address of your router, for example 192.168.1.1.

NAT: one public IP for the whole network

At home every device has its own local IP, but toward the internet you appear through a single public IP address. The translation between them is handled by NAT (network address translation) in the router. When a device sends a request out, the router remembers who sent it, and when the reply comes, it returns it to the right device. So thanks to NAT a whole household works behind one public IP, and at the same time it serves as basic protection, because the individual devices on the network are not directly visible from outside.

Unicast, broadcast and multicast

Three ways data is delivered on a network:

  • Unicast is a message for one specific recipient, the most common case.
  • Broadcast is a message for everyone on the network at once.
  • Multicast is a message for a selected group of devices, for example when streaming video to several at once.

DHCP and DNS

Two more terms you will see often. DHCP is a service that automatically assigns IP addresses to devices, so you do not have to set them by hand. It works as an agreement between two sides: the DHCP server (usually your router) manages the range of addresses and hands them out, while the DHCP client (every device that connects) asks for an address on connecting and receives it along with the mask and gateway. DNS in turn translates names into IP addresses, which is why you type tiptech.sk instead of a number.

IP calculator

Enter an IP address and a prefix, and the calculator works out the mask, the network and broadcast address, the range of usable addresses and the number of devices on the network.

Try for example /24 (an ordinary home network), /30 (a link between two devices) or /16 (a large network).

Building or dealing with a network and want to design it correctly? Get in touch, we will advise and design the addressing and wiring. The article on a router, a switch and a hub also helps.

This article is part of our Computer networks overview.