IP Address and Subnet

An IP address is an address used to uniquely identify a devices such as computer,server and printers on an IP network. The address is made up of 32 binary bits which can be divisible into a network portion and host portion with the help of a subnet mask. The 32 binary bits are broken into four octets (1 octet = 8 bits). Each octet is converted to decimal and separated by a period (dot). IP address divided into different classes. Class A (1.0.0.0-127.255.255.255), Class B (128.0.0.0-191.255.255.255), Class C (192.0.0.0-223.255.255.255), Class D (224.0.0.0-239.255.255.255), class D, Class E and Classless Inter-domain Routing (CIDR).

  • Class A—The first octet (8bits) denotes the network address, and the last three octets (24bits) are the host portion. Any IP address whose first octet is between 1 and 126 is a Class A address. Note that 0 is reserved as a part of the default address, and 127 is reserved for loopback.
  • Class B—The first two octets (16 bits) denote the network address, and the last two octets (16 bits) are the host portion. Any address whose first octet is in the range 128 to 191 is a Class B address.
  • Class C—The first three octets (24bits) denote the network address, and the last octet (8bits) is the host portion. The first octet range of 192 to 223 is a Class C address.
  • Class D—Used for multicast. Multicast IP addresses have their first octets in the range 224 to 239.
  • Class E—Reserved for future use and includes the range of addresses with a first octet from 240 to 255.

Network Masks

A network mask identify which portion of the address is network and which portion is the node. Class A, B, and C networks have default masks, also known as natural masks, as shown here:

Class A: 255.0.0.0

Class B: 255.255.0.0

Class C: 255.255.255.0

Subnetting

By subnetting you will be able to create multiple logical networks in a single physically connected networks (a single Class A, B, or C network). If you do not have subnet, you are only able to use one network from your desired Class A, B, or C network, which is crap.  for example

10.143.8.1 – 00001010.10001111.00001000.00000001

255.255.255.128- 11111111.11111111.11111111.10000000

If you count number of 1 in the bitmask you will get total 25. So the mask of 255.255.255.128 can also be denoted as /25 as there are 25 bits that are set in the mask.

There is another method called CIDR. Classless Interdomain Routing (CIDR) was introduced to improve both address space utilization and routing scalability in the Internet. CIDR moves way from the traditional IP classes (Class A, Class B, Class C, and so on). In CIDR , an IP network is represented by a prefix, which is an IP address and some indication of the length of the mask. one of these networks can be described with the notation prefix/length. For example, 10.0.0.0/25 denotes the network 10.0.0.0 255.255.255.128

CIDR also depicts a more hierarchical Internet architecture, where each domain takes its IP addresses from a higher level. This allows for the summarization of the domains to be done at the higher level. For example, if an ISP owns network 203.17.0.0/16, then the ISP can offer 203.17.1.0/24, 203.17.2.0/24, and so on to their clients.

Class A subnet table and no of hosts/subnet

 

image

Source: Cisco

Class B subnet table and no of hosts/subnet

image

Source: Cisco

Class C subnet table and no of hosts/subnet

image

Source: Cisco

Real life implication

It is required to perform these sort of task as a network/systems administrator in any organisation. Consider, you work in a mid size organisation and you want to deploy 1500 desktop and 100 servers in an organisation. You have 80 network printers and iSCSI will be in operations. In this situation, I prefer to have 5 VLANs configured in core switch, distribution and access networks. why 5 because you need management vlan for all the switches you will be installing and rest four vlans. It is always good idea to get more IP then you need that will help you in future if your company expand.

Desktop:

Subnet Mask Subnet Size Host Range   Broadcast
10.10.8.0 255.255.248.0 2046 10.10.8.1  to  10.10.15.254 10.10.15.255

Server:

Subnet Mask Subnet Size Host Range   Broadcast
10.10.2.0 255.255.255.0 254 10.10.2.1  to  10.10.2.254 10.10.2.255

Printers:

Subnet Mask Subnet Size Host Range   Broadcast
10.10.3.0 255.255.255.128 126 10.10.3.1  to  10.10.3.126 10.10.3.127

iSCSI:

Subnet Mask Subnet Size Host Range   Broadcast
10.10.4.0 255.255.255.192 62 10.10.4.1  to  10.10.4.62 10.10.4.63

Management vlan

Subnet Mask Subnet Size Host Range   Broadcast
10.10.0.0 255.255.254.0 510 10.10.0.1  to  10.10.1.254 10.10.1.255

This is just an example and passing my time. It will definitely be different in your circumstances. Don’t worry about this binary and decimal calculation. Download solarwinds subnet calculator free tool and do it smooth as silk.

Leave a Reply

Your email address will not be published. Required fields are marked *