1 / 48

IP Addressing

IP Addressing. IP Addressing. Basic Addressing Working with Addresses Summarization & Subnets VLSM Working with VLSM Networks Classful Addressing Working with Classful Addressing. Basic Addressing. IP addresses are written in dotted decimal format.

bell-webb
Télécharger la présentation

IP Addressing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IP Addressing

  2. IP Addressing • Basic Addressing • Working with Addresses • Summarization & Subnets • VLSM • Working with VLSM Networks • Classful Addressing • Working with Classful Addressing

  3. Basic Addressing • IP addresses are written in dotted decimal format. • Four sections are separated by dots. • Each section contains a number between 0 and 255. Dots separate the sections 10.1.1.1 Each section contains a number between 0 and 255

  4. Basic Addressing • Why is each section a number between 0 and 255? • Computers operate in binary, humans operate in decimal. • Computers treat IP addresses as a single large 32 digit binary number, but this is hard for people to do. • So, we split them up into four smaller sections so we can remember and work with them better! Dots separate the sections 10.1.1.1 Each section contains a number between 0 and 255 Why????

  5. Basic Addressing 10.1.1.1 • 32/4 == 8. • 28 = 256. • But, computers number starting at 0, so to make a space of 256 numbers, we number from 0 to 255. 00001010 00000001 00000001 00000001 8 8 8 8 32 Each 8 digit group represents a number between 0 and 255

  6. Basic Addressing • Each device on a network is assigned an IP address. • Each IP address has two fundamental parts: • The network portion, which describes the physical wire the device is attached to. • The host portion, which identifies the host on that wire. • How can we tell the difference between the two sections? 10.1.1.1 00001010 00000001 00000001 00000001 Host Network

  7. Basic Addressing 10.1.1.1 • The network mask shows us where to split the network and host sections. • Each place there is a 1 in the network mask, that binary digit belongs to the network portion of the address. • Each place there is a 0 in the network mask, that binary digit belongs to the host portion of the address. 00001010 00000001 00000001 00000001 Host Network 11111111 11111111 11111111 00000000 255.255.255.0

  8. Basic Addressing 10.1.1.1 • An alternative set of terminology is: • The network portion of the address is called the prefix. • The host portion of the address is called the host. • The network mask is expressed as a prefix length, which is a count of the number of 1’s in the subnet mask. 00001010 00000001 00000001 00000001 Host Prefix 11111111 11111111 11111111 00000000 8 + 8 + 8 = 24 10.1.1.1/24

  9. The network address is the IP address with all 0’s in the host bits. The broadcast address is the IP address with all 1’s in the host bits. Packets sent to either address will be delivered to all the hosts connected to the wire. Basic Addressing 10 1 1 0/24 00001010 000000011 00000001 00000000 prefix host these bits are 0, so this is the network address 10 1 1 255/24 00001010 000000011 00000001 11111111 prefix host these bits are 1, so this is the broadcast address

  10. Two of the most common questions you are going to face when dealing with IP addresses are: What’s the network? What’s the host? How dow we figure this out? Working with Addresses 192.168.100.80/26 ????

  11. First, convert the IP address into binary. This is easier than it looks. Work with one octet at a time. Divide by two, farm out the remainder on the side. The bottom is the binary MSD, the top the binary LSD. 192 divide by 2 divide by 2 divide by 2 divide by 2 divide by 2 divide by 2 divide by 2 divide by 2 remainder remainder remainder remainder remainder remainder remainder remainder 96 0 0 48 Right 24 0 12 0 6 0 3 0 1 1 Left 0 1 Working with Addresses (The Hard Way)

  12. Working with Addresses (The Hard Way)

  13. Working with Addresses (The Hard Way)

  14. To convert from binary to decimal, use a simple chart. Add the number indicated for each 1 set in the binary number. Working with Addresses (The Hard Way)

  15. First, if you are using a network mask, convert it to a prefix length. For each octet in the network mask that is 255, add 8 to the prefix length. For the one octet that isn’t 255, convert to binary and add the right number of bits--or use a chart! Working with Addresses (The Easy Way) 192 == 11000000 255.255.255.192 8 +8 +8 +2 == 26

  16. Take the prefix length and divide by 8. Take the resulting number, and ignore those octets out of the IP address--these are all part of the network address! We’re going to use the remainder to find the fourth octet of the network address. Working with Addresses (The Easy Way) 192.168.100.80/26 These three octets are part of the network 26/8 == 3 (remainder 2) The remainder tells us what the network address in the fourth octet is

  17. Take the remainder, and find the corresponding “multiple” on the chart; in this case, 64. The largest multiple of 64 that will fit into 80 is 64, so the network is 64. Add the three octets we “set aside” earlier, and the network (prefix!) is 192.168.100.64/26. 80 - 64 == 16, so the host address is 16. Working with Addresses (The Easy Way) Remainder == 2 64 x 1 == 64 64 x 2 == 128 Network is 64! 192.168.100.64/26 80 - 64 == 16 16 Hosts!

  18. How many hosts are in this network? The remainder tells us there are 64 addresses, minus the network and broadcast addresses, so 62 hosts. To find the broadcast address, subtract 1 from the number of hosts, and add that number to the network address. The key is to work in octets, rather than trying to work with the entire IP address at once! Working with Addresses (The Easy Way) Remainder == 2 64 addresses 64 - 2 == 62 hosts 64 + (64 - 1) == 127 192.168.100.127 is the broadcast address

  19. What if the prefix length is less than 24? Take the prefix length and divide by 8. Take the resulting number, and ignore those octets out of the IP address--these are all part of the network address! We’re going to use the remainder to find the third octet of the network address. Working with Addresses (The Easy Way) 192.168.100.80/22 These three octets are part of the network 22/8 == 2 (remainder 6) The remainder tells us what the network address in the third octet is

  20. Take the remainder, and find the corresponding “multiple” on the chart; in this case, 4. The largest multiple of 64 that will fit into 80 is 64, so the network is 64. Add the two octets we “set aside” earlier, and make any octets after the network 0’s (the fourth octet). The network (prefix!) is 192.168.100.0/22. Working with Addresses (The Easy Way) Remainder == 6 4 x 25 == 100 4 x 26 == 104 Third octet is 100! Set the fourth octet to 0. 192.168.100.0/22

  21. To find the number of hosts, take the number of octets set to 0, which is 1 in this case (the fourth octet), and multiply by 256. Next, take the number relating to the remainder from the chart, and multiple this by the number we just found above. Subtract two. Working with Addresses (The Easy Way) “0” octets == 1 1 x 256 == 256 Remainder == 6 4 x 256 == 1024 1024 – 2 == 1022 hosts

  22. Working with Addresses (The Easy Way) • The key is to work in octets, rather than trying to work with the entire IP address at once!

  23. A single network address (prefix!) represents a set of hosts attached to a wire. We can abstract this, and simply say that a prefix represents a set of reachable addresses. We can say that we’ve “summarized” information about the hosts attached to the physical wire by referring to the entire group as a single network. Summarization & Subnets 10.1.1.8 10.1.1.7 10.1.1.4 10.1.1.2 10.1.1.0/26

  24. In effect, we’ve shortened the network part of the address (prefix!), and lengthened the host portion of the address, in effect describing more hosts (destinations) in a single address. If we can shorten the prefix length to describe multiple hosts with a single network address, why can’t we shorten the prefix length so a single network address describes two networks? We can! It’s called address summarization, or just summarization. Summarization & Subnets These host addresses are described by this network 10.1.1.2/32 10.1.1.4/32 10.1.1.7/32 10.1.1.8/32 10.1.1.0/26 10.1.1.64/26 These networks are described by this network 10.1.1.0/25

  25. Changing the mask bit from 1 to 0, which shortens the prefix length, means the bit in the two networks that distinguish them from one another are now considered host bits! Summarization & Subnets

  26. A network which is a part of another network is called a subnet. There is another term, the supernet, but it’s definition depends on whether you are using VLSM subnetting, or calssful subnetting, so it will be defined in the next two sections. Summarization & Subnets These host addresses are subnets of this network 10.1.1.2/32 10.1.1.4/32 10.1.1.7/32 10.1.1.8/32 10.1.1.0/26 10.1.1.64/26 These networks are subnets of this network 10.1.1.0/25

  27. VLSM: Variable Length Subnet Masking It simply means that the entire IP address space is treated as one flat address space. Any prefix length is allowed in the network at any point. VLSM 10.1.1.0/24 10.1.2.0/25 10.1.2.128/26 10.1.2.192/27 All of these are valid in the same network!

  28. VLSM • At this point, you pretty much already know VLSM! You already know how to find the network address, broadcast address, and number of hosts in a network. • Two other common problems in working with VLSM networks remain: • Building summary addresses from groups of networks. We won’t cover this here (maybe later in routing). • Building network addressing schemes from a given number of hosts and networks.

  29. Working with VLSM Networks • You have 5 subnets with the following numbers of hosts on them: 58, 14, 29, 49, 3 • You are given the address space 10.1.1.0/24. • Determine what subnets you could use to fit these hosts into it. • How to solve this: • Start with the chart! • Order the networks from the largest to the smallest. • Find the smallest number in the chart that will fit the number of the largest number of hosts + 2. • Continue through each space needed until you either run out of space, or you finish.

  30. 58, 14, 29, 49, 3: reorder to 58, 49, 29, 14, 3. Start with 58. Smallest number larger than (58 + 2) is 64. 64 is 2 bits. 24 bits of prefix length in the address space given, add 2 for 26. First network is 10.1.1.0/26. The next network is 10.1.1.0 + 64, so we start the next “round” at 10.1.1.64. Working with VLSM Networks 32 < (58 + 2) < 64 24 + 2 == 26 10.1.1.0/26 takes care of the first 58 hosts Start the next block at 10.1.1.64

  31. Next block is 49 hosts. Smallest number larger than (49 + 2) is 64. 64 is 2 bits. 24 bits of prefix length in the address space given, add 2 for 26. We start this block at 10.1.1.64, so network is 10.1.1.64/26. The next network is 10.1.1.64 + 64, so we start the next “round” at 10.1.1.128. Working with VLSM Networks 32 < (49 + 2) < 64 24 + 2 == 26 10.1.1.64/26 takes care of the next 49 hosts Start the next block at 10.1.1.128

  32. Next block is 29 hosts. Smallest number larger than (29 + 2) is 32. 32 is 3 bits. 24 bits of prefix length in the address space given, add 3 for 27. We start this block at 10.1.1.128, so network is 10.1.1.128/27. The next network is 10.1.1.128 + 32, so we start the next “round” at 10.1.1.160. Working with VLSM Networks 16 < (29 + 2) < 32 24 + 3 == 27 10.1.1.128/27 takes care of the next 29 hosts Start the next block at 10.1.1.160

  33. Next block is 14 hosts. Smallest number larger than (14 + 2) is 16. 16 is 4 bits (actually equal, but it still works!). 24 bits of prefix length in the address space given, add 4 for 28. We start this block at 10.1.1.160, so network is 10.1.1.160/27. The next network is 10.1.1.160 + 16, so we start the next “round” at 10.1.1.176. Working with VLSM Networks (14 + 2) == 16 24 + 4 == 28 10.1.1.160/28 takes care of the next 14 hosts Start the next block at 10.1.1.176

  34. Last block is 3 hosts. Smallest number larger than (3 + 2) is 8. 8 is 5 bits. 24 bits of prefix length in the address space given, add 5 for 29. We start this block at 10.1.1.176, so network is 10.1.1.176/29. This is the last block of hosts, so we’re done! Working with VLSM Networks 4 < (5 + 2) < 8 24 + 5 == 29 10.1.1.176/29 takes care of the next 14 hosts

  35. A subnet is any network which is “part of” a larger network space. A supernet is any network which covers a larger space than a given network, including the space covered by the network. 10.1.1.0/24 10.1.2.0/24 10.1.2.0/25 10.1.2.128/25 Working with VLSM Networks 10.1.0.0/23 subnets supernet subnets supernet 10.1.2.128/26 supernet subnet

  36. Classful Addressing • Classful subnetting is similar to VLSM, with two more rules: • The IP address space is divided into “classes,” with each class having a specific “natural” prefix length. Each block of address space is called a “major net.” • You cannot have more than one prefix length within a major net.

  37. Classful Addressing

  38. It’s illegal to have multiple network masks within a single major network. There cannot be a mix of /24’s and /25’s in the 10.0.0.0/8 major network. There cannot be a mix of /25’s and /26’s in the 11.0.0.0/8 network. Classful Addressing 10.1.1.0/24 10.1.2.0/24 10.1.3.0/25 10.1.3.128/25 11.1.1.0/25 11.1.1.128/26 two different prefix lengths in the same major network

  39. Working with Classful Addressing • You can find the network address, broadcast address, and number of hosts as we described earlier. • You can find the number of networks by subtracting the network mask from the natural mask, and then using the chart.

  40. 10.1.1.0/25 is in the 10.0.0.0 class A major network. The natural prefix length for a class A network is /8. Subtract the natural prefix length from the actual prefix length. Divide by 8, holding the remainder on the side. Working with Classful Addressing 10.1.1.0/25 10.0.0.0/8 is class A 25 – 8 == 17 17/8 == 2, 1 remaining

  41. Find the remainder in the power of two’s chart. Multiply the result, 256, and the number from the power of two’s chart. Subtract 2. Working with Classful Addressing 10.1.1.0/25 10.0.0.0/8 is class A 25 – 8 == 17 17/8 == 2, 1 remaining (256 x 2) x 128 == 65536 65536 – 2 == 65534 networks

  42. Subnet 0 The network with all the between the host and the natural major net set to 0. This only exists in classful addressing schemes. Working with Classful Addressing 10 0 0 0/24 00001010 00000000 00000000 00000000 natural network natural host configured network these bits are 0, so this is subnet 0 10.0.0.0/16 Yes 10.0.1.0/16 No 172.31.0.0/24 Yes 172.31.1.0/24 No 192.168.100.0/25 Yes

  43. Broadcast Subnet The network with all the bits between the host and the natural major network set to 1. This only exists in calssful address schemes. Working with Classful Addressing 10 255 255 0/24 00001010 11111111 11111111 00000000 natural network natural host configured network these bits are 1, so this is the broadcast network 10.255.0.0/16 Yes 10.255.0.0/24 No 172.31.255.0/24 Yes 172.31.255.0/25 No 192.168.100.128/25 Yes

  44. Working with Classful Addressing • You have 5 subnets with the following numbers of hosts on them: 58, 14, 29, 49, 3 • You are given the address space 10.1.0.0/22. • Determine what subnets you could use to fit these hosts into it. • How to solve this: • Start with the chart! • Find the largest set of hosts. • Find the smallest number in the chart that will fit the number of the largest number of hosts + 2. • Use that prefix length for all the subnets (remember you cannot have different subnet masks within the same major network).

  45. A subnet is any prefix with a prefix length longer than the natural prefix length of the major network. A supernet is any prefix with a prefix length shorter than the natural prefix length of the major network. Working with Classful Addressing 172.18.1.0/24 Subnet 10.2.0.0/9 Subnet 172.34.0.0/15 Supernet 192.168.44.64/25 Subnet 192.168.44.0/23 Supernet

  46. Private & Special Address Space

  47. Cisco IOS Show IP Route two different prefix lengths under the same major network 2651A#sho ip route .... Gateway of last resort is not set C 208.0.12.0/24 is directly connected, Serial0/2.... S 208.1.10.0/24 [1/0] via 208.0.12.11 .... 144.2.0.0/16 is variably subnetted, 2 subnets, 2 masks S 144.2.2.0/24 [1/0] via 208.0.12.11 S 144.2.3.0/29 [1/0] via 208.0.12.11 C 208.0.7.0/24 is directly connected, Serial0/0 C 208.0.6.0/24 is directly connected, FastEthernet0/0 C 208.0.0.0/24 is directly connected, FastEthernet0/1 S 208.1.0.0/16 [1/0] via 208.0.12.11 a supernet and natural mask in the same network address space

More Related