Sub Netting Basics

  • Uploaded by: Saad
  • 0
  • 0
  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Sub Netting Basics as PDF for free.

More details

  • Words: 1,668
  • Pages: 28
Application Presentation Session Transport Network Data-Link Physical

Subnetting Basics Four Subnetting Steps & Practice Problems By: Allan Johnson

Application Presentation

IP Addressing

Session Transport Network Data-Link Physical

Subnetting a Class A, B, and C

Logical Addressing • At the network layer, we use logical, hierarchical addressing. • With Internet Protocol (IP), this address is a 32-bit addressing scheme divided into four octets. • Do you remember the classes 1st octet’s value?     

Class Class Class Class Class

A: 1 - 126 B: 128 - 191 C: 192 - 223 D: 224 - 239 (multicasting) E: 240 - 255 (experimental)

Network vs. Host Class A:

27 = 126 networks; 224 > 16 million hosts

N Class B :

N Class C :

N

H

H

H

214 = 16,384 networks; 216 > 65,534 hosts

N

H

H

221 > 2 million networks; 28 = 254 hosts

N

N

H

Why Subnet? • Remember: we are usually dealing with a broadcast topology. • Can you imagine what the network traffic overhead would be like on a network with 254 hosts trying to discover each others MAC addresses? • Subnetting allows us to segment LANs into logical broadcast domains called subnets, thereby improving network performance.

Four Subnetting Steps • To correctly subnet a given network address into subnet addresses, ask yourself the following questions: 1. How many bits do I need to borrow? 2. What’s the subnet mask? 3. What’s the “magic number” or multiplier? 4. What are the first three subnetwork addresses?

• Let’s look at each of these

1. How many bits to borrow?

• First, you need to know how many bits you have to work with. • Second, you must know either how many subnets you need or how many hosts per subnet you need. • Finally, you need to figure out the number of bits to borrow.

1. How many bits to borrow?

• How many bits do I have to work with?  Depends on the class of your network address.  Class C: 8 host bits  Class B: 16 host bits  Class A: 24 host bits

 Remember: you must borrow at least 2 bits for subnets and leave at least 2 bits for host addresses.  2 bits borrowed allows 22 - 2 = 2 subnets

1. How many bits to borrow?

• How many subnets or hosts do I need? • A simple formula:  Host Bits = Bits Borrowed + Bits Left BB  HB = BB + BL 2 −2≥x

• II need need x x hosts: subnets: BL • 2

−2≥x

• Remember: we need to subtract two to provide for the subnetwork and broadcast addresses.

1. How many bits to borrow?

• Class C Example: 210.93.45.0 • Design goals specify at least 5 subnets so how many bits do we borrow? • How many bits in the host portion do we have to work with (HB)? • What’s the BB in our HB = BB + BL formula? (8 = BB + BL) • 2 to the what power will give us at least 5 subnets? 3 2 - 2 = 6 subnets

1. How many bits to borrow?

• How many bits are left for hosts? HB = BB + BL 8 = 3 + BL BL = 5 • So how many hosts can we assign to each subnet? 5

2 - 2 = 30 hosts

1. How many bits to borrow?

• Class B Example: 185.75.0.0 • Design goals specify no more than 126 hosts per subnet, so how many bits do we need to leave (BL)? • How many bits in the host portion do we have to work with (HB)? • What’s the BL in our HB = BB + BL formula? (16 = BB + BL) • 2 to the what power will insure no more than 126 hosts per subnet and give us the most subnets? 27 - 2 = 126 hosts

1. How many bits to borrow?

• How many bits are left for subnets? HB = BB + BL 16 = BB + 7 BL = 9 • So how many subnets can we have? 9

2 - 2 = 510 subnets

2. What’s the 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 3 bits. Below is the host octet showing the bits we borrowed and their 1 1 values. 1 decimal 128 64 32 16 8 4 2 1 We add up the decimal value of these bits and get 224. That’s the last non-zero octet of our subnet mask. So our subnet mask is 255.255.255.224

3. What’s the “magic number?”

• To find the “magic number” or the multiplier we will use to determine the subnetwork addresses, we subtract the last non-zero octet from 256. • In our Class C example, our subnet mask was 255.255.255.224. 224 is our last non-zero octet. • Our magic number is 256 - 224 = 32

Last Non-Zero Octet • Memorize this table. You should be able to:  Quickly calculate the last non-zero octet when given the number of bits borrowed.  Determine the number of bits borrowed given the last non-zero octet.  Determine the amount of bits left over for hosts and the of host addresses Bitsnumber Non-Zero available. Borrowed Octet Hosts 2 3 4 5 6

192 224 240 248 252

62 30 14 6 2

4. What are the subnets? • We now take our “magic number” and use it as a multiplier. • Our Class C address was 210.93.45.0. • We borrowed bits in the fourth octet, so that’s where our multiplier occurs  1st subnet: 210.93.45.32  2nd subnet: 210.93.45.64  3rd subnet: 210.93.45.96

• We keep adding 32 in the fourth

Host & Broadcast Addresses

• Now you can see why we subtract 2 when determining the number of host address. • Let’s look at our 1st subnet: 210.93.45.32 • What is the total range of addresses up to our next subnet, 210.93.45.64? • 210.93.45.32 to 210.93.45.63 or 32 addresses

• .32 cannot be assigned to a host. Why? • .63 cannot be assigned to a host. Why? • So our host addresses are .33 - .62 or 30 host addresses--just like we figured out earlier.

Application Presentation

CIDR Notation

Session Transport Network Data-Link Physical

A Different Way to Represent a Subnet Mask

CIDR Notation • Classless Interdomain Routing is a method of representing an IP address and its subnet mask with a prefix. • For example: 192.168.50.0/27 • What do you think the 27 tells you?  27 is the number of 1 bits in the subnet mask. Therefore, 255.255.255.224  Also, you know 192 is a Class C, so we borrowed 3 bits!!  Finally, you know the magic number is 256 224 = 32, so the first useable subnet address is 197.168.50.32!!

• Let’s see the power of CIDR notation.

202.151.37.0/26 • Subnet mask?  255.255.255.192

• Bits borrowed?  Class C so 2 bits borrowed

• Magic Number?  256 - 192 = 64

• First useable subnet address?  202.151.37.64

• Third useable subnet address?  64 + 64 + 64 = 192, so 202.151.37.192

198.53.67.0/30 • Subnet mask?  255.255.255.252

• Bits borrowed?  Class C so 6 bits borrowed

• Magic Number?  256 - 252 = 4

• Third useable subnet address?  4 + 4 + 4 = 12, so 198.53.67.12

• Second subnet’s broadcast address?  4 + 4 + 4 - 1 = 11, so 198.53.67.11

200.39.89.0/28 • What kind of address is 200.39.89.0?    

Class C, so 4 bits borrowed Last non-zero octet is 240 Magic number is 256 - 240 = 16 32 is a multiple of 16 so 200.39.89.32 is a subnet address--the second subnet address!!

• What’s the broadcast address of 200.39.89.32?  32 + 16 -1 = 47, so 200.39.89.47

194.53.45.0/29 • What kind of address is 194.53.45.26?     

Class C, so 5 bits borrowed Last non-zero octet is 248 Magic number is 256 - 248 = 8 Subnets are .8, .16, .24, .32, ect. So 194.53.45.26 belongs to the third subnet address (194.53.45.24) and is a host address.

• What broadcast address would this host use to communicate with other devices on the same subnet?  It belongs to .24 and the next is .32, so 1 less is .31 (194.53.45.31)

No Worksheet Needed! • After some practice, you should never need a subnetting worksheet again. • The only information you need is the IP address and the CIDR notation. • For example, the address 221.39.50/26 • You can quickly determine that the first subnet address is 221.39.50.64. How?  Class C, 2 bits borrowed  256 - 192 = 64, so 221.39.50.64

• For the rest of the addresses, just do multiples of 64 (.64, .128, .192).

The Key!! • MEMORIZE THIS TABLE!!! Bits Borrowed 1 2 3 4 6 7 8

Non-Zero Octet 128 192 224 240 252 254 255

Practice On Your Own • Below are some practice problems. Take out a sheet of paper and calculate...   

• • • • • •

Bits borrowed Last non-zero octet Second subnet address and broadcast address

192.168.15.0/26 220.75.32.0/30 200.39.79.0/29 195.50.120.0/27 202.139.67.0/28 Challenge: 132.59.0.0/19

Answers Don’t Cheat Yourself!! Work them out before you check your answers. Click the back button if you’re not done. Otherwise, click anywhere else in the screen to see the answers. Bits Last NonMagic 2nd Subnet's 2nd Subnet's Address Class Borrowed Zero Octet Number Address Broadcast 192.168.15.0/26 C 2 192 64 192.168.15.128 192.168.15.191 220.75.32.0/30 C 6 252 4 220.75.32.8 220.75.32.11 200.39.79.0/29 C 5 248 8 200.39.79.16 220.39.79.23 195.50.120.0/27 C 3 224 32 195.50.120.64 195.50.120.95 202.139.67.0/28 C 4 240 16 202.139.67.32 202.139.67.47 Challenge: 132.59.0.0/19 B 3 224 32 132.59.64.0 132.59.95.255 64.0.0.0/16 A 8 255 1 64.2.0.0 64.2.255.255

Related Documents

Sub Netting Basics
May 2020 12
Sub Netting
May 2020 25
Sub Netting
May 2020 23
Sub Netting
November 2019 34
Sub Netting
May 2020 20
Sub Netting
November 2019 40

More Documents from ""

A.docx
April 2020 23
Sub Netting Basics
May 2020 12
Computer
December 2019 28
Tp2.pptx
November 2019 10