We'll take up subnetting today. Its a more conceptual topic relatively and goes deep in context of networking as a course with credits. We'll be learning it from bank exam's perspective only. Any doubts, use the comments section freely!
==>> Follow PK series for IT Officers
Subnetting is used to divide a single physical network into more than smaller logical subnetworks (Subnets). It allows more efficient utilization of the addresses. As we know an ip address contains a network part and a host part. In subnetting, host bits are borrowed by network bits to represent the sub networks inside a network. Class A,B and C have default subnet masks as follows:
Class A - 255.0.0.0 | 11111111 00000000 00000000 00000000
Class B - 255.255.0.0 | 11111111 11111111 00000000 00000000
Class C - 255.255.255.0 | 11111111 11111111 11111111 00000000
Apply subnet mask 255.255.0.0 to IP 10.0.0.0 (A class). The 255.255.0.0 borrows borrows a portion of host space of A and applies to network space thereby splitting one large network into 256 subnets from 10.0.0.0 to 10.255.0.0. Each subnetwork then will have 16 bits for host addresses instead of 24 bits which is default for A class addresses.
Variable Length Subnet Mask (VLSM)
According to this concept, the same network can be configured with different masks. We can have subnets of different sizes depending upon the requirement.
Lets consider a case where we have a class C network 220.127.116.11. We are required to divide it into 3 subnets for 3 diff departments of an office with 110, 45 and 50 hosts respectively.
Default subnet mask for C class is of the form 255.255.255.X.
We'll use the mask 255.255.255.128 to divide it into 2 subnets with 128 hosts each.
18.104.22.168 (.0 to .127) - 110 hosts for Dept 1 will be handled with this.
22.214.171.124 (.128 to .255) - requires further subnetting.
We'll now subnet the second one using a mask of 255.255.255.192 which will have 64 hosts for each subnet of 2nd subnet.
126.96.36.199 (.128 to .191) - 45 hosts for Dept 2
188.8.131.52 (.192 to .255) - 50 hosts for Dept 3
Here a diagrammatic representation below will make it more clear to you.
Classless Inter-Domain Routing (Supernetting)
- Introduced due to growing demand of IP addresses and wastage of addresses space.
- More flexible way of allocating IPs than traditional class based approach.
- Reduces size of routing tables.
- An IP address is followed by '/ number' called the IP network prefix.
- 'Number' represents the leftmost bits that make the network part of the address leaving remaining bits for hosts. Ex- 184.108.40.206 / 22 indicates that 22 bits are for network and remaining 10 for hosts.
- Supported by BGP and OSPF, not supported by RIP
In this algorithm, routers know about their neighbors and their costs to different subnets that they have to reach.
Time Complexity- O(N3)
In this algorithm, all the routers in a network have knowledge of complete network. This is also called link state algorithm.
Time Complexity - O(N2)
Flyod Warshall Algorithm
In this algorithm, all nodes can be a source and it finds the shortest path between all pairs of vertices in a graph. It is much slower than the other two algorithms.
Time complexity- O(N3)
Fun Internet Fact of today
The house of Bill Gates was designed using a Macintosh Computer.
(he seems to be an apple fan too, lol!)
SBI PO Smart Prep Kit by Ramandeep Singh - Get here