You are on page 1of 2

15 November 2022

The format of an IP address


• An IP address has 2 versions – the older, version 4 (IPv4) and the newer version 6 (IPv6).

IPv4

• This has been in use for a long time and it is still commonly being used.
• This IP address is expressed using ‘dotted notation’.
Octets
192.168.50.23

Network
192.168.50.23Host

Network Host

• This IP address has 2 parts:


◦ Network: All computers/devices in a single network must have the same network part.
◦ Host: All devices in a single network must have a unique host part. So every single device on
the network is a host, and no two devices can have the same host part.
• Each octet is 8 bits large. Thus each one can be between 00000000 to 11111111 (i.e., 0 to 25510)
• As per this rule, each host can be a value between 0 and 255, which means there can be at most 256
computers/devices per network. Although technically this is the case, in reality, there can be at most
254 devices. That is, the host number with all zeros and all ones are not used.

IP address classes

IP address First octet Class Network Host Max hosts


10.50.160.20 00001010 A 10 50.160.20 256^3 - 2
or
2^24 - 2
or
16777216 - 2
68.50.160.20 01000100 B 68.50 160.20 256^2 – 2
or
2^16 – 2
or
65536 - 2
192.168.50.20 11000000 C 192.168.50 20 256 – 2
or
2^8 – 2 = 254

• Most LANs have Class C IPv4 addresses.


• Thus it would mean that if there were more than 254 (or 256) devices it would not be possible to
connect all users.
• To help with customising the number of hosts per network, we use something known as subnets.
• A subnet is a masking value.
Eg1: An office has within 254 users and wants to use class C IP addresses.

IP address : 192.168.1.50
Subnet mask : 255.255.255.0
Range of hosts: 254

The above combination of the IP address and mask are the default for class C.

Eg2: We want to restrict the number of devices to a maximum of 15

IP address : 192.168.1.50
Subnet mask : 255.255.255.240

Eg3: We want to allow 9 bits for the host.

IP address : 192.168.1.50
Subnet mask : 255.255.255.254

You might also like