teaching ip subnetting. i am trying to sell you something… ◦ i am trying to sell you a...

49
Teaching IP Subnetting

Upload: reyna-selwyn

Post on 15-Dec-2015

223 views

Category:

Documents


1 download

TRANSCRIPT

Teaching IP Subnetting

I am trying to sell you something…◦ I am trying to sell you a methodology for

teaching subnetting◦ I am trying to sell you on the “cheat sheet”

method of figuring out subnetting problems◦ If you like the method…GREAT!◦ If you would like to use the book…GREAT!

Disclaimer

We are not here to teach!◦ We are here to facilitate learning◦ Do your best to ensure a good learning

environment Teach slowly and in small vignettes of

information Assume nothing - start at square one.

Docindo Dicimus!

Subnetting is a “new” language and like learning a new language, it takes time.

YOU must understand subnetting to effectively teach it.

I asked my class:◦ What is it about IP addressing that makes it so

hard for most people to understand?

Why is subnetting so dang hard?

I think that the main problem most individuals have is the issue of translating an IP address to binary and back from it. It is hard for people to switch their thinking from one numeric system to another.

It may have been simple when it was first set up, but since the Internet grew faster and bigger than expected they needed to add subnetting and supernetting in order to accommodate the additional addresses needed. So understanding how and when to use subnetting and supernetting is what is difficult for me.

I think the hardest thing to grasp is, sub-netting, super-netting, moving to the right or left, or the different formulas in general. When siting in class going over everything, I'm right there with you, understanding how it works. I get home and work with it myself, I forget everything we went over.

I personally don't find IP addressing in and of itself hard to understand. Sub-netting however leaves me drooling like a moron. The IP address is the simple part of the equation.

Why is subnetting so dang hard?

The biggest problem is figuring out what they were asking for. Number of Hosts number of networks, or number of subnets, add to the left or the right, are they usable or total number. The cheat sheet helps a lot if you know what they are asking for.

The hardest problem is the super netting and the subneting, when it is explained it looks easy, but when it is turned into story problems I just cant seem to know where to start.

I think IP addressing became more difficult over time with the addition of subnetting and supernetting. The basic concept was easy to understand, but when trying to figure out subnetting and supernetting it gets more confusing.

I know the hardest part for me to grasp was looking at the different numbers in the story problems and not thinking about them in binary but rather in decimal. Once I started changing everything into binary it was a lot easier for me to understand what was going on. Then it just got even easier when I started using the cheat sheet.

Why is subnetting so dang hard?

Start simple!

Let’s teach subnetting!

Chapter 2:What is a Network Address?

• Network addresses are binary representations of a special numbering system used to find devices on the internet

• Machines do not speak our language and do not know what decimal numbers (i.e. 1,2,3,4,5 etc) are• Binary - - the language of computers• I = on 0 = off

• Each part of a binary address (BIT) is a placeholder

128 64 32 16 8 4 2 1

I I 0 I 0 I I I

Therefore:

I I O I O I I I = 128 + 64 + 16 + 4 + 2 + 1 = 215

We sum the placeholders with a one and ignore the placeholders with a zero

What is a Network Address?

0000001000010000000011111000000011111111111111100110001100000000Cannot be done with 8 bits!

Convert the following to binary using 8 bit positions:

21615128255254990300

Reference pg 9 IP Subnetting Made Easy

Set the 1st lesson aside – this is a new lesson

Do not overwhelm the student

STOP!

What is a Network Address? (cont)

• Rules for IP addresses:• 32 bits • 4 sections called octets• Dotted decimal format• Divided into a network portion and a host portion• IP addresses range from 0 to 255

(128+64+32+16+8+4+2+1=255)

Network addresses may look like this to us . . .

128.32.15.22

. . . but they look like this to a computer:

10000000.0010000.00001111.00010110

What is a Network Address? (cont)

• Given the address of 128.32.15.22 . . . . .

128 64 32 16 8 4 2 1 I 0 0 0 0 0 0 0

128 64 32 16 8 4 2 1 0 0 0 I 0 I I 0

128 64 32 16 8 4 2 1 0 0 1 0 0 0 0 0

128 64 32 16 8 4 2 1 0 0 0 0 I I I I

128

32

15

22

128 + 0 = 128

32 + 0 = 32

8 + 4 + 2 + 1 = 15

16 + 4 + 2 = 22

This is why 128.32.15.22 = 10000000.00100000.00001111.00010110

Set the 2nd lesson aside – this is a new lesson – time for a mental stop

Again, do not overwhelm the student

STOP!

120.19.0.12130.15.16.1710.0.0.015.255.255.011.254.254.255

Counting IP addresses (aka the odometer)

• Note: Binary counting ALWAYS starts with a “0”, not a “1”. Also, counting like this does NOT apply to subnet masks

120.19.0.13130.15.16.1810.0.0.115.255.255.111.254.255.0

120.19.0.11130.15.16.169.255.255.25515.255.254.25511.254.254.254

What is a Network Address? (cont)

• Network addresses consist of two parts• Network address• Host or node address

• Similar to an address for your home/business

128.32.15.22

Network Address Host Address

12050 Main StreetAnytown, MI 48300

Regional Address

Street Address

• Networks are like this; we have a few big cities with lots of homes and lots of small cities with few homes.

Topic Review

IP address

10.1.2.1100.100.100.100129.129.129.129172.16.100.1192.0.0.1130.175.100.1256.200.100.8

Class

A - privateA - publicB - publicB - privateC - publicB - publicIllegal Address!

• What class (A/B/C) and type (public/private) are the following addresses?

Provide periodic topic reviews to encourage thinking

Chapter 6:Classful Masks

• Subnet masks divide the network bits from the host bits

• Masks are used in conjunction with IP addresses

• ANDing – a binary adding process

1 + 1 = 1

1 + 0 = 0

0 + 1 = 0

0 + 0 = 0

• Subnet masks are:

Dotted decimal

4 octet

32 bit

Complimentary to IP addresses, not identical

Subnet masks are like duct tape

Classful Masks (cont)• Classful masks

• A = 255.0.0.0 – or – IIIIIIII.00000000.00000000.00000000

• B = 255.255.0.0– or – IIIIIIII.IIIIIIII.00000000.00000000

• C = 255.255.255.0 – or – IIIIIIII.IIIIIIII. IIIIIIII.00000000

• The “ones” indicate the network and the “zeros” indicate the host portion.

• Note that the IP address designates the class of address, the subnet mask DOES NOT!

• Given the IP address of 128.32.15.22 it’s classful mask would be????

Classful Masks (cont)

• Lets apply binary ANDing:

10000000.0010000.00001111.00010110 – 128.32.15.22

11111111.1111111.00000000.00000000 – 255.255.0.0

• Lets look at it from the human perspective:

128.32.15.22 255.255.0.0

• Lets look at it from the computer’s perspective:

10000000.0010000.00001111.00010110 11111111.11111111.00000000.00000000

10000000.00100000.00000000.00000000 = 128.32.0.0 128 32 0 0

Network Portion (ones)

Host Portion (zeros)

Everything in the host position MUST be a zero after ANDing

• Class A: 10.0.0.0 255.0.0.0• 10.0.0.1 – 10.255.255.255

• Class B: 130.175.0.0 255.255.0.0• 130.175.0.0 – 130.175.255.255

• Class C: 200.201.202.0 255.255.255.0• 200.201.202.0 – 200.201.202.255

Which hosts are in which networks?

• Remember; it works like an odometer and you cannot change the “255”

Yep..yet another mental stop

Might be a good time to take a break

STOP!

Powers of two

• How do we determine the number of possible combinations?

• Recall that binary rules say a bit can only be a “1” or a “0”. That leaves only 2 combinations per bit.• 1 bit can equal either 1 or 0• 2 bits can equal 00, 10, 01 or 00• 3 bits can equal 000, 001, 010, 011, 100, 101, 110 or 111

• This is how powers of “2” work:• 1 bit = 21 or 2 x 1 = 2 combinations• 2 bits = 22 or 2 x 2 = 4 combinations• 3 bits = 23 or 2 x 2 x 2 = 8 combinations

Why do I need 65,536 host addresses on a point-to-point link?!?

128.32.15.0 255.255.0.0

Chapter 9Variable Length Subnetting

• Classful addressing does not work for all situations

The solution? - subnetting!• Moving the network/host boundary to the right of the “classful”

boundary is called subnetting

• Now we give the student a real-world example!

Variable Length Subnetting (cont)

“Classful Mask”

255.255.0.0 = 11111111. 11111111.00000000. 00000000 Network . Host Network . Host

128.32.15.22 = 10000000.0010000.00001111.00010110 – Class “B” Network

11111111. 11111111. 11111111. 11111100 Network . Host

“Subnetted Mask”

11111111. 11111111.10000000. 00000000 Network . Host

11111111. 11111111.11100000. 00000000 Network . Host

Variable Length Subnetting (cont)

11111111. 11111111.11111111.11111100 = 30 Network bits – 2 Host bits Network . Host 230 = 1,073,741,824 22 = 4

11111111. 11111111.10000000. 00000000 = 17 Network bits – 15 Host bits Network . Host 217 = 131,072 215 = 32,768

11111111. 11111111.11100000. 00000000 = 19 Network bits – 13 Host bits Network . Host

219 = 524,288 213 = 8,192

• Remember that each time you move a bit it either divides or multiplies by 2!

Four addresses vs. 65,536??? Cool!

128.32.15.0/30

Variable Length Subnetting (cont)

Problem Solved!

MY ISP200.122.4.0/24200.122.5.0/24200.122.6.0/24200.122.7.0/24

Chapter 10Supernetting

• AKA aggregation• Works only for contiguous subnets

Scenario:

200.122.4.0/24200.122.5.0/24200.122.6.0/24200.122.7.0/24

ADVERTISE

• Moving the network/host boundary to the left of the “classful” boundary is supernetting

Supernetting (cont)11001000. 01111010.00000100.00000000 = 200.122.4.0

11001000. 01111010.00000101.00000000 = 200.122.5.0

11001000. 01111010.00000110.00000000 = 200.122.6.0

11001000. 01111010.00000111.00000000 = 200.122.7.0

These bits are all alike . . . .

Lets change the “like” bits to ones and apply ANDing . . .

11001000.01111010.00000100.00000000 - 200.122.4.011111111.11111111.11111100.00000000 - 255.255.252.0

Classful boundary

11001000.01111010.00000100.00000000 = 200.122.4.0 200 122 4 0

The mask is now 255.255.252.0. Since we used 22 bits the mask can be written as “/22”

Supernet boundary

• Any address that matches “11001000.01111010.000001” will be advertised

MY ISP200.122.4.0/24200.122.5.0/24200.122.6.0/24200.122.7.0/24

Supernetting (cont)

200.122.4.0/22ADVERTISE

200.122.4.0/22 = 200.122.4.0/24200.122.5.0/24200.122.6.0/24 and200.122.7.0/24

11001000. 01111010.00000100.00000000 = 200.122.4.0

11001000. 01111010.00000101.00000000 = 200.122.5.0

11001000. 01111010.00000110.00000000 = 200.122.6.0

11001000. 01111010.00000111.00000000 = 200.122.7.0

Supernetting (cont)

11001000. 01111010.00000010.00000000 = 200.122.2.0

11001000. 01111010.00000011.00000000 = 200.122.3.0

11001000. 01111010.00000100.00000000 = 200.122.4.0

11001000. 01111010.00000101.00000000 = 200.122.5.0

11001000. 01111010.00000110.00000000 = 200.122.6.0

11001000. 01111010.00000111.00000000 = 200.122.7.0

11001000. 01111010.00001000.00000000 = 200.122.8.0

11001000. 01111010.00001001.00000000 = 200.122.9.0

• Note that subnetting and supernetting are collectively referred to as CIDR

Why won’t other addresses work???

No match!

No match!

No match!

No match!

Match!

Match!

Match!

Match!

Topic Review• Supernet the following

addresses:

220.5.0.0/23220.5.1.0/23

11011100.00000101.00000000.0000000011011100.00000101.00000001.00000000

The Supernet Address is 220.5.0.0/23

Step one: Convert to binary and find the common bits

220.5.0.0/24220.5.1.0/24

Step two: Apply ANDing

11011100.00000101.00000000.00000000 – 220.5.0.0

11111111.11111111.11111110.00000000 – 255.255.254.0

11011100.00000101.00000000.00000000220 5 0 0

Topic Review• Supernet the following

addresses:

130.0.0.0/16130.1.0.0/16130.2.0.0/16 …….130.7.0.0/16

10000001.00000000.00000000.0000000010000001.00000001.00000000.0000000010000001.00000010.00000000.00000000

10000001.00000111.00000000.00000000

The Supernet Address is 220.5.0.0/13

Step one: Convert to binary and find the common bits

130.0.0.0/16thru

130.7.0.0/16

Step two: Apply ANDing

10000001.00000000.00000000.00000000 – 130.0.0.0

11111111.11111000. 00000000.00000000 – 255.248.0.0

11011100.00000101.00000000.00000000220 0 0 0

Topic Review• Which addresses are in the 199.175.8.0/21 supernet?

Step one: Convert 199.175.8.0 to binary

199.175.8.0 = 11000111.10101111.00001000.00000000

Step two: Isolate the number of network bits

Step three: Calculate the number of possible combinations of hosts

11000111. 10101111.00001000.00000000 = 199.175.8.0

11000111. 10101111.00001001.00000000 = 199.175.9.0

11000111. 10101111.00001010.00000000 = 199.175.10.0

11000111. 10101111.00001011.00000000 = 199.175.11.0

. . . etc

11000111. 10101111.00001111.11111111 = 199.175.15.255

Therefore; 199.175.8.0/21 covers 199.175.8.0 thru 199.175.15.255

This is the heart and soul of Subnetting Made Easy◦ Why not teach it first?

Chapter 11The Cheat Sheet

Chapter 11…The Cheat Sheet• Now that you know the fundamentals, here’s a shortcut . . .

Subnet Bits Power of 2N/W – Host

1–128–7 20 1 2–192–6 21 2 3–224–5 22 4 4–240–4 23 8 5–248–3 24 16 6–252–2 25 32 7–254–1 26 64 8–255–0 27 128

28 25629 512210 1024

• This cheat sheet can be easily re-created from memory and will solve most subnetting problems

Topic Review (with cheat sheet)

• Given a class “C” address, what is the subnet mask needed to provide at least 12 hosts per subnet?

Subnet Bits Power of 2N/W - Hosts 1-128-7 20 1 2-192-6 21 2 3-224-5 22 4 4-240-4 23 8 5-248-3 24 16 6-252-2 25 32 7-254-1 26 64 8-255-0 27 128 28 256

29 512210 1024

1. 24 will yield 16 hosts

2. Find the corresponding number 4 on the “hosts” side of the center table on the cheat sheet

3. A 240 mask is required

4. Answer: 255.255.255.240

• Time to break out the cheat sheet . .

Topic Review (with cheat sheet)

• Given a class “C” address, what is the subnet mask needed to provide at least 50 hosts per subnet?

Subnet Bits Power of 2N/W - Hosts 1-128-7 20 1 2-192-6 21 2 3-224-5 22 4 4-240-4 23 8 5-248-3 24 16 6-252-2 25 32 7-254-1 26 64 8-255-0 27 128 28 256

29 512210 1024

1. 26 will yield 64 hosts

2. Find the corresponding number 6 on the “hosts” side of the center table on the cheat sheet

3. A 192 mask is required

4. Answer: 255.255.255.192

• Time to break out the cheat sheet . .

Topic Review (with cheat sheet)

• Given a class “B” address, what is the subnet mask needed to provide at least 60 hosts per subnet?

Subnet Bits Power of 2N/W - Hosts 1-128-7 20 1 2-192-6 21 2 3-224-5 22 4 4-240-4 23 8 5-248-3 24 16 6-252-2 25 32 7-254-1 26 64 8-255-0 27 128 28 256

29 512210 1024

1. 26 will yield 64 hosts

2. Find the number 6 on the “hosts” side of the center table on the cheat sheet

3. A 192 mask is required

4. Answer: 255.255.255.192

• Time to break out the cheat sheet . .

Topic Review (with cheat sheet)

• Given a class “C” address, what is the subnet mask needed to provide at least 20 subnets?

Subnet Bits Power of 2N/W - Hosts 1-128-7 20 1 2-192-6 21 2 3-224-5 22 4 4-240-4 23 8 5-248-3 24 16 6-252-2 25 32 7-254-1 26 64 8-255-0 27 128 28 256

29 512210 1024

1. 25 will yield 32 subnets

2. Find the number 5 on the “N/W” (network) side of the center table on the cheat sheet

3. A 248 mask is required

4. Answer: 255.255.255.248

• Time to break out the cheat sheet . .

Topic Review (with cheat sheet)

• Will a class “C” address with a /27 bit mask provide at least 6 subnets with a minimum of 20 hosts per subnet?

Subnet Bits Power of 2N/W - Hosts 1-128-7 20 1 2-192-6 21 2 3-224-5 22 4 4-240-4 23 8 5-248-3 24 16 6-252-2 25 32 7-254-1 26 64 8-255-0 27 128 28 256

29 512210 1024

1. Lets look up the subnets first.

2. 23 will yield 8 subnets . .

3. Find the number 3 on the “N/W” (network) side of the center table on the cheat sheet

4. A 224 mask will provide 3 subnet bits and 5 host bits

5. Find the value for 25

6. Is 23 >= 6 and is 25 >= 20?

7. Yes!

• Time to break out the cheat sheet . .

Topic Review (with cheat sheet)

• Will a class “C” address with a /26 bit mask provide at least 3 subnets with a minimum of 70 hosts per subnet?

Subnet Bits Power of 2N/W - Hosts 1-128-7 20 1 2-192-6 21 2 3-224-5 22 4 4-240-4 23 8 5-248-3 24 16 6-252-2 25 32 7-254-1 26 64 8-255-0 27 128 28 256

29 512210 1024

1. Lets look up the subnets first

2. 22 will yield 4 subnets . .

3. Find the number 2 on the “N/W” (network) side of the center table on the cheat sheet

4. A 192 mask will provide 2 subnet bits and 6 host bits

5. Find the value for 26

6. Is 22 >= 3 and is 26 >= 70?

7. No!

• Time to break out the cheat sheet . .

OK, we can subnet and supernet….what now???? Two more IP address rules:

◦ The first address of every IP address range is called the network number◦ The last address of every IP address range is called the broadcast address

Neither of these are usable for network hosts To find the number of hosts in a network we look at the subnet mask

◦ Host bits = total bits – network bits i.e. a “/28” mask will leave 4 host bits (32 – 28 = 4) 4 bits = 24 = 16 so each network will have 16 hosts (14 usable addresses) Now that we know that….

Now we tie up the loose ends…

Putting it all together

Putting it all together (cont)

This is why 200.32.15.0 /28 subdivides into the following 16 networks

Network Number Usable Range Broadcast200.32.15.0 200.32.15.1 - 200.32.15.14 200.32.15.15

200.32.15.16 200.32.15.17 - 200.32.15.30 200.32.15.31

200.32.15.32 200.32.15.33 - 200.32.15.46 200.32.15.47

200.32.15.48 200.32.15.49 - 200.32.15.62 200.32.15.63

200.32.15.64 200.32.15.65 - 200.32.15.78 200.32.15.79

200.32.15.80 200.32.15.81 - 200.32.15.94 200.32.15.95

200.32.15.96 200.32.15.97 - 200.32.15.110 200.32.15.111

200.32.15.112 200.32.15.113 - 200.32.15.126 200.32.15.127

200.32.15.128 200.32.15.129 - 200.32.15.142 200.32.15.143

200.32.15.144 200.32.15.145 - 200.32.15.158 200.32.15.159

200.32.15.160 200.32.15.161 - 200.32.15.174 200.32.15.175

200.32.15.176 200.32.15.177 - 200.32.15.190 200.32.15.191

200.32.15.192 200.32.15.193 - 200.32.15.206 200.32.15.207

200.32.15.208 200.32.15.209 - 200.32.15.222 200.32.15.223

200.32.15.224 200.32.15.225 - 200.32.15.238 200.32.15.239

200.32.15.240 200.32.15.241 - 200.32.15.254 200.32.15.255

Putting it all together (cont)

Now you try it: Subnet 199.45.20.0 /27◦ Step one 32 – 27 =5 ◦ Step two 25 = 32◦ Step three fill in the chart

BroadcastUsable RangeNetwork Number

199.45.20.255199.45.20.225 - 199.45.20.254199.45.20.224

199.45.20.223199.45.20.193 - 199.45.20.222199.45.20.192

199.45.20.191199.45.20.161 - 199.45.20.190199.45.20.160

199.45.20.159199.45.20.129 - 199.45.20.158199.45.20.128

199.45.20.127199.45.20.97 - 199.45.20.126199.45.20.96

199.45.20.95199.45.20.65 - 199.45.20.94199.45.20.64

199.45.20.63199.45.20.33 - 199.45.20.62199.45.20.32

199.45.20.31199.45.20.1 - 199.45.20.30199.45.20.0

Putting it all together (cont)

Now you try it: Subnet 134.55.77.0 /25◦ Step one 32 – 25 = 7◦ Step two 27 = 128◦ Step three fill in the chart

BroadcastUsable RangeNetwork Number

134.55.77.255134.55.77.129 - 134.55.77.254134.55.77.128

134.55.77.127134.55.77.1 - 134.55.77.126134.55.77.0

Summary

Subnetting is hard because it is abstract and we do not use it every day

Start from the scratch – assume nothing Go slow and take “mental stops” Watch for the light bulbs – you will know

that you are on the right track

Student comments Ordered this book as a compliment to my other recent purchases in prep for

the CCNA test. Just got it and in skimming, I am glad I did. It looks very concise, easy to follow and very understandable; much like when I took the course at a CC many years ago. (and something many 'bigger' books lack)

I am into the second chapter and already I am VERY please with it. I know that by the time I finish reading and applying what I learned sub-netting is going to be a breeze.

GREAT LITTLE BOOK AND IT HELPED ME PASS THE COURSE.

Excellent product, by an excellent author. Mr Kowalski takes time to make sure the foundations are laid correctly in this book.

I finally get it after years of not understanding subnetting. This book is a must if you are having problems understanding this concept.

Student comments (cont)

If you know nothing about subnetting, this is the book for you. If you know how to subnet, get this book and you will know it even better.

Great book:-) If you want to understand Subnetting - this is the book. Easy to understand, well paced and focused. Highly Recommended :-))

Book is an excellent source for getting a handle on subnetting. An easy read. The only book you will need to learn subnetting.

The book has very clear information. No fancy no elegant just what you need if you need to learn IP subnetting...

Really Outstanding! I have purchased several books on subnetting and just could not "get it" Now I get it. Thanks for your plain English translation.

IP Subnetting Made Easy

Questions?