How the internet works

Very simply… the internet works using IP addresses… Each ‘host’ on the internet has a unique IP address. Your internet router will have it’s own IP address. The most common form of IP address falls under IPv4 for example 1.1.1.1 is an IP address. In order to connect domain names to IP addresses, DNS is used. DNS stands for Domain Name System. DNS converts domains to IP addresses… There you have it… The internet, in very simple terms!

However things are a little more complicated than that. For example, the address space for IPv4 has become saturated, due to the number of hosts. With this in mind, often hosts, such as your mobile phone or home internet router will have an IP address which isn’t actually directly accessible on the internet. There are special blocks of IP addresses (reserved addresses) which are used only for private networks. In this case, often many hosts will be given an address within these reserved addresses. Meaning that you can reach out to the internet through your internet provider, but since you don’t have a public IP address attached to your host (mobile phone, home router etc), the internet cannot connect directly to you (meaning you can’t run a web server from your host).

The same thing happens for your WiFi router, even if it does have a public IP address, as with many home routers connected to the NBN, it will still use these reserved addresses for the private side of the network, and hand them out to any client connecting to the router, usually by WiFi. The router will then perform NAT or network address translation, whereby you can have a private IP address on your laptop, which the router will use to identify hosts on the private side of your home network. This private network is called a LAN, or Local Area Network. Usually home routers will use a range of addresses something like 192.168.1.1 through 192.168.1.254, giving a total of 254 hosts.

My current IP address for my laptop

This is all basically automated these days, whereby all you need is the WiFi name (SSID) and key, it will do all the rest (specifically this process uses a protocol called DHCP to hand out IP address information to clients)

Further info on IP addresses (specifically IPv4)

If you look at your network connection settings for your home WiFi link, you can see your local IP address, along with the Gateway IP (IP of your router) and some DNS IP addresses (ok Win 10 obscures some of this as above… you need to dig further as below.. shakes head at win 10). Often your Gateway will be your DNS as well, forwarding DNS requests often to your internet provider.

When we look at IP address ranges for IPv4, this can be a little complicated. An IPv4 address is broken up into 4 numbers, hmmm need to clarify this…

Q: how many bytes in IPv4 addresses

A: IPv4 addresses are represented by a 32-bit number, which means they consist of 4 groups of 8 bits each. Each group, also known as an octet, can have a value ranging from 0 to 255. When we calculate the total number of bits in an IPv4 address, it comes out to be 32 bits. To convert this to bytes, we divide the number of bits by 8 (since 8 bits make up 1 byte).

Therefore, an IPv4 address consists of 32 bits / 8 = 4 bytes.

(Thanks ChatGPT.. thought so 😛 )

Also… Q: how many hosts in the IPv4 space

In IPv4, the address space is composed of 32 bits, which allows for a theoretical maximum of 2^32 or 4,294,967,296 unique addresses. However, some addresses are reserved for special purposes, such as private networks or multicast addresses. Additionally, certain ranges are designated for other specific purposes, like loopback addresses (127.0.0.0/8) or documentation (192.0.2.0/24).

considering these factors, the usable IPv4 address space for hosts is smaller. Typically, IPv4 networks are divided into subnets, with each subnet requiring a network and broadcast address. Taking these subnet limitations into account, the estimated number of usable hosts in the IPv4 space is slightly less than 4.3 billion. However, the actual number can vary depending on the network configuration and allocation policies.

(Thx again ChatGPT :P)

Now… subnets… Subnets are groupings of IP addresses… for example your home router will have only the last number within its LAN ie 192.168.1.1 through 192.168.1.254

This is described using a subnet mask. Kinda complicated, but in this example the subnet mask is 255.255.255.0 … also the address can be written as 192.168.1.0/24 meaning the same thing.. Only really need to know about this kinda thing if you want to play around with networks.

What this means is that all the hosts on the subnet are directly accessible to each other… anything outside the subnet will need to go via the router (aka Gateway).

This is important because… on a LAN you don’t even need to use IP addresses (lol it gets further complicated)… Underlying the IP address is the MAC address.. this is the unique hardware address for a host… On a LAN you actually communicate using the MAC address…

Each host will store the MAC for known hosts on the LAN, called the ARP table (address resolution protocol).

That’s basically it.

Also IPv4 has been replaced by IPv6, although to this day IPv6 is still used far less than IPv4. By myself included, I’ve like barely ever used it. I don’t think IPv6 even uses NAT… which begs the question.. why do internet providers not just use IPv6 for their hosts, rather than CGNAT..??

Anyway, you get the idea…

Scroll to Top