IPv4 Basics

This guide attempts to introduce IPv4 basics, such as IP addresses and Subnet masks.

A "Host"

In computer network theory, a host can be simply defined as a networked device that has an IP Address assigned to it. This could be a desktop, server, phone or router or anything else.

IP Address

This is essentially an ID number assigned to a host. All IPv4 addresses are split into 4 sections called "octets". Each octet contains 8 bits, this means each octet can range from 0 - 255. Much like how a physical address works the IP address intends to make it easy for packets to find you. is an example of what one could look like.

Network and Host Portion

IP addresses are split into two different parts the Network portion and the host portion. As far as we are concerned, the network portion is basically an ID number. If one computer is on one network address (192.168.1.*) and another is on (192.168.2.*) those computers will be on different networks, and generally speaking could not communicate with each other.

Network Portion for


Within that network address we have all the different hosts. All of these will a different number on the end.

Host Portion for Example Home Network:

Router: *.*.*.1 Computer: *.*.*.10

Subnet Mask

A subnet mask is what is used to sub-divide different networks. When we convert to binary a subnet mask will appear as a string of 1's followed by 0's.

In this example we see the binary conversion on top and the numeral version on bottom :

255 .255 .255 .240

The 1's represent the network portion, the part that defines the network. The 0's represent the number of available hosts. The larger the network portion (the more 1's) the less host devices will have room on the network.

When we place an IP address converted to binary...

192 .168 .1 .1

Next to the subnet mask...


Subnet Portion

For security reasons we can limit the number of hosts allowed in a subnet. Most home routers come with as the default mask. By increasing the last number we can achieve this. We must use binary to work this out since you can't use any number, a subnet mask must not contain anymore 1's after the first 0 appears. That limits the numbers we can use.


06/22/2018 - 02:51