Search


Wednesday, September 29, 2010

Calculate Subnet mask and IP Address the easy way (VLSM)

Question:
Given the Class C IP address, 192.168.10.0/24, the number of users shown below, and the fact that subnet zero is considered to be the first subnet determine and write down the following:
Using the first subnet, determine the subnet address and mask for VLAN 40 (40 IP addresses).
Using the second subnet, determine the subnet address and mask for VLAN 30 (30 IP addresses).
Using the third subnet, determine the subnet address and mask for VLAN 20 (20 IP addresses).
Using the fourth subnet, determine the subnet address and mask for VLAN 10 (10 IP addresses).

Answers:
VLAN40
need 40 ip addresses:
closest 2^x: 64 where x=6. It means we need 6 zeros for the subnet mask.
Thus, subnet mask in binary: 11111111.11111111.11111111.11000000 (numbers of 1 = 24+2 = ip/ 26)
subnet mask in decimal: 255.255.255.(128+64)
                                   : 255.255.255.192
range: the smallest 1 in binary subnet mask = 64.
ip range for the VLAN 40= 192.168.10.0 - 192.168.10.64
broadcast address: 192.168.10.63
available ip addresses: 192.168.10.1 - 192.168.10.62

VLAN30
need 30 ip addresses:
closest 2^x: 32 where x=5. we need to save 5 zeros.
subnet mask in binary: 11111111.11111111.11111111.11100000 (numbers of 1= 24+3 = IP/27)
subnet mask in decimal: 255.255.255.(128+64+32)
                                   : 255.255.255.224
range : the smallest 1 in binary subnet mask= 2^5 = 32.
ip range for VLAN30: 192.168.10.64 - 192.168.10.96
broadcast address: 192.168.10.95
available ip addresses: 192.168.10.65 - 192.168.10.94

we can do the same for the next 2 with above method.