OU blog

Personal Blogs

2022_Profile_Pic_G_Muirhead

Classful Subnetting with IPV4 Addresses

Visible to anyone in the world

I just typed ipconfig /all into the cmd.

The following was returned

Connection-specific DNS Suffix  . : lan
   Description . . . . . . . . . . . : Broadcom 802.11n Network Adapter
   Physical Address. . . . . . . . . : 74-E5-43-7D-8B-65
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::39d0:ff36:ff66:2215%15(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.1.78(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : 26 January 2020 07:13:40
   Lease Expires . . . . . . . . . . : 27 January 2020 07:13:40
   Default Gateway . . . . . . . . . : 192.168.1.254
   DHCP Server . . . . . . . . . . . : 192.168.1.254
   DHCPv6 IAID . . . . . . . . . . . : 259319107
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-25-1D-01-86-D4-BE-D9-53-C6-37
   DNS Servers . . . . . . . . . . . : 192.168.1.254

I know it's beyond the scope of this module, that is subnetting;

My IPv4 Address is 192.168.1.78

I have a subnet mask of 255.255.255.0 --> this is a network, network, network. host pattern

which means I'm on the 192.168.1.0 network.

now if I had a subnet mask of 255.255.255.240 what do you think this means?

Answer:

I think it means I've sub-netted my default subnet mask, I've taken or stolen binary bit's from the  octet  host portion of my IPv4 address.

This means more networks but at a cost of less hosts.

This means in effect we are creating smaller subnetworks out of the larger one, dividing it up .

But realising that although you will increase the amount of networks, each range will hold a smaller amount of hosts per subnetwork.

 

how many bits did I steal to do this? 

Answer:

convert the custom subnet dotted decimal host portion to binary, 

 128 64 32 16 8  4  2    1     - binary values                       working

   1   1   1   1  0   0  0    0                                                   240 - 128 = 112

                                                                                         112  - 64 = 48

                                                                                           48  - 32 = 16

                                                                                           16  -   16    =  0

                                                                                          check: 128 + 64 + 32 + 16 = 240

                                                                                          111100002 =  24010  (denary value)

This means 4 bits where taken from the host  octet portion of the IPv4 address.

next question :

How many usable new subnetworks  does this give me?

to work this out : 

use formula : Number of subnets = 2s 

so 24 = 16 so 16 subnets.

How many hosts per subnet ?

use formula : Number of hosts per subnet = 2h -2

I originally had 8 bits in the host portion and 8 - 4 = 4 

so 24 - 2 = 14 

Total number of subnets (subnetworks) = 16

Total number of host address per subnetwork = 14 


workout the difference in binary between the default network address binary number and the 

custom subnetwork binary number: ( Note the count starts at 0 !)

                                                                                                                        Address Ranges per subnetwork

                               (0)       192.168.1. 0 0 0 0 . 0 0 0 0                                  192.168.1.0 - 192.168.1.15

                               (1)       192.168.1. 0 0 0 1 . 0 0 0 0                                  192.168.1.16 - 192.168.1.31

                               (2)       192.168.1. 0 0 1 0 . 0 0 0 0                                  192.168.1.32 - 192.168.1.47

                               (3)       192.168.1. 0 0 1 1 . 0 0 0 0                                  192.168.1.48 - 192.168.1.63

                               (4)       192.168.1. 0 1 0 0 . 0 0 0 0                                  192.168.1.64  192.168.1.79

                               (5)       192.168.1. 0 1 0 1 . 0 0 0 0                                  192.168.1.80 - 192.168.1.95

                               (6)       192.168.1. 0 1 1 0 . 0 0 0 0                                  192.168.1.96 - 192.168.1.111

                               (7)       192.168.1. 0 1 1 1 . 0 0 0 0                                  192.168.1.112 - 192.168.1.127

                               (8)       192.168.1. 1 0 0 0 . 0 0 0 0                                  192.168.1.128 - 192.168.1.143

                               (9)       192.168.1. 1 0 0 1 . 0 0 0 0                                  192.168.1.144 - 192.168.1.159

                              (10)      192.168.1. 1 0 1 0 . 0 0 0 0                                  192.168.1.160 - 192.168.1.175

                              (11)      192.168.1. 1 0 1 1 . 0 0 0 0                                  192.168.1.176 - 192.168.1.191

                              (12)      192.168.1  1 1 0 0 . 0 0 0 0                                  192.168.1.192 - 192.168.1.207

                              (13)      192.168.1  1 1 0 1 . 0 0 0 0                                  192.168.1.208 - 192.168.1.223

                              (14)      192.168.1  1 1 1 0 . 0 0 0 0                                  192.168.1.224 - 192.168.1.239

                              (15)      192.168.1  1 1 1 1 . 0 0 0 0                                  192.168.1.240 - 192.168.1.255

So to conclude there are a total of 16 subnets or 16 subnetworks, that counting from 0 to 15 which is like the range function in python index starting at 0 !

Within each subnetwork division there are 14 usable host addresses 

this is because each sub-network's starting address 

 per pool of IPv4 addresses is the address of that subnetworks address itself ! ( the lowest IPv4 address)

and the highest value address per pool of subnet-work addresses is that subnetwork's broadcast address.

 

                                                                                             



super-netting is the opposite more hosts but at cost of less networks.




Permalink
Share post

This blog might contain posts that are only visible to logged-in users, or where only logged-in users can comment. If you have an account on the system, please log in for full access.

Total visits to this blog: 27623