You are on page 1of 35

Subnetting & VLSM

Ohio Academy Conference Tri-Rivers Education Computer Association February 26-27, 2009
Will Bailey Assistant Professor Electrical/Electronics Engineering Technology Zane State College wbailey@zanestate.edu

Why are we all here?

Why Subnet?

Why Variable Length Subnetting?

Address Classes

Dont forget about D & E (Multicast & Experimental)

Steps to Subnet
1.

2.

Determine either the number of subnets needed OR the minimum number of hosts in each subnet. Borrow the appropriate number of bits
Every bit borrowed doubles the number of networks (subnets) created. Dont forget about the network and broadcast addresses when calculating hosts

3.

List all of the newly created networks with their appropriate subnet mask

Steps to SubnetContd.
4.

I like to have the students list the network, first and last usable, and the broadcast address for ALL subnets (within reason at least until I know they understand what is going on) Thats it (for plain old subnetting)! Lets do an example

Important addresses in a subnet

Subnetting Example #1
Given: 198.30.109.0 /24, we need to address a network like the one shown here, while maximizing the hosts per subnet:

Subnetting Example #1
y

How many bits need borrowed?


First determine how many networks are needed, 2X # of needed networks. We need 3 networks which requires 2 bits

If we borrow only 2 bits, how many still remain? (32-24 = 8 total bits to work with, we borrowed 2 of them. y This leaves 6 bits for the host portion of the subnet mask. 26 yields 64 hosts/sub
y

Subnetting Example #1
Lets write out the list of subnets including: network, first and last usable, and broadcast addresses. y Now what? Weve subnetted. Thats all well and good, but what do we do with the newly created subnets?
y

Assign usable addresses to your hosts and router interfaces Lets go back to our topology diagram

Subnetting Example #1
y

Each router interface defines a UNIQUE network address and therefore requires a usable address from its own subnet (usually the first one).

Determining a network address


y

What if were given an existing IP address and Subnet Mask combination and were asked to determine its network address and whether or not the address is usable?

CCNA Curriculum says


y

Find the Network Address


Traditionally done like this (using binary)

I prefer to do it this way (sometimes)


172.16.132.70 /20 y Convert CIDR notation into dotted decimal which yields: 255.255.240.0 y Logically AND the two
If SM=255, entire octet falls through If SM=0, nothing falls through

This leaves only the Interesting Octet


x Defined as the last one from which a bit was borrowed (the third octet in this example)

Contd on next slide

Contd
Take the interesting octet and subtract it from 256. This yields the number to increment for each network, in that octect. (256-240 = 16) y Next, divide the matching octet from the IP address by that number. This will yield the network number. (132/16 = 8. This gives us 8*16 = 128 Can also count by 16 from .0) The network address is 172.16.128.0 /20.
y

Contd
y

Any recommendations for a different strategy?


Binary method interesting octet method ???

Tools available in the curriculum


y

This is an exercise out of the CCNA1 Exploration curriculum, Chapter 6, page 6.2.2 (page 2).

Page 6.5 also has a great practice activity for determining network addresses

Example 1
192.168.1.0/24 We need two subnets How many bits do we borrow? How many subnets does this create? What are they?

Solution to Example 1
1 bit borrowed creating a /25 and 2 subnets y 192.168.1.0/25 y 192.168.1.128/25
y

Example 2
192.168.1.0/24 We need three subnets How many bits do we borrow? How many subnets does this create? What are they?

Solution to Example 2
2 bits borrowed creating a /26 and 4 subnets y 192.168.1.0/26 y 192.168.1.64/26 y 192.168.1.128/26 y 192.168.1.192/26 y Have your students memorize 1 bit, 2 bits, 3 bits and 4 bits borrowed. .128, .192, .224, & .240
y

Example 3
192.168.1.0/24 We need seven subnets How many bits do we borrow? How many subnets does this create? What are they?

Solution to Example 3
y y y y y y y y y

3 bits borrowed creating a /27 and 8 subnets 192.168.1.0/27 192.168.1.32/27 192.168.1.64/27 192.168.1.96/27 192.168.1.128/27 y /27 = 255.255.255.224 192.168.1.160/27 y Once .224 is reached, 192.168.1.192/27 STOP! 192.168.1.224/27

Example 4
192.168.1.0/24 We need twelve subnets How many bits do we borrow? How many subnets does this create? What are they?

Solution to Example 4
4 bits borrowed creating a /28 and 16 subnets y 192.168.1.0/28 y 192.168.1.128/28 y 192.168.1.16/28 y 192.168.1.144/28 y 192.168.1.32/28 y 192.168.1.160/28 y 192.168.1.48/28 y 192.168.1.176/28 y 192.168.1.64/28 y 192.168.1.192/28 y 192.168.1.80/28 y 192.168.1.208/28 y 192.168.1.96/28 y 192.168.1.224/28 y 192.168.1.112/28 y 192.168.1.240/28

Lets do some VLSM


y

First the rules:


1. Think of it as subnetting a subnet 2. Do NOT use any addresses more than once 3. Think how many am I wasting? while still meeting your requirements 4. Organize your requirements from largest to smallest networks and begin subnetting

Lets refer to the handouts

Now what if:


y

These are our requirements (refer to the topology diagram:


In order to minimize wasted addresses we need to implement VLSM
x Start with the largest network and work your way to the point-to-point serial links

VLSM Solution
y

Here are the answers (at least one possible solution)

VLSM Solution
Do you understand why these addresses were chosen and applied to the interfaces as shown?
Device Interface Fa0/0 HQ Fa0/1 S0/0/0 S0/0/1 Fa0/0 Branch1 Fa0/1 S0/0/0 S0/0/1 Fa0/0 Branch2 Fa0/1 S0/0/0 S0/0/1 IP Address 192.168.1.1 192.168.1.65 192.168.1.225 192.168.1.229 192.168.1.129 192.168.1.161 192.168.1.226 192.168.1.233 192.168.1.193 192.168.1.209 192.168.1.234 192.168.1.230 Subnet Mask 255.255.255.192 255.255.255.192 255.255.255.252 255.255.255.252 255.255.255.224 255.255.255.224 255.255.255.252 255.255.255.252 255.255.255.240 255.255.255.240 255.255.255.252 255.255.255.252 Default Gateway N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A

Id prefer to do it this way


y

I break my last subnet into /30s. (not the same problem)


8 16 4 4

Example: 192.168.1.0/24 (256 total addresses)

32 192.168.1.0/27 128 192.168.1.32/27 192.168.1.64/27 192.168.1.96/27 192.168.1.128/27 192.168.1.160/27 64 192.168.1.192/27 192.168.1.224/27

VLSM Example

VLSM Example

Device

Interface Fa0/0

IP Address

Subnet Mask

Default Gateway N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A

HQ

Fa0/1 S0/0/0 S0/0/1 Fa0/0

Branch1

Fa0/1 S0/0/0 S0/0/1 Fa0/0

Branch2

Fa0/1 S0/0/0 S0/0/1

Any questions?

Thank you all for your participation!

You might also like