Using_Subnet_Mask_to_control_Network_Size

Using_Subnet_Mask_to_control_Network_Size - Introduction to...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Introduction to Subnet Introduction to Subnet Mask Manipulation Review of IP Subnet Mask Review of formula for hosts/network Introduction to Network Address Creation Objectives Objectives Be able to determine an appropriate mask to meet a specific network size need Why is this important? Why is this important? True: IPv6 eliminates subnetting False: IPv4 is obsolete Predictions are that most current networking experts will need to know both protocols for another 10 years. The ability to understand subnetting prepares a student to understand high level concepts involving route summarization, hierarchal addressing, network security configurations, and protocol analysis. The fact that you did not understand that last bullet is an indicator of what is coming. Yes, its time to get serious. What happens when too many What happens when too many hosts are on a busy network? What happens when too many hosts What happens when too many hosts are on a network? Heavy data traffic contributes to PDU collisions Network slowdowns Loss of productivity Broadcast storms Unhappy customers (lost revenue) 3 Methods of limiting # of hosts 3 Methods of limiting # of hosts 1. Manually remembering how many addresses you have given out (and making a promise not to give out any more after the ‘magic’ number is reached) 2. 3. Dynamically mapping a defined DHCP Scope to a certain range of numbers Logically dividing the network so that the maximum addresses are used within a defined network. Limitations of the first two methods Limitations of the first two methods of limiting # of hosts Manually remembering how many addresses you have given out and making a promise not to give out any more after the magic number is reached You will forget your promise There will always be a need for more The network will reach critical mass and just quit working properly. Dynamically mapping a DHCP Scope to a certain range of numbers Causes unused addresses to be ‘lost’ and never reclaimed Methods of limiting # of hosts Methods of limiting # of hosts X Manually remembering how many addresses you have given X Dynamically mapping a DHCP Scope to a certain range of numbers out and making a promise not to give out any more after the magic number is reached Logically dividing the network so that the maximum addresses are used within a defined network. This is called subnetting (or subdividing) the network Methods of limiting # of hosts Methods of limiting # of hosts Logically dividing the network so that the maximum addresses are used within a defined network. Limits the wasting of addresses You can still use DHCP Guarantees that the maximum specified will not be exceeded. Is flexible enough to accommodate different sized branches/departments within the company Key to Subnetting: the subnet mask Key to Subnetting: the subnet mask Subnet Mask is basically a network filter It takes an ip address and filters out the network part. The number of bits turned in the mask is equal to the number of bits that make up the network address. By manipulating the length of the mask we can change the number of bits available for host addresses, thus limiting the size of the network. Subnet Mask is written three ways Subnet Mask is written three ways Binary 11111111111111111111111100000000 Decimal ­255.255.255.0 Translate the bits on into their decimal equivalent The slash indicates that the number that follows is the number of bits on in the mask. CIDR notation /24 How Subnet Mask Works How Subnet Mask Works A subnet mask in binary is a series of 32 bits in the format of a group of 1s followed by 0s such as: 11111111111111111111111100000000 The ones are used to define the network part of an ip address and the zeros are used to filter out the host part. How Subnet Mask Works How Subnet Mask Works Here is another example: 11111111111111111111111111111000 The ones are used to define the network part of an ip address and the zeros are used to define the host part. Notice that there are only 3 host bits here. The number of combinations is limited by how many combinations of these bits you can create How Subnet Mask Works How Subnet Mask Works Again using the same mask: 000 001 010 011 100 101 110 111 11111111111111111111111111111000 The number of unique address combinations is limited by how many combinations of these host bits you can create. There are two numbers 0 & 1. Since there are 3 bits, they create 2 x 2 x 2 combinations of bits. The formula is 2 to the n power, written 2^n, in other words 2 to the 3rd power=8 In class lab exercise: Find the total number of addresses per network if you have: 2 host bits 3 host bits 4 host bits 5 host bits 6 host bits 7 host bits 8 host bits Remember the formula: # Hosts = 2^n Math Review: How many hosts can Math Review: How many hosts can you have in a network? Total number of hosts per network if you have: 2 host bits = 2^2 = 2x2 = 4 3 host bits = 2^3 = 2x2x2 = 8 4 host bits = 2^4 = 2x2x2x2 = 16 5 host bits = 2^5 = 2x2x2x2x2 = 32 6 host bits = 2^6 = 2x2x2x2x2x2 = 64 7 host bits = 2^7 = 128 8 host bits = 2^8 = 256 Math Review: How many hosts can Math Review: How many hosts can you have in a network? Notice how the number doubles with each increase in exponent So What? In class analysis: So What? In class analysis: Case Study: A customer is complaining about how slow his network is. You did some network analysis and found that by cutting the number of hosts per network in half from 256 to 128, his network would run faster. What subnet mask would you need to impose in order to limit his network to this number? So What? In class analysis: So What? In class analysis: Case Study: A customer is complaining about how slow his network is. You did some network analysis and found that by cutting the number of hosts per network in half from 256 to 128, his network would run faster. What subnet mask would you need to impose in order to limit his network to this number? Solution: 128=2^n n=7 this translates to the following in binary: 11111111 11111111 11111111 10000000 (7 zeroes) Or 255.255.255.128 (three groups of eight bits on, 1 bit on in Time Out Review: How to turn Time Out Review: How to turn binary into decimal Decimal Value Binary Value 128 64 32 16 8 0 1 1 0 0 4 1 2 0 1 1 Cumulative 0 result 64 96 96 96 100 100 101 How to turn binary into decimal How to turn binary into decimal Binary String 10000000 11000000 11100000 11110000 11111000 11111100 11111110 11111111 128 64 32 16 8 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 4 0 0 0 0 0 1 1 1 2 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 decimal 128 192 224 240 248 252 254 255 A different look: BITS OFF A different look: BITS OFF Binary String 00000000 10000000 11000000 11100000 11110000 128 64 32 16 8 0 1 1 1 1 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1 4 0 0 0 0 0 0 1 1 2 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 # bits off 8 7 6 5 4 3 2 1 11111000 1 11111100 1 11111110 1 Examples of Subnet Masks and Examples of Subnet Masks and Network Sizes Hint: Remember your decimal value placeholders 255.255.255.0 = 8 bits off = 256 addresses 255.255.255.128 = 7 bits off = 128 addresses 255.255.255.192 = 6 bits off = 64 addresses 255.255.255.224 = 5 bits off = 32 addresses 255.255.255.240 = 4 bits off = 16 addresses 255.255.255.248 = 3 bits off = 8 addresses 255.255.255.252 = 2 bits off = 4 addresses 255.255.255.254 = 1 bit off = 2 addresses Hint: Memorize this Chart Hint: Memorize this Chart Bits 1 on 2 3 32 224 4 16 240 5 8 248 6 4 252 7 2 254 8 1 255 Bit 128 64 value Octet 128 192 mask When taking tests, always write this table out on a scrap sheet of paper before starting the test timer. It will help you eliminate mathematical errors and save time. 2^n is Theoretical but not real 2^n is Theoretical but not real You cannot use the network address You cannot use the broadcast address The address that is all zeros in the host section The address that is all ones in the host section The real formula subtracts these two addresses. This is the revised formula to commit to memory: 2 ^n ­ 2 In class Exercise In class Exercise LAB: Define the subnet masks needed for the following networks in this drawing Hint: How many bits off in each network? 2 hosts Switch Router Router 30 hosts Switch 14 hosts Switch 126 hosts In class Exercise In class Exercise LAB: Define the subnet masks needed for the following networks in this drawing Note: net hosts=2^n­2 Router 2 hosts: 2 bits off Switch 30 hosts: 5 bits off Switch 14 hosts: 4 bits off Router Switch 126 hosts: 7 bits off In class Exercise In class Exercise LAB: Define the subnet masks needed for the following networks in this drawing Note: the official acronym for this is VLSM Router 2 bits off =255.255.255.25 2 Switch 5 bits off =255.255.255.224 Switch 4 bits off= 255.255.255.240 Router Switch 7 bits off= 255.255.255.128 In class Exercise In class Exercise LAB: Using the revised formula, define the subnet masks needed for the networks as listed in the handout or on screen 2 hosts Switch Router Router 62 hosts Switch 6 hosts Switch 510 hosts Example Solution to exercise Example Solution to exercise for 510 hosts: Apply the formula 2^n – 2 = 510 2 hosts Switch Router Router 62 hosts Switch 6 hosts Switch 510 hosts Solution for 510 hosts (continued) Solution for 510 hosts 2^n ­2 = 510 (apply some simple algebra here) 2^n ­2 (+2) = 510 (+2) 2^n = 512 n = 9 – meaning 9 host bits (bits off) 9 bits off means 23 bits on (9 + 23 = 32 bits) 23 bits= 2 groups of 8 bits + 1 group of 7 bits 8 bits in 1st octet + 8 bits in 2nd octet + 7 bits in the 3rd The decimal mask is: 255.255.254.0 10 minute break 10 minute break If you are having trouble with the math or any other aspect of the concept up to this point, this would be a good time to practice or get additional help from a fellow student or the instructor. Host Addressing (continued) Host Addressing What you should now know to be successful How to change a binary number into a decimal number How to make a subnet mask based on the number of bits turned on How to make a subnet mask based on the number of host addresses needed per network (bits off) What do you do with this information?? Answer: Create IP addresses Answer: So far, we only created a subnet mask appropriate for a certain sized network We still need to know how to create network numbers from the subnet mask We also need to know how to determine the ip addresses to be given to hosts on the network based on the network and the subnet mask we created. We do this next. Creating IP addresses Creating IP addresses Problem: Given a certain network number and subnet mask, what are the first and last host numbers in the host range? Solution: The first host number is the first number after the network number. The last host number is the last number before the broadcast address. That was too easy, right? Hmm…well what is the broadcast address? What are the addresses created? What are the addresses created? Example: Network 203.16.1.40 mask 255.255.255.248 There are 3 bits off in the mask This means that there are 8 total addresses Here are the addresses for network 203.16.1.40 But focus on last octet Host part in yellow Address Last octet 00101000 00101001 00101010 00101011 00101100 00101101 00101110 00101111 203.16.1.40 203.16.1.41 203.16.1.42 203.16.1.43 203.16.1.44 203.16.1.45 203.16.1.46 203.16.1.47 Important: When the host is all zeros, that is the network address. When the host is all ones, that is a broadcast address What are the addresses created? What are the addresses created? Example: Network 203.16.1.40 mask /29 For this network, the first host address is 203.16.1.41 When the host is all ones, that is a broadcast address. The last address before the broadcast is the last host address. The host range is everything from the first to the last usable address. But focus on last octet Host part in yellow Address Last octet 00101000 00101001 00101010 00101011 00101100 00101101 00101110 00101111 203.16.1.40 203.16.1.41 203.16.1.42 203.16.1.43 203.16.1.44 203.16.1.45 203.16.1.46 203.16.1.47 Want a short cut?? Want a short cut?? 2^8 = 256 (total combinations in an octet) Subnet mask is 248 Subtract 256 ­­ 248 =8 The networks are in increments of 8 in the last octet, so… what now? 255.255.255.248= increments of 8 255.255.255.248= increments of 8 Example: 203.16.1.0 is the ‘mother class’ C network In increments of 8, the networks are: 203.16.1.0 203.16.1.8 203.16.1.16 203.16.1.0 203.16.1.24 203.16.1.32 203.16.1.40 Range 1.41 – 1.46, 1.47 is a broadcast address 203.16.1.48 …… Till you get to the last one which ends at the number that is your subnet mask number: 248 203.16.1.248 The shortcut works in any class The shortcut works in any class Class A example: 10.64.0.0 /20 (255.255.240.0) 1st network = 10.64.16.0 First host 10.64.16.1, Last host 10.64.31.254 Note that the broadcast address 10.64.31.255 is the last address before the next network 2nd network = 10.64.32.0 (16 + 16) 3rd network = 10.64.48.0 (32 + 16) What is the last network? 10.64.240.0 Handouts Handouts You should be able to use the handouts to: Create a network using a subnet mask appropriate sized to accommodate a particular need Use the subnet mask to determine the host addresses in a network Define the range of addresses and broadcast address of a specific network. Use the subnet mask to determine the network numbers created by the mask. ...
View Full Document

This document was uploaded on 12/07/2010.

Ask a homework question - tutors are online