Monday 9 November 2015

IPv4 Subnetting

IPv4 address consists of 32-bit binary numbers and it is represented in decimal number such as 192.168.15.100. Each octet contains 8-bit, hence maximum numbers for each octet is 255. It is important as a network engineer to identify classes of IP address. Table 1 and Table 2 show IP address classes and the details of IP classes correspondingly. As mentioned earlier in the article ‘Introduction to IP Addressing’, we already know that the address 192.168.15.100 is a private address. ‘NAT’ or Network Address Translation in a router will convert private addressing to the real addressing.



From Table 1, we can identify that Class A contains the biggest amount of hosts compared to other classes. It means that Class A can support maximum 16,777,214 hosts. How do we get this number? The host portion for Class A is 24-bits. Thus, 224 = 16,777,216. However, we have to subtract two from it due to the value of broadcasting and network addresses. Then, we can get maximum hosts for Class B and C are 216­-2 and 28-2 correspondingly. Broadcasting address is an address which consists all ones in host portion, while network address is an address that consists all zeros in host portion. From Table 1 also, we can identify that Class C contains the biggest number of subnets compared to other classes. For Class A, we get the value of subnets with 28-1-1=127, Class B 216-2=16,384 and Class C 224-3=2,097,152.

Figure 1 is an example of the network for Class B. As a network engineer, we know that 131.108 is the network portion and the rest are the hosts’ portion. However, the host portion is used for subnetting to create more subnets within the network. 131.108.3.0, 131.108.2.0 and 131.108.1.0 are represented as network addresses for each LANs. We can assume that the first octet for host portion is used for subnetting. Default subnet mask for Class B is 255.255.0.0. For this network, it changes to 255.255.255.0 because of the first octet of host portion is used for subnetting. Figure 2 shows the Class B which is used for subnetting.

Subnetting is a technique where network administrator borrows bits from host portion to create subnetworks (subnets). Followings are the rules of borrowing bits from host portion:
                                i)            Class A address consists of 24 host bits:
We can borrow between 2 to 22 bits for a subnet ID.
                               ii)            Class B address consists of 16 host bits:
We can borrow between 2 to 14 bits for a subnet ID.
                             iii)            Class C address of 8 host bits:
We can borrow between 2 to 6 bits for a subnet ID.

If we are given the IP address with subnet mask, we can get the Network Address by ‘AND’ed both addresses. For instance, an IP address is 131.108.2.2 and the subnet mask is 255.255.255.0 (same example as before). Figure 3 is the solution to get the network address. Finally the network address is 131.108.2.0 and we can easily get the broadcast address that is 131.108.2.255. We can list the first host address until the last host as follows:
First host : 131.108.2.1
2nd host: 131.108.2.2
Last host: 131.108.2.254

For this network, we can list other subnets as shown in Table 3.

Let’s take a look at this example shown in Figure 4. IP packet destination is 130.29.5.7. Because this address is of Class B, it routes to address 130.29.0.0. Within the 130.29.0.0 network, we route to 130.29.X.0 where X is the subnet. This is done by using a subnet mask which extends the range of bits representing the network. Only the router with network address of 130.29.5.0 will share the information with the adjacent routers so that the packet can be delivered to its destination as illustrated in Figure 5.


Reference:

Prepared by:
Siti Sara Binti Rais

12 comments:

  1. Amazing blog about the various informative information on the programming languages. Devops Training in Chennai | Devops Training Institute in Chennai

    ReplyDelete
  2. I am obliged to you for sharing this piece of information here and updating us with your resourceful guidance. Hope this might benefit many learners. Keep sharing this gainful articles and continue updating us.
    Web Designing Course in chennai
    PHP Training in Chennai
    web designing courses
    web development courses
    PHP Training Center in Chennai
    PHP Institutes in Chennai

    ReplyDelete
  3. Interesting blog, it gives lots of information to me. Thanks for sharing such a nice blog.

    superbfacts
    Technology

    ReplyDelete
  4. Very very informative. Thank you

    ReplyDelete