+ All Categories
Home > Documents > Subnetting Basics

Subnetting Basics

Date post: 08-Aug-2018
Category:
Upload: robert-harrison
View: 254 times
Download: 1 times
Share this document with a friend

of 30

Transcript
  • 8/22/2019 Subnetting Basics

    1/30

    8/4/2013 1

    IP ADDRESSING

    EASY STEPS TO SUBNET

  • 8/22/2019 Subnetting Basics

    2/30

    8/4/2013 2

    Objectives

    Understand what an IP address is.

    Understand why we need to subnet.

    Be able to subnet

    Be able to interpret CIDR notation

  • 8/22/2019 Subnetting Basics

    3/30

    8/4/2013 3

    IP Address

    An IP address is a 32-bit sequence of 1s and 0s. To make the IP address easier to use, the address is

    usually written as four decimal numbers separated byperiods.

    This way of writing the address is called the dotteddecimal format.

  • 8/22/2019 Subnetting Basics

    4/30

    8/4/2013 4

    IP Private Addresses

    No two machines that connect to a public network can have

    the same IP address because public IP addresses are globaland standardized

    Private IP addresses are a solution to the problem of the

    exhaustion of public IP addresses. Addresses that fall withinthese ranges are not routed on the Internet backbone:

    Connecting a network using private addresses to the

    Internet requires the usage of NAT

  • 8/22/2019 Subnetting Basics

    5/30

    8/4/2013 5

    Logical Addressing

    At the network layer, we use logical, hierarchicaladdressing.

    With Internet Protocol (IP), this address is a 32-bit

    addressing scheme divided into four octets. Do you remember the classes 1st octets value?

    Class A: 1 - 126

    Class B: 128 - 191

    Class C: 192 - 223 Class D: 224 - 239 (multicasting)

    Class E: 240 - 255 (experimental)

  • 8/22/2019 Subnetting Basics

    6/30

    8/4/2013 6

    Network vs. Host

    N H H H

    Class A: 27 = 126 networks; 224 > 16 million hosts

    N N H H

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

    N N N H

    Class C : 221 > 2 million networks; 28 = 254 hosts

  • 8/22/2019 Subnetting Basics

    7/308/4/2013 7

    Why Subnet?

    Remember: we are usually dealing with abroadcast topology.

    Can you imagine what the network trafficoverhead would be like on a network with 254hosts trying to discover each others MACaddresses?

    Subnetting allows us to segment LANs intological broadcast domains called subnets,thereby improving network performance.

  • 8/22/2019 Subnetting Basics

    8/30

    8/4/2013 8

    Four Subnetting Steps

    To correctly subnet a given network address intosubnet addresses, ask yourself the followingquestions:

    1. How many bits do I need to borrow?

    2. Whats the subnet mask?

    3. Whats the magic number or multiplier?

    4. What are the first three subnetwork addresses?

    Lets look at each of these questions in detail

  • 8/22/2019 Subnetting Basics

    9/30

    8/4/2013 9

    1. How many bits to borrow?

    First, you need to know how many bits you haveto work with.

    Second, you must know either how manysubnets you need or how many hosts per subnetyou need.

    Finally, you need to figure out the number ofbits to borrow.

  • 8/22/2019 Subnetting Basics

    10/30

    8/4/2013 10

    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 2

    2- 2 = 2 subnets

  • 8/22/2019 Subnetting Basics

    11/30

    8/4/2013 11

    1. How many bits to borrow?

    How many subnets or hosts do I need?

    A simple formula:

    Host Bits = Bits Borrowed + Bits Left

    HB = BB + BL

    I need x subnets: x22BB

    I need x hosts: x22BL

    Remember: we need to subtract two toprovide for the subnetwork andbroadcast addresses.

  • 8/22/2019 Subnetting Basics

    12/30

    8/4/2013 12

    1. How many bits to borrow?

    Class C Example: 210.93.45.0

    Design goals specify at least 5 subnets so how manybits do we borrow?

    How many bits in the host portion do we have to workwith (HB)?

    Whats the BB in our HB = BB + BL formula? (8 =

    BB + BL) 2 to the what power will give us at least 5 subnets?

    23

    - 2 = 6 subnets

  • 8/22/2019 Subnetting Basics

    13/30

    8/4/2013 13

    1. How many bits to borrow?

    How many bits are left for hosts?

    HB = BB + BL

    8 = 3 + BLBL = 5

    So how many hosts can we assign to each

    subnet?2

    5- 2 = 30 hosts

  • 8/22/2019 Subnetting Basics

    14/30

    8/4/2013 14

    1. How many bits to borrow?

    Class B Example: 185.75.0.0

    Design goals specify no more than 126 hosts persubnet, so how many bits do we need to leave (BL)?

    How many bits in the host portion do we have to workwith (HB)?

    Whats the BL in our HB = BB + BL formula? (16 =BB + BL)

    2 to the what power will insure no more than 126 hostsper subnet and give us the most subnets?

    27

    - 2 = 126 hosts

  • 8/22/2019 Subnetting Basics

    15/30

    8/4/2013 15

    1. How many bits to borrow?

    How many bits are left for subnets?

    HB = BB + BL

    16 = BB + 7BB = 9

    So how many subnets can we have?

    29

    - 2 = 510 subnets

  • 8/22/2019 Subnetting Basics

    16/30

    8/4/2013 16

    2. Whats the subnet mask?

    We determine the subnet mask by adding up the decimal valueof the bits we borrowed.

    In the previous Class C example, we borrowed 3 bits. Below isthe host octet showing the bits we borrowed and their decimal

    values.

    128 64 32 16 8 4 2 1

    1 1 1

    We add up the decimal value of these bits and get 224.Thats the last non-zero octet of our subnet mask.

    So our subnet mask is 255.255.255.224

  • 8/22/2019 Subnetting Basics

    17/30

    8/4/2013 17

    3. Whats the magic number?

    To find the magic number or the multiplier

    we will use to determine the subnetworkaddresses, we subtract the last non-zero octet

    from 256.

    In our Class C example, our subnet mask was255.255.255.224. 224 is our last non-zero octet.

    Our magic number is 256 - 224 = 32

  • 8/22/2019 Subnetting Basics

    18/30

    8/4/2013 18

    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

    number of host addresses available.

    Bits

    Borrowed

    Non-Zero

    Octet Hosts

    2 192 62

    3 224 30

    4 240 14

    5 248 66 252 2

  • 8/22/2019 Subnetting Basics

    19/30

    8/4/2013 19

    4. What are the subnets?

    We now take our magic number and use it as amultiplier.

    Our Class C address was 210.93.45.0.

    We borrowed bits in the fourth octet, so thats whereour 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 octet to get all six

    available subnet addresses.

  • 8/22/2019 Subnetting Basics

    20/30

    8/4/2013 20

    Host & Broadcast Addresses

    Now you can see why we subtract 2 when determiningthe number of host address.

    Lets look at our 1st subnet: 210.93.45.32

    What is the total range of addresses up to our nextsubnet, 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.

  • 8/22/2019 Subnetting Basics

    21/30

    8/4/2013 21

    CIDR

  • 8/22/2019 Subnetting Basics

    22/30

    8/4/2013 22

    CIDR Notation

    Classless Interdomain Routing is a method ofrepresenting an IP address and its subnet mask with aprefix.

    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!!

    Lets see the power of CIDR notation.

  • 8/22/2019 Subnetting Basics

    23/30

    8/4/2013 23

    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

  • 8/22/2019 Subnetting Basics

    24/30

    8/4/2013 24

    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 subnets broadcast address?

    4 + 4 + 4 - 1 = 11, so 198.53.67.11

  • 8/22/2019 Subnetting Basics

    25/30

    8/4/2013 25

    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 subnetaddress--the second subnet address!!

    Whats the broadcast address of 200.39.89.32? 32 + 16 -1 = 47, so 200.39.89.47

  • 8/22/2019 Subnetting Basics

    26/30

    8/4/2013 26

    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 tocommunicate 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)

  • 8/22/2019 Subnetting Basics

    27/30

    8/4/2013 27

    No Worksheet Needed!

    After some practice, you should never need asubnetting worksheet again.

    The only information you need is the IP address andthe 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).

  • 8/22/2019 Subnetting Basics

    28/30

    8/4/2013 28

    The Key!!

    MEMORIZE THIS TABLE!!!

    Bits

    Borrowed

    Non-Zero

    Octet

    1 128

    2 192

    3 224

    4 2406 252

    7 254

    8 255

  • 8/22/2019 Subnetting Basics

    29/30

    8/4/2013 29

    Practice On Your Own

    Below are some practice problems. Take out a sheetof paper and calculate... Bits borrowed

    Last non-zero octet

    Second subnet address and broadcast address

    1. 192.168.15.0/26

    2. 220.75.32.0/30

    3. 200.39.79.0/294. 195.50.120.0/27

    5. 202.139.67.0/28

  • 8/22/2019 Subnetting Basics

    30/30

    8/4/2013 30

    Address Class

    Bits

    Borrowed

    Last Non-

    Zero Octet

    Magic

    Number

    2nd Subnet's

    Address

    2nd Subnet's

    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.23195.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

    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

    Challenge:

    Dont Cheat Yourself!!

    Work them out before you check your answers. Clickthe back button if youre not done. Otherwise, clickanywhere else in the screen to see the answers.


Recommended