Sub Netting
Sub Netting
Internet Assigned Numbers Authority (IANA) (http://www.iana.net) is the master holder of the IP addresses. Today, the remaining IPv4 address space has been allocated to various other registries to manage for particular purposes or for regional areas. Regional Internet Registries (RIRs)
3
Subnetting Basics
To create subnets, some host bits are reassigned, or borrowed as network bits. Always start borrowing with the leftmost host bit, the one closest to the last network octet. Subnetting provides
Addressing flexibility Broadcast containment (smaller Broadcast domains) Low level LAN security
Class C example
Write out the binary for the following address, borrowing 3 bits for subnets: 192.168.10.0 black = network; red = sN; green = host Class address first
11000000.10101000.00001010.00000000 11000000.10101000.00001010.00000000
6
Class B example
Write out the binary for the following address, borrowing 5 bits for subnets: 147.10.0.0 Class address first
10010011.00001010. 00000000.00000000 10010011.00001010.00000000.00000000
Class A example
Write out the binary for the following address, borrowing 12 bits for subnets: 28.0.0.0 Class address first
00011100. 00000000. 00000000.00000000 11000000.00000000.00000000.00000000
Subnet Mask
The subnet mask gives the router the information required to determine in which network and subnet a particular host resides. The subnet mask is created by using binary ones in the network and subnet bits, and zeros in the host bits.
Subnet Mask
Class A = 255.0.0.0 Class B = 255.255.0.0 Class C = 255.255.255.0 If three bits were borrowed, the mask for a Class C address would be 255.255.255.224 or 255.255.255.224/27 The fourth octet, 224 = 11100000
10
Subnet Mask
The /27 = the total network (and subnet bits)
For a Class C this means 3 bits are borrowed; 8+8+8+3 For a Class B this means 11 bits are borrowed; 8+8+8+3 For a Class A this means 19 bits are borrowed; 8+8+8+3
11
12
Subnet Mask
To determine the number of bits to borrow:
Calculate how many hosts the largest subnet requires Calculate the number of subnets needed
13
Usable Subnets
Number of usable subnets = two to the power of the assigned subnet bits, or borrowed bits, minus two.
2power of borrowed bits - 2 = usable subnets
Borrow 3 bits: 23 - 2 = 6 usable subnets Borrow 4 bits: 24 - 2 = 14 usable subnets Borrow 5 bits: 25 - 2 = 30 usable subnets Borrow 6 bits: 26 - 2 = 62 usable subnets
14
Usable Hosts
Number of usable hosts = two to the power of the bits remaining, minus two (reserved addresses for subnet id and subnet broadcast). 2 x power of remaining host bits - 2 = usable hosts
3 bits borrowed, leaves 25 - 2 = 30 hosts 4 bits borrowed, leaves 24 - 2 = 14 hosts 5 bits borrowed, leaves 23 - 2 = 6 hosts 6 bits borrowed, leaves 22 - 2 = 2 hosts
15
0
1 2 3 4 5 6
.33-.62
.65-.94 .97-.126 .129-.158 .161-.190 .193-.222
192.168.4.128
192.168.4.160 192.168.4.192
192.168.4.159
192.168.4.191 192.168.4.223
192.168.4.224
.225-.254
192.168.4.255
16
0
1 2 3 4 5 6
.9-.14
.17-.22 .25-.30 .33-.38 .41-.46 .49-.54
192.168.26.32
192.168.26.40 192.168.26.48
192.168.26.39
192.168.26.47 192.168.26.55
192.168.26.56
.57-.62
192.168.26.63
17
18
Is this a Class A, Class B or Class C address? C Therefore how many bits make up the Network portion? 30 30 How many bits are in the Subnet Mask? 2 How many bits are left for Host addresses? How many separate addresses in each subnet? 2 usable Which address represents the whole subnet? 192.168.100.24 Which address is used to broadcast to the subnet? 192.168.100.27 Which addresses are left in the valid host range? 192.168.100.26 20