Subnetting Help

What is Subnetting?
• When one network address needs to be used across multiple LAN segments.
• Advantages
– Easier network administration
– Faster troubleshooting
– Security
Subnet Mask
• The subnet mask divides address into network, subnet and host IDs
• Example: 255.255.255.240
– 1’s represent the network and subnet portion
– 0’s represent the hosts
Address Classes
There are three address classes
– Class A 1-126 N.H.H.H
– Class B 128-191 N.N.H.H
– Class C 192-223 N.N.N.H
• Determines the number of hosts you can have per network
• Part of the subnet mask is determined by the class
Binary
• Use the binary format to write out your subnet mask
• Allows you to see how the bits are distributed
• Example:
– Dotted decimal - 255.255.255.240
– Binary
11111111.11111111.11111111.11110000

Caution!!
192.168.0.75 IP address
255.255.255.240 Subnet mask
We can tell this is a class C address by looking at the first octet of the IP address. The subnet mask tells us that the first three octets will remain unchanged when determining the subnet address.
Do note that the IP address is a class C address also, but it is possible for it to be on a class B subnet so be careful when making this determination!!!
Things to memorize
When subnetting there are a few things that you must commit to memory:
– Address classes
– The powers of 2 up to at least 8
– The binary conversion chart (This chart will help you convert your addresses into binary and will make following the seven steps much faster and easier.)

The 7 Steps to Subnetting

• Determine address class
• Use formula to determine bits borrowed and host bits remaining
• Determine the interval using the Magic Number
• Determine the subnet address
• Find the first host by adding 1 to the subnet address [last octet]
• Determine the broadcast address by subtracting 1 from the next subnet address [from last octet]
• Find the last host by subtracting 1 from the last octet of the broadcast address

Stealing Bits
• In order to subnet, we must steal or “borrow” bits from the host portion on the IP address.
• How many subnets do we need and/or how many hosts per subnet.
• We do this using the powers of 2
– For example, I need 8 subnets from a Class C:
• 24 = 16 - 2 = 14 subnets
• Subtract 2 because one address is the subnet address and one is the broadcast address
– How many hosts do we have?
• It’s a Class C, so 4 bits are left: 24 = 16 - 2 = 14 hosts
Subnet Mask
• We determine the subnet mask by adding up the decimal value of the bits we borrowed.
• In the previous Class C example, we borrowed 4 bits. Below is the host octet showing the bits we borrowed and their decimal values.
Subnetting: an example
192.168.0.75 255.255.255.240
• Class C
• The Formula tells you:
• # of subnets
• # of hosts
• (2x-2) when x is the # of bits used
• Subnets – change to 1s
• Hosts – remaining 0s
• 256-240=16 interval, 16+16=32+16=48+16=64+16=80
IP address 192.168.0.75
Subnet 255.255.255.240
64 will be used as the last octet in the subnet address because it is as close to 75 as we can get without going over.

• SA=192.168.0.64
• Remember that this is a class C address and the first three octets remain the same.
• FH=192.168.0.65
• Add 1 to the last octet in the SA (subnet address) the FH (first host) is determined
• Next SA (subnet address) will be 192.168.0.80
• Used to determine our broadcast address by subtracting 1 from the last octet
• BC (broadcast address) =192.168.0.79
• The LH (last host) determined by subtracting 1 from the last octet in the BC (broadcast address)
• LH=192.168.0.78
Now you just need to put it all together.

192.168.0.75 IP address
255.255.255.240 Subnet Mask
# of networks=14 # of hosts/network=14
SA=192.168.0.64
FH=192.168.0.65
LH=192.168.0.78
BC=192.168.0.79