90 likes | 295 Views
Subnets. Subnetting a Class C Move mask to the right 11111111.11111111.11111111.0 If I need 4 Subnets I need two bits 00, 01, 10 and 11 binary or 0, 64, 128, 192 in decimal 11111111.11111111.11111111.11000000. Change to this bit new subnet “step 64”. Subnet a Class C. First subnet
E N D
Subnets • Subnetting a Class C • Move mask to the right • 11111111.11111111.11111111.0 • If I need 4 Subnets I need two bits • 00, 01, 10 and 11 binary or • 0, 64, 128, 192 in decimal • 11111111.11111111.11111111.11000000 Change to this bit new subnet “step 64”
Subnet a Class C • First subnet • 1 -62 Hosts • .0 subnet ID • .63 Broadcast • 2nd subnet • 65 - 126 Hosts • .64 subnet ID • .127 Broadcast
Subnets linear view .0 subnet id .1 first host 0 64 .62 last host .63 subnet broadcast 128 .192 subnet id .193 first host 192 .254 last host .255 subnet broadcast .256 NEW CLASS C!!! 256
Size of subnet mask Two competing rules 2N = Number of sunets N is number of subnet bits 2N-2= Number of hosts N is number of host bits Note the -2 is to reserve the subnet ID and the Broadcast
Class C subnets Class C Effective Effective # bits Mask Subnets Hosts ------- --------------- --------- --------- 0 255.255.255.0 1 254 1 255.255.255.128 2 126 2 255.255.255.192 4 62 3 255.255.255.224 8 30 4 255.255.255.240 16 14 5 255.255.255.248 32 6 6 255.255.255.252 64 2 ***Below are special case /31 not used (much) /32 255.255.255.255 for Host loopback subnet 7 255.255.255.253 128 2 8 255.255.255.255 256 1 1 1 1 1 1 1 1 1 128 64 32 16 8 4 2 1 (128+64+32+16+8+4+2+1=255)
Class B subnets Class B Effective Effective # bits Mask Subnets Hosts ------- --------------- --------- --------- 1 255.255.128.0 2 32766 2 255.255.192.0 4 16382 3 255.255.224.0 8 8190 4 255.255.240.0 16 4094 5 255.255.248.0 32 2046 6 255.255.252.0 64 1022 7 255.255.254.0 128 510 8 255.255.255.0 256 254 9 255.255.255.128 512 126 10 255.255.255.192 1024 62 11 255.255.255.224 2048 30 12 255.255.255.240 4096 14 13 255.255.255.248 8192 6 14 255.255.255.252 16384 2
Calculating the MASK All masks the same size • Start with a class C 192.168.10.0 • Requirements are 6 networks 18 hosts • How many bits for subnet? • 2N = number of subnets N is number of bits in the subnet part of the mask • How many bits for Hosts? • 2N -2 = number of hosts • 3 Bits subnet 255.255.255.224 8 subnets • 30 hosts each 2 raised to the 5th power -2