c 5 Bit 20703 Ext Subnet

Embed Size (px)

Citation preview

  • Layer 3Routing and Addressing

  • Layer 3 ResponsibilitiesMove data through a set of networks.Use a hierarchical addressing scheme.Segment network and control flow of traffic.Talk to other networks with services offered by ISPs (Internet Service Providers).

  • Layer 3 DevicesRoutersInterconnect network segments or entire networks.Make logical decisions based on IP addresses.Determines best path for data on an internetwork.A.K.A Layer 3 Switching

  • Path DeterminationThe process the router uses to choose the next hop in the path the packet travels.The router uses the network address to identify the destination network of a packet within an internetwork.IP addresses can be assigned by a network administrator or automatically (dynamically.)

  • Layer 3 Packet/Datagram

  • Network Layer Addresses233.14.17.0Network layer addresses are 32 bits long.They are represented as four octets in dotted decimal format.The IP address has two components:The Network IDThe Host Id

  • Layer 3 AddressesNetwork IDAssigned by ARIN (www.arin.net)Identifies the network to which a device is attached. May be identified by one, two, or three of the first three octets.Host IDAssigned by a network administrator.Identifies the specific device on that network. May be identified by one, two, or three of the last three octets.

  • IP Addresses32 bit address represented as 8 bit dotted decimals.Different class addresses reserve different amounts of bits for the Network and Host portions of the address.

  • ClassesHow do you know what class an IP address is in?If the first octet is between:0 127 it is a class A address128-191 it is a class B address192 223 it is a class C address

  • Number of HostsMaximum number of hosts vary for each class.Class A has 16,777,214 available hosts (224 2)Class B has 65,534 available hosts (216 2)Class C has 254 available hosts (28 2)

    The first address in each network is reserved for the network address and the last address is reserved for the broadcast address.

  • Recognizing Class in Binary FormatInitial bit pattern in first octet of IP address.

  • IP Addresses as Decimal Numbers

  • Reserved AddressesNetwork Address (wire address) This is an IP address that ends with binary 0s in all host bits.Class A Network Address example:113.0.0.0Hosts on a network can only communicate directly with other hosts if they have the same network ID. If they dont, they will not be able to communicate unless there is another device connecting the networks.

  • Reserved Addresses2. Broadcast Address is used to send data to all of the devices on a network. Broadcast IP addresses end with binary 1s in the host part of the address.Class B Broadcast Address example:176.10.255.255 (Remember decimal 255 = binary 11111111)

  • Basics of SubnettingSubnetworks are smaller divisions of networks.They provide addressing flexibility.A.K.A. subnetsSubnet addresses are assigned locally, usually by a network administrator.Subnets reduce a broadcast domain.

  • Subnet AddressesInclude Class A, B, or C network portion plus a subnet field and a host field.Bits are borrowed from the host field and are designated as the subnet field.

    NetworkSubnetHost

  • How many bits can I borrow?The minimum number of bits you can borrow is 2.

  • Default Subnet MasksClass A 255.0.0.0Class B255.255.0.0Class C 255.255.255.0

  • Calculating a SubnetWe will subnet the IP address:223.14.17.0What class IP address is this?Class C

  • Step #1Determine the default subnet mask

    Class C default subnet mask:255.255.255.0

  • Step #2Determine the number of subnets needed and hosts on each to determine how many bits to borrow from the host ID.Need:13 subnets10 hosts on each subnet

  • Step #3Figure the actual number of subnets and hosts by borrowing bits from host ID.Lets see how many subnets and hosts we will have by borrowing 4 bits from the host.

  • Step #3 continued16 possible subnets16 possible hosts for each subnet

  • Step #3 continuedWe get 16 possible subnets and 16 possible hosts for each subnet because:For the 4 bits borrowed each bit can be a 1 or a 0 leaving you with 24 or 16 possible combinations.The same goes for the 4 leftover host bits.Important: There are only 14 available subnets and hosts on each subnet. Why?

  • Step #3 continuedBecause you cannot use the first and last subnet.Because you cannot use the first and last address within each subnet.For each, one is the broadcast address and one is the network address.

  • Step #4Determine the subnet mask.Where X represents the borrowed bits for subnetting.

  • Step #4 continuedAdd the place values of X together to get the last octet decimal value of the subnet mask.128 + 64 + 32 + 16 = 240The subnet mask is: 255.255.255.240The subnet mask is used to reveal the subnet and host address fields in IP addresses.

  • Step 5Determine the ranges of host addresses for each subnet.

  • Step 5 continued

    Subnet #Subnet BitsHost BitsIn Decimal910000000-1111.128 -.1431010010000-1111.144 - .1591110100000-1111.160 - .1751210110000-1111.176 - .1911311000000-1111.192 - .2071411010000-1111.208 - .2231511100000-1111.224 - .2391611110000-1111.240 - .255

  • Step 5 continuedThere are 16 possible subnets.There are 16 possible hosts on each subnet.That equals 256 possible hosts.What are our available subnets?What are our available hosts on each subnet? Why?????

  • Figuring SubnetNetwork AddressesStep #1: Change the IP host address to binary.Step #2: Change the subnet mask to binary.Step #3: Use the boolean operator AND to combine the two.Step #4:Convert the network binary address to dotted decimal.

  • Figuring SubnetNetwork AddressesIP Host172.16.2.120Subnet Mask255.255.255.010101100.00010000.00000010.0111100011111111.11111111.11111111.0000000010101100.00010000.00000010.00000000172.16.2.0This is the subnet network address. It is the lowest numbered address on the subnet network. It can help determine path.AND

  • Revision on IP AddressingSubnetting Review

  • Logical AddressingAt 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 - 127Class B: 128 - 191Class C: 192 - 223Class D: 224 - 239 (multicasting)Class E: 240 - 255 (experimental)

  • Network vs. HostClass A: 27 = 126 networks; 224 > 16 million hostsClass B : 214 = 16,384 networks; 216 > 65,534 hostsClass C : 221 > 2 million networks; 28- = 256-2=254 hosts

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

  • Stealing BitsIn order to subnet, we must steal or borrow bits from the host portion on the IP address.First, we must to determine how many subnets we need and how many hosts per subnet.We do this through the power of 2For example, I need 8 subnets from a Class C:24 = 16 - 2 = 14 subnetsRemember: we subtract 2 because these subnets are not usedHow many host do we have?Its a Class C, so 4 bits are left: 24 = 16 - 2 = 14 hostsRemember: we subtract 2 because one address is the subnet address and one is the broadcast address

  • Subnet MaskWe determine the subnet mask by adding up the decimal value of the bits we borrowed.In the previous Class C example, we borrowed 4 bits. Below is the host octet showing the bits we borrowed and their decimal values.We add up the decimal value of these bits and get 240. Thats the last non-zero octet of our subnet mask.So our subnet mask is 255.255.255.240

  • Last Non-Zero OctetMemorize 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.

    Sheet1

    Bits BorrowedNon-Zero OctetHosts

    219262

    322430

    424014

    52486

    62522

    Sheet2

    Sheet3

  • CIDR NotationClassless Interdomain Routing is a method of representing an IP address and its subnet mask with a prefix.For example: 192.168.50.0/27What do you think the 27 tells you?27 is the number of 1 bits in the subnet mask. 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 subnet address is 197.168.50.32!!Lets see the power of CIDR notation.

  • 202.151.37.0/26Subnet mask?255.255.255.192Bits borrowed?Class C so 2 bits borrowedMagic Number?256 - 192 = 64First useable subnet address?202.151.37.64Third useable subnet address?64 + 64 + 64 = 192, so 202.151.37.192

  • 198.53.67.0/30Subnet mask?255.255.255.252Bits borrowed?Class C so 6 bits borrowedMagic Number?256 - 252 = 4Third useable subnet address?4 + 4 + 4 = 12, so 198.53.67.12Second subnets broadcast address?4 + 4 + 4 - 1 = 11, so 198.53.67.11

  • 200.39.89.0/28What kind of address is 200.39.89.32?Class C, so 4 bits borrowedLast non-zero octet is 240Magic number is 256 - 240 = 1632 is a multiple of 16 so 200.39.89.32 is a subnet address--the second subnet address!!Whats the broadcast address of 200.39.89.32?32 + 16 -1 = 47, so 200.39.89.47

  • 194.53.45.0/29What kind of address is 194.53.45.26?Class C, so 5 bits borrowedLast non-zero octet is 248Magic number is 256 - 248 = 8Subnets 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/26You 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.64For the rest of the addresses, just do multiples of 64 (.64, .128, .192).

  • The Key!!MEMORIZE THIS TABLE!!!

    Sheet1

    Bits BorrowedNon-Zero OctetHosts

    219262

    322430

    424014

    52486

    62522

    Sheet2

    Sheet3

  • Practice On Your OwnBelow are some practice problems. Take out a sheet of paper and calculate...Bits borrowedLast non-zero octetSecond subnet address and broadcast address192.168.15.0/26220.75.32.0/30200.39.79.0/29195.50.120.0/27202.139.67.0/28Challenge: 132.59.0.0/19Challenge: 64.0.0.0/16

  • AnswersDont 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 to see the answers.

    Sheet1

    AddressClassBits BorrowedLast Non-Zero OctetMagic Number2nd Subnet's Address2nd Subnet's Broadcast

    192.168.15.0/26C219264192.168.15.128192.168.15.191

    220.75.32.0/30C62524220.75.32.8220.75.32.15

    200.39.79.0/29C52488200.39.79.16220.39.79.23

    195.50.120.0/27C322432195.50.120.64195.50.120.95

    202.139.67.0/28C424016202.139.67.32202.139.67.47

    132.59.0.0/19B322432132.59.64.0132.59.95.255

    64.0.0.0/16A8255164.2.0.064.2.255.255

    Sheet2

    Sheet3