subnet calculator by smbutt

VIEWS: 356 PAGES: 4

• pg 1
```									Subnetting And Host Calculation
To Calculate The Subnet Mask For A Specific Number Of Networks:
Method:

1. 2. 3. 4. 5. 6.

Required Nets + 1 = N Convert N To Binary Count The Total Number Of Bits Necessary To Represent N = M Turn M Hi-Order Bits On Convert To Decimal Combine With The Default Subnet Mask For The Class Of Address You Are Working With

Eg: Reguired Nets = 3

1. 2. 3. 4. 5. 6. 7. 8.

3 + 1 =4 00000100 3 11100000 224 Class A = 255.224.0.0 Class B = 255.255.224.0 Class C = 255.255.255.224

Calculate Maximum Number Of Networks Given A Specific Subnet Mask ( # Of Bits In The Subnet Mask) 2 Minus 2

Eg:

 

Mask = 255.224.0.0 224 = 11100000 (3)



2



8 –2=6

Calculate The Maximum Number Of Hosts For A Given Subnet Mask (# Of Host Bits) 2
Eg:

Minus 2

 

Mask 255.224.0.0 Number Of Host Bits = 5 + 8 + 8 = 21 21



2

-- 2 = 2097152 – 2 = 2097150 Hosts Per Subnet

Calculate The Subnet Ids For A Given Subnet Mask
Method 1:



256 – Mask = 1st Net And Increment Between Each Network Id

Method 2:

 

Convert Mask To Binary Value Of The Lowest Bit In The Subnet Mask = Increment And 1 st Network Id

Eg:

Method 1



256 –224 = 32

Method 2
 224 = 11100000 5  Lowest Bit In Mask = 2 = 32

Calculate Host Ranges Per Subnet For A Given Mask



Net Address = 13.0.0.0          Mask = 255.224.0.0 256 – 224 = 32 Total Number Of Nets = 8 - 2 = 6 1st Net 2nd Net 3rd Net 4th Net 5th Net 6th Net 13.32.0.0 13.64.0.0 13.96.0.0 13.128.0.0 13.160.0.0 13.192.0.0 Hosts = 13.32.0.1 To 13.63.255.254 Hosts = 13.64.0.1 To 13.95.255.254 Hosts = 13.96.0.1 To 13.127.255.254 Hosts = 13.128.0.1 To 13.159.255.254 Hosts = 13.160.0.1 To 13.191.255.254 Hosts = 13.192.0.1 To 13.223.255.254

Given A Mask & Host Id Determine The Host Range For The Network The Host Is On.



Mask = 255.224.0.0 Host Id = 13.182.154.123

      

256 – 224 = 32 182 / 32 = 5.6875 Host Is On The 5th Network 32 * 5 = 160 Network Id = 13.160.0.0 Next Network Id = 13.192.0.0 Host Range For The 5th Network = 13.160.0.1 To 13.191.255.254

Q. You Have An Ip Of 156.233.42.56 With A Subnet Mask Of 7 Bits. How Many Hosts And Subnets Are Possible? Ans. 510 Hosts And 126 Subnets Explanation: Class B Network Has The Form N.N.H.H, The Default Subnet Mask Is 16 Bits Long. There Is Additional 7 Bits To The Default Subnet Mask. The Total Number Of Bits In Subnet Are 16+7 = 23. This Leaves Us With 32-23 =9 Bits For Assigning To Hosts. 7 Bits Of Subnet Mask Corresponds To (2^7-2)=128-2 = 126 Subnets. 9 Bits Belonging To Host Addresses Correspond To (2^9-2)=512-2 = 510 Hosts.

```
To top