IP Handouts

  • Upload
    dcsaw

  • View
    221

  • Download
    0

Embed Size (px)

Citation preview

  • 8/13/2019 IP Handouts

    1/4

    IP

    ADDRESS

    C

    LASSES

    CLASS

    CLAS

    S

    ID*

    START

    IP

    END

    IP

    A

    0

    1.

    0.

    0.

    0

    00000001.

    00000000.

    0000

    0000.

    00000000

    126.25

    5.255.255

    01111111.

    1111

    1111.

    11111111.

    11111111

    B

    10

    128.

    0.

    0.

    0

    10000000.

    00000000.

    0000

    0000.

    00000000

    191.25

    5.255.255

    10111111.

    1111

    1111.

    11111111.

    11111111

    C

    110

    192.

    0.

    0.

    0

    11000000.

    00000000.

    0000

    0000.

    00000000

    223.25

    5.255.255

    11011111.

    1111

    1111.

    11111111.

    11111111

    *Class

    IDrefers

    to

    the

    leading

    bitsofa

    lladdresses

    in

    th

    eclass.

    RESERvEd

    (AKA

    pRivAtE/unRou

    tAblE)

    AddRES

    S

    blocKS

    CLASS

    PREFIX

    SIZE

    *

    START

    IP

    END

    IP

    A

    8

    Bi

    t

    10.

    0.

    0.

    0

    00001010.

    00000000.

    0000

    0000.

    00000000

    010.25

    5.255.255

    00001010.

    1111

    1111.

    11111111.

    11111111

    B

    12

    Bit

    172.

    16.

    0.

    0

    10101100.

    00010000.

    0000

    0000.

    00000000

    172.3

    1.255.255

    10111111.

    0001

    1111.

    11111111.

    11111111

    C

    16

    Bit

    192.168.

    0.

    0

    11000000.

    10101000.

    0000

    0000.

    00000000

    192.16

    8.255.255

    11000000.

    1010

    1000.

    11111111.

    11111111

    lin

    K-

    locAl#

    169.254.

    0.

    1

    10101001.

    11111110.

    0000

    0000.

    00000001

    169.25

    4.254.255

    10101001.

    1111

    1110.

    11111110.

    11111111

    lo

    opbAcK

    127.

    0.

    0.

    1

    01111111.

    00000000.

    0000

    0000.

    00000001

    127.25

    5.255.254

    01111111.

    1111

    1111.

    11111111.

    11111110

    *Prefix

    Sizerefers

    to

    the

    leading

    bitso

    falladdresses

    in

    the

    block.

    #

    Link

    -localaddressesa

    reselfassignedwh

    ena

    DHCPaddressi

    sunavailable.

    B

    inary

    Value

    128

    64

    32

    16

    8

    4

    2

    1

    Sum

    128

    192

    224

    24

    0

    248

    252

    254

    255

    Pow

    erof

    2

    28

    27

    26

    2

    5

    24

    23

    22

    21

  • 8/13/2019 IP Handouts

    2/4

    SubnEt MASK bitS255.255.255.24011111111.11111111.11111111.11110000

    ^ ^Network Bits Host Bits

    Network Bits (ones) are always next to each other, starting at the left.

    Host Bits (zeroes) are always next to each other,

    starting at the right.

    2# Network Bits- 2 = Number of Available Subnets

    2# Host Bits- 2 = Number of Available Host Addresses

    (Remember, first and last arent legal)

    incREMEnt oR blocK SizEThere are several ways to find the increment:

    = 256 - (rightmost octet more than 0)= rightmost Network Bit (binary 1)= 2Host Bits

    SubnEt id orSubnEt nuMbERYoull be given an IP and asked to find what subnet

    it is in. Youll need the increment or subnet mask.

    Find what class the IP is:

    (first octet is: A=1-126; B=128-191; C=192-223)

    Then write the Se Maskover the IP AddressIf the Se Maskis 255, copy the IP octet below

    If the Se Maskis 0, copy the zero belowIf not 255 or 0, divide Maskoctet by IncrementRound down for your Subnet Number

    Take Incrementtimes Subnet Numberand copy it foryour complete Subnet IP Address

    BinaryValue 128 64 32 16 8 4 2 1Sum 128 192 224 240 248 252 254 255

    Power of 2 27 26 25 24 23 22 21 20

    255.255.255.24011111111.11111111.11111111.11110000

    256-240=16V

    ^10000 = 16 Binary Decimal

    ^24=16=2x2x2x2

    255.255.240. 0

    177.168. 83.101 177.168.???. 0 83 / (256-240) 5.188 ^ 3rd IP Octet ^ Increment (its 16)

    Youre in Subnet 5 ??? = 5

    (Subnet)x16

    (increment)=80

    Subnet IP

    177.168.80.0

    SubnEt MASKinG

  • 8/13/2019 IP Handouts

    3/4

    SubnEt MASKinG EXAMplESubnet Mask: 255.255.255.224IP License: 198.203. 18. 0Subnet Mask = 255.255.255.224; 224 in Binary = 11100000

    Interval or Block Size = 2H; Count the Zeros = 5; 25= 32 -> Increment = 32

    Usable Subnets = 2N- 2; Count the Ones = 3; 23= 8; 8 - 2 = 6 -> 6 usae SesUsable Hosts = Increment - 2; 32(Increment)- 2 = 30 -> 30 usae Hss per Se

    the Firs and las Subne, and he Firs and las Hos on each Subne are no usabe.

    SN# Subnet ID First Host las Hs braas Aress

    1 198.203. 18. 0 198.203. 18. 1 198.203. 18. 30 198.203. 18. 31

    2 198.203. 18. 32 198.203. 18. 33 198.203. 18. 62 198.203. 18. 63

    3 198.203. 18. 64 198.203. 18. 65 198.203. 18. 94 198.203. 18. 95

    4 198.203. 18. 96 198.203. 18. 97 198.203. 18.126 198.203. 18.127

    5 198.203. 18.128 198.203. 18.129 198.203. 18.158 198.203. 18.158

    6 198.203. 18.160 198.203. 18.161 198.203. 18.190 198.203. 18.191

    7 198.203. 18.192 198.203. 18.193 198.203. 18.222 198.203. 18.223

    8 198.203. 18.224 198.203. 18.225 198.203. 18.254 198.203. 18.255

    Subnet ID + 1 Next Subnet - 2 Next Subnet - 1

  • 8/13/2019 IP Handouts

    4/4

    vlSM:vARiAblE lEnGtH SubnEt MASKinGSubnet Mask: 255.255.255.224IP License: 198.203. 18. 0Standard subnetting provides a relatively small number of subnetworks, all with the same number of hosts.

    VLSM allows us to split up these subnets into smaller and smaller groups, to use the addresses efficiently.

    Say we were asked to subnet the 192.168.1.0/24 cidR k, and the following were the network sizes needed:

    55, 2, 28, 2, 11, 2, 2. (Networks of 2 hosts are usually between routers.)

    Now, if we used standard subnetting, we would have to use the 255.255.255.240 Se Maskto provide 14 subnets(because 6 isnt enough) but there are only 14 available hosts in each subnet! What do we do?

    Lets start by sorting the necessary subnet sizes from largest to smallest: 55, 28, 11, 2, 2, 2, 2

    Now, figure out what Subnet Mask is needed to fit 55 hosts (Check on your binary reference for powers of 2):

    2H- 2 = Number of Available Hosts; So we need 2Hto be at least (55 + 2). The smallest power of 2 bigger

    than 55 is 2

    6

    = 64. So that means we have 6 Host Bits (from 2

    6

    ). That means the last octet has six zeros.11000000. Use your cheat sheet to find that means our overall subnet mask is 255.255.255.192.

    Lets see whats happening in the diagram at the bottom:

    We can take one of those two available subnets and give it to the office that needs 55 hosts.

    Next, we need to fit 28. 25= 32, that will fit. That makes our last octet 11100000 or 255.255.255.224.

    That split our subnet into two equal subnets with 32 hosts available. Lets do it again.

    We need a subnet to fit 11 hosts now. 24= 16, that will fit. 11110000 is our new ending octet, or

    255.255.255.240. That gives us two subnets with 16 hosts each. One goes to the office with 11 hosts, and

    well split up the last one.

    We need a Subnet Mask to support four groups of two hosts. So we split that last subnet twice instead of once. 23= 8... 22= 4. That means we use 11111100 as our last octet, or 255.255.255.252.

    (Connections between two routers always use this subnet mask.)

    1 2 3 4

    nEtwoRKS in SubnEt MASK255.255.255.192:192.168.1.0(SN ID)

    192.168.1.64 (fs 55 hss)

    192.168.1.128

    192.168.1.192 (bRoAdcASt)

    nEtwoRKS in SubnEt MASK255.255.255.224:192.168.1.128 (fs 28 hss)

    192.168.1.160

    nEtwoRKS in SubnEt MASK255.255.255.240:192.168.1.160 (fs 11 hss)

    192.168.1.176

    nEtwoRKS in SubnEt MASK255.255.255.252:192.168.1.176 (fs 2 hss)

    192.168.1.180 (fs 2 hss)

    192.168.1.184 (fs 2 hss)

    192.168.1.188 (fs 2 hss)