Consider the following Scenario and Create Subnets
- Overview
Overall Network Size: 5600
number of host bits: 13
number of network id bits: 32-13 = 19
the choosen cidr range: 172.16.0.0/19
subnet mask of network: 11111111.11111111.11100000.00000000
each subnet requires ~= 700
number of host bits: 10
number of network id bits: 32-10: 22
subnet mask of network: 11111111.11111111.11100000.00000000
subnet mask of subnet: 11111111.11111111.11111100.00000000
--------------------------------------------------------------
11111111.11111111.111xxx00.00000000
xxx => 000,001,010,011,100,101,110,111
Now lets write our network ip cidr in binary
172.16.0.0 => 10101100.00010000.000xxx00.00000000
xxx => 000 => 10101100.00010000.00000000.00000000 => 172.16.0.0/22
xxx => 001 => 10101100.00010000.00000100.00000000 => 172.16.4.0/22
xxx => 010 => 10101100.00010000.00001000.00000000 => 172.16.8.0/22
xxx => 011 => 10101100.00010000.00001100.00000000 => 172.16.12.0/22
xxx => 100 => 10101100.00010000.00010000.00000000 => 172.16.16.0/22
xxx => 101 => 10101100.00010000.00010100.00000000 => 172.16.20.0/22
xxx => 110 => 10101100.00010000.00011000.00000000 => 172.16.24.0/22
xxx => 111 => 10101100.00010000.00011100.00000000 => 172.16.28.0/22
Routing
- Router is a device which can forward the network packets from one network to other.
- Default Gateway in ipconfig refers to the ipaddress of the router.