Sub Netting Basics

  • Upload
    saad

  • View
    228

  • Download
    0

Embed Size (px)

Citation preview

  • 8/14/2019 Sub Netting Basics

    1/28

    Application

    Presentation

    Session

    Transport

    Network

    Data-LinkPhysical

    Subnetting

    BasicsFour Subnetting Steps

    & Practice ProblemsBy: Allan Johnson

    Network

  • 8/14/2019 Sub Netting Basics

    2/28

    Application

    Presentation

    Session

    Transport

    Network

    Data-LinkPhysical

    IP Addressing

    Subnetting a

    Class A, B, and C

    Network

  • 8/14/2019 Sub Netting Basics

    3/28

    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 octets

    value?Class A: 1 - 126

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

  • 8/14/2019 Sub Netting Basics

    4/28

    Network vs. Host

    N H H HClass A: 2 7 = 126 networks; 2 24 > 16 million hosts

    N N H HClass B : 2 14 = 16,384 networks; 2 16 > 65,534 hosts

    N N N HClass C : 2 21 > 2 million networks; 2 8 = 254 hosts

  • 8/14/2019 Sub Netting Basics

    5/28

    Why Subnet?

    Remember: we are usually dealingwith a broadcast topology.

    Can you imagine what the network

    traffic overhead would be like on anetwork with 254 hosts trying todiscover each others MAC

    addresses? Subnetting allows us to segmentLANs into logical broadcastdomains called subnets, therebyim rovin network erformance.

  • 8/14/2019 Sub Netting Basics

    6/28

    Four Subnetting Steps

    To correctly subnet a givennetwork address into subnetaddresses, ask yourself the

    following questions:1. How many bits do I need to borrow?2. Whats the subnet mask?

    3. Whats the magic number ormultiplier?4. What are the first three subnetwork

    addresses?

    Lets look at each of these

  • 8/14/2019 Sub Netting Basics

    7/28

  • 8/14/2019 Sub Netting Basics

    8/28

  • 8/14/2019 Sub Netting Basics

    9/28

    1. How many bits toborrow? How many subnets or hosts do I

    need? A simple formula:

    Host Bits = Bits Borrowed + Bits LeftHB = BB + BL

    I need x subnets:x22 BB

    I need x hosts: x22 BL

    Remember: we need to subtracttwo to provide for the subnetworkand broadcast addresses.

  • 8/14/2019 Sub Netting Basics

    10/28

    1. How many bits toborrow? Class C Example: 210.93.45.0 Design goals specify at least 5

    subnets so how many bits do weborrow?

    How many bits in the host portiondo we have to work with (HB)?

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

    2 to the what power will give us atleast 5 subnets?

    2 3 - 2 = 6 subnets

  • 8/14/2019 Sub Netting Basics

    11/28

    1. How many bits toborrow? How many bits are left for hosts?

    HB = BB + BL8 = 3 + BL

    BL = 5 So how many hosts can we assign

    to each subnet?2 5 - 2 = 30 hosts

  • 8/14/2019 Sub Netting Basics

    12/28

    1. How many bits toborrow? Class B Example: 185.75.0.0 Design goals specify no more than 126

    hosts per subnet, so how many bits dowe need to leave (BL)?

    How many bits in the host portion do wehave to work with (HB)?

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

    2 to the what power will insure no morethan 126 hosts per subnet and give usthe most subnets?

    2 7 - 2 = 126 hosts

  • 8/14/2019 Sub Netting Basics

    13/28

    1. How many bits toborrow? How many bits are left for subnets?

    HB = BB + BL16 = BB + 7BL = 9

    So how many subnets can wehave?

    2 9 - 2 = 510 subnets

  • 8/14/2019 Sub Netting Basics

    14/28

    2. Whats the subnetmask? We determine the subnet mask byadding up the decimal value of the bits

    we borrowed. In the previous Class C example, we

    borrowed 3 bits. Below is the host octetshowing the bits we borrowed and theirdecimal values.128 64 32 16 8 4 2 1

    1 1 1

    We add up the decimal value of these bits andget 224 . Thats the last non-zero octet of oursubnet mask.So our subnet mask is 255.255.255. 224

  • 8/14/2019 Sub Netting Basics

    15/28

  • 8/14/2019 Sub Netting Basics

    16/28

    Last Non-Zero Octet

    Memorize this table. You should be ableto:Quickly calculate the last non-zero octetwhen given the number of bits borrowed.

    Determine the number of bits borrowedgiven the last non-zero octet.Determine the amount of bits left over forhosts and the number of host addressesavailable.

    BitsBorrowed

    Non-ZeroOctet Hosts

    2 192 623 224 304 240 145 248 66 252 2

  • 8/14/2019 Sub Netting Basics

    17/28

    4. What are the subnets?

    We now take our magic numberand use it as a multiplier. Our Class C address was

    210.93.45.0. We borrowed bits in the fourth

    octet, so thats where our multiplieroccurs

    1st subnet: 210.93.45.322nd subnet: 210.93.45.643rd subnet: 210.93.45.96

    We keep adding 32 in the fourth

  • 8/14/2019 Sub Netting Basics

    18/28

    Host & BroadcastAddresses Now you can see why we subtract 2when determining the number of host

    address. Lets 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 outearlier.

  • 8/14/2019 Sub Netting Basics

    19/28

    Application

    Presentation

    Session

    Transport

    Network

    Data-LinkPhysical

    CIDR Notation

    A Different Way toRepresent a Subnet

    Mask

    Network

  • 8/14/2019 Sub Netting Basics

    20/28

    CIDR Notation

    Classless Interdomain Routing is amethod of representing an IP addressand 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 subnetmask. Therefore, 255.255.255.224Also, 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 subnetaddress is 197.168.50.32!!

    Lets see the power of CIDR notation.

  • 8/14/2019 Sub Netting Basics

    21/28

    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, so202.151.37.192

  • 8/14/2019 Sub Netting Basics

    22/28

    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 broadcastaddress?

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

  • 8/14/2019 Sub Netting Basics

    23/28

    200.39.89.0/28

    What kind of address is200.39.89.0?

    Class C, so 4 bits borrowed

    Last non-zero octet is 240Magic number is 256 - 240 = 1632 is a multiple of 16 so 200.39.89.32is a subnet address--the secondsubnet address!!

    Whats the broadcast address of 200.39.89.32?

    32 + 16 -1 = 47, so 200.39.89.47

  • 8/14/2019 Sub Netting Basics

    24/28

    194.53.45.0/29

    What kind of address is 194.53.45.26?Class C, so 5 bits borrowedLast non-zero octet is 248Magic number is 256 - 248 = 8

    Subnets are .8, .16, .24, .32, ect.So 194.53.45.26 belongs to the third subnetaddress (194.53.45.24) and is a hostaddress.

    What broadcast address would this hostuse to communicate with other deviceson the same subnet?

    It belongs to .24 and the next is .32, so 1less is .31 (194.53.45.31)

  • 8/14/2019 Sub Netting Basics

    25/28

    No Worksheet Needed!

    After some practice, you should neverneed 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 borrowed256 - 192 = 64 , so 221.39.50.64

    For the rest of the addresses, just domultiples of 64 (.64, .128, .192).

  • 8/14/2019 Sub Netting Basics

    26/28

    The Key!!

    MEMORIZE THIS TABLE!!!Bits

    BorrowedNon-Zero

    Octet

    1 1282 1923 2244 2406 2527 2548 255

  • 8/14/2019 Sub Netting Basics

    27/28

    Practice On Your Own

    Below are some practice problems. Take out a sheet of paper andcalculate...

    Bits borrowed

    Last non-zero octetSecond subnet address and broadcastaddress

    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 Challen e: 132.59.0.0/19

  • 8/14/2019 Sub Netting Basics

    28/28

    Answers

    Address ClassBits

    BorrowedLast Non-

    Zero OctetMagic

    Number2nd Subnet's

    Address2nd Subnet's

    Broadcast192.168.15.0/26 C 2 192 64 192.168.15.128 192.168.15.191220.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.95202.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.25564.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.Click the back button if youre not done.

    Otherwise, click anywhere else in the screen tosee the answers.