add_action('wp_footer', function () { echo ''; }, 99);
add_action('wp_footer', function () { echo ''; }, 99);
The post What is Subnetting and general understanding appeared first on Coding Sips.
]]>Subnetting is breaking up one large physical network into more than one small logical networks, in other words partitioning large network into many small networks.
Physically all the hosts remains at same position and location but logically they are member of different networks. and after Subnetting now they have different access levels.
In many organizations there are multiple departments, they all need different access level to public and private networks, some departments have shared data for other departments, some need high speed internet connection, some of them have highly confidential data which needs to be strictly secured.
I such cases if they make every thing secure they will might loose data sharing or high speed internet to those who require it, similarly looking at each department you will find them different from another.
that why we need to divide one large network into many small networks. and keep each department into that small logically separate network, we can divide each small network into further sub networks too. this way we can assign different policies to each sub network as it is logically different that other sub networks so the policies applied to one sub-network will not affect other network directly.
The following are advantages of Subnetting
I can’t guess disadvantages of Subnetting
It is just to connect a subnetwork hosts to separate switch/router/firewall and change their IPs/subnetmask.
Before starting calculating we must have a bit knowledge about networking. that is
By default we get one network, we can divide it into the following using given subnetmask and CIDR. (Consider CIDR is short form of subnetmask for now).
| Subnetmask | CIDR | Total Networks | IPs in each network |
|---|---|---|---|
| 255.255.255.254 | /31 | 128 | 2 (both can be used in special cases) |
| 255.255.255.252 | /30 | 64 | 4 (4-2 hosts) |
| 255.255.255.248 | /29 | 32 | 8 (8-2 hosts) |
| 255.255.255.240 | /28 | 16 | 16 (16-2 hosts) |
| 255.255.255.224 | /27 | 8 | 32 (32-2 hosts) |
| 255.255.255.192 | /26 | 4 | 64 (64-2 hosts) |
| 255.255.255.128 | /25 | 2 | 128 (128-2 hosts) |
| 255.255.255.0 | /24 | 1 | 256 (256-2 hosts) |
Form the above table you can decide which type of subnetwork you need, how many subnetworks you need and how many hosts you need. It is not mandatory to have all same size subnetworks, you can go with 1 subnetwork of 128 IPs, 1 subnetwork of 64 IPs and subnetorks 2 of 8 IPs but IPs in all those subnetworks should not repeat.
In above example I took 192.168.0.0 if your IP is different you can use Subnetting calculator to get your possible networks, which will provide you all IP ranges in each subnetwork. I have also created an online free Subnetting calculator at subnetting-calc.codingsips.com/ you an use that.
Internally it is all calculated in binaries, I am not very good to explain it here, but I learnt and coded Subnetting calculator by glancing at above table.
Look at above table and try to reverse-engineer and try to make algorithm for it.
Just note and remember in IP octects we can give 0 to 255 which becomes 256. 256 is lucky number here.
Look at each column try to break the pattern, it all changes with 2 power n and than subtrict or divide by 256
| Row 1 | 2 power 1 = 2 IPs in n/w | 256/2=128 Total Networks | 256-2 = 254 subnetmask octect |
| Row 2 | 2 power 2 = 4 IPs in n/w | 256/4=64 Total Networks | 256-4 = 252 subnetmask octect |
| Row 3 | 2 power 3 = 8 IPs in n/w | 256/8=32 Total Networks | 256-8 = 248 subnetmask octect |
| Row 4 | 2 power 4 = 16 IPs in n/w | 256/16=16 Total Networks | 256-16 = 240 subnetmask octect |
| Row 5 | 2 power 5 = 32 IPs in n/w | 256/32=8 Total Networks | 256-32 = 224 subnetmask octect |
| Row 6 | 2 power 6 = 64 IPs in n/w | 256/64=4 Total Networks | 256-64 = 192 subnetmask octect |
| Row 7 | 2 power 7 = 128 IPs in n/w | 256/128=2 Total Networks | 256-128 = 128 subnetmask octect |
| Row 8 | 2 power 8 = 256 IPs in n/w | 256/256=1 Total Networks | 256-256 = 0 subnetmask octect |
I am sure if you read it few time and look at last two tables side by side you will understand. I would suggest you to open same link in 2 tabs or browsers and analyze side by side.
do not forget to play with my mysbetting calculator at subnetting-calc.codingsips.com/
I have developed android application named
Subnet Calc it is simple having decent layout and animation, try it I am sure you will this app.
The post What is Subnetting and general understanding appeared first on Coding Sips.
]]>