1 / 58

addressing

addressing. Introduction ‘ Classfull ’ ‘ Subnetting ’ ‘VLSM’ ‘CIDR’. addressing. An IP address provides a hierarchical structure to separate networks Consider the following address as an example: 158.80.164.3 An IP address is separated into four octets Each octet is 8 bits long

alaura
Télécharger la présentation

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. addressing Introduction ‘Classfull’ ‘Subnetting’ ‘VLSM’ ‘CIDR’

  2. addressing An IP address provides a hierarchical structure to separate networks Consider the following address as an example: 158.80.164.3 An IP address is separated into four octets Each octet is 8 bits long resulting in a32-bit IP address A computer understands an IP address in its binary form First Octet Second Octet Third Octet Fourth Octet 10011110 .01010000 .10100100 .00000011

  3. Part of the above IP address identifies the network. The other part of the address identifies the host. A net mask helps make this distinction. Consider the following 158.80.164.3 255.255.0.0 The above IP address has a net mask of 255.255.0.0. The net mask follows two rules: If a binary bit is set to a 1(or on) in a net mask, the corresponding bit in the address identifies the network. If a binary bit is set to a 0(or off) in a net mask, the corresponding bit in the address identifies the host.

  4. Question? What is the usefulness of a net mask ? (A) Identifying the net associated to an IP address B) Increasing the addressing space (C) Hiding the network address

  5. Question? @IP 192.168.1.1 and Netmask 255.255.255.0, @Net (A) 192.168.1.0 (B) 192.168.0.1 (C) 192.0.1.1 (D) 0.168.1.1

  6. addressing Looking at 158.80.164.3 and mask 255.255.0.0 in binary Address: 10011110.01010000.10100100.00000011 net Mask: 11111111.11111111.00000000.00000000 The first 16 bits of the net mask are set to 1. Thus, the first 16 bits of the address (158.80) identify the network. The last 16 bits of the net mask are set to 0. Thus, the last 16 bits of the address (164.3) identify the unique hoston that network. Hosts on the same logical network will have identical network addresses, and can communicate freely. For example, the following two hosts are on the same network: Host A: 158.80.164.100 255.255.0.0 Host B: 158.80.164.101 255.255.0.0

  7. addressing Both share the same network address (158.80), which is determined by the 255.255.0.0 subnet mask. Hosts that are on different networks cannot communicatewithout an intermediating device. For example: Host A: 158.80.164.100 255.255.0.0 Host B: 158.85.164.101 255.255.0.0 The net mask has remained the same, but the network addresses are now different (158.80 and 158.85 respectively). Thus, the two hosts are not on the same network, and cannot communicate without a router between them. Routingis the process of sending packets from one network to another.

  8. addressing Are these hosts on the same network? Host A: 158.80.1.1 255.248.0.0 Host B: 158.79.1.1 255.248.0.0

  9. addressing Are these hosts on the same network? Host A: 158.80.1.1 255.248.0.0 Host B: 158.79.1.1 255.248.0.0 Host A Address: 10011110.01010000.00000001.00000001 Host B Address: 10011110.01001111.00000001.00000001 Subnet Mask: 11111111.11111000.00000000.00000000

  10. Rmq We can identify the number of binary bits set to a 1 (or on) in a netmask, preceded by a slash. Consider the following netmask: 255.255.255.240 Looking at the above net mask in binary: 11111111.11111111.11111111.11110000 The first 28 bits of the above net mask are set to 1. We can represent : /28 Consider this next example: 192.168.1.1 255.255.255.0 The above address/netmask can be represented as follows: 192.168.1.1 /24

  11. addressing Classfull

  12. IP address Classes The IPv4 address space has been structured into several classes. The value of the first octet of an address determines the class of the network: Class First Octet Range Default Subnet Mask ClassA1 - 127 255.0.0.0 Class B 128 - 191 255.255.0.0 Class C 192 - 223 255.255.255.0

  13. IP address Classes Class A networks range from 1 to 127. The default net mask is 255.0.0.0; thus, by default, the first octet defines the network, and last three octets define the host. N°of network: from 1 to 126 (0 and 127 are reserved ). This results in a maximum of 127 Class A networks, with 16,777,214 hosts per network! (extremely large networks ) Example of a Class A address: Address: 64.32.254.100 net Mask: 255.0.0.0

  14. IP address Classes Class B networks range from 128 to 191. The default net mask is 255.255.0.0; thus, by default, the first two octets define the network, and the last two octets define the host. N of networks : from 128.0 to 191.255. (2^14) This results in a maximum of 16,384 Class B networks, with 65,534 hosts per network. (2^16-2)(for medium sized company) Example of a Class B address: Address: 152.4.12.195 net Mask: 255.255.0.0

  15. IP address classes Class C networks range from 192 to 223. The default net mask is 255.255.255.0; thus, by default, the first three octets define the network, and the last octet defines the host. N°of networks: from 192.0.0 to 223.255.255 This results in a maximum of 2,097,152 Class C networks (2^21), with 254 (2^8 -2) hosts per network. Example of a Class C address: Address: 207.79.233.6 net Mask: 255.255.255.0

  16. Question Netmask associated to IP@ 34.208.123.12 ? (A) 255.0.0.0 (B) 255.255.0.0 (C) 255.255.255.0 (D) 255.255.255.255

  17. IP classfull problems 1-Lack of Internal Address Flexibility big companies get assigned a rather large (Class B) or truly enormous (Class A) block of addresses, all of which is considered by the Internet routers a single “network” with one “network ID”. Now, imagine that you are running a medium-to-large-sized company with 5,000 computers, and you are assigned a Class B address for your network. Do you really have 5,000 computers all hooked into a single network? Yet you would be forced to try to fit all of these into a single IP “network” in the original “classful” method. There was no way to create an internal hierarchy of addresses.

  18. IP Classfull problems 2- Inefficient Use of Address Space: The existence of only three block sizes (classes A, B and C) leads to waste of limited IP address space. 3- Proliferation of Router Table Entries As the Internet grows, more and more entries are required for routers to handle the routing of IP datagrams, which causes performance problems for routers. Attempting to reduce inefficient address space allocation leads to even more router table entries.

  19. Rmqs Two addresses have been reserved on each network for special use. Each network must have a network address, and a broadcast address. Neither of these addresses can be assigned to a host device. The networkaddress is used to identify the network itself. Routing tables contain lists of networks, and each network is identified by its address. Network addresses contain all 0 bits in the host portion of the address. For example, the following is a network address: 192.168.1.0/24

  20. The broadcastaddress identifies all hosts on a particular network. A packet sent to the broadcast address will be received and processed by every device on that network. Broadcast addresses contain all 1 bits in the host portion of the address. For example, the following is a broadcast address: 192.168.1.255/24. Broadcasts are one of three types of IP packets: Unicastsare packets sent from one host to another host Multicasts are packets sent from one host to a group of hosts Broadcasts, as stated earlier, are packets sent from one host to all other hosts on the local network

  21. Subnetting way to create an internal hierarchy of addresses. Internal to a network of Class A, B, C 3 levels : network, subnetwork, host Avoid requesting more network @ from any classes

  22. Subnetting Subnettingis the process of creating new networks (or subnets) by stealing bits from the host portion of a subnet mask. Stealing bits from hosts creates more networks but fewer hosts per network. Consider the following Class C network: 192.168.254.0 The default subnet mask for this network is 255.255.255.0. This single network can be segmented, or subnetted, into multiple networks. For example, assume a minimum of 10 new networks are required. Resolving this, is possible using the following magical formula: 2n The exponent ‘n’ identifies the number of bits to steal from the host portion of the net mask.

  23. The default Class C mask (255.255.255.0) looks as follows in binary: 11111111.1111111.1111111.00000000 There are a total of 24 bits set to 1, which are used to identify the network. There are a total of 8 bits set to0, which are used to identify the host, and these host bits can be ‘stolen.’ Stealing bits essentially involves changing host bits (set to 0 or off) in the net mask to network bits (set to 1 or on). Network bits in a net mask must always be sequential, skipping bits is not allowed. Consider the result if 3 bits are stolen. Using the above formula: 2n = 23 = 8 new networks created However, a total of eight new networks does not meet the original requirement of at least 10 networks. Consider the result if four bits are stolen: 2n = 24 = 16 new networks created. A total of sixteen new networks does meet the original requirement. Stealing four host bits results in the following new subnet mask: 11111111.11111111.11111111.11110000 = 255.255.255.240

  24. Subnetting In the previous example, a Class C network was subnetted to create 16 new networks, using a subnet mask of 255.255.255.240 (or /28 ). Four bits were stolen in the subnet mask, leaving only four bits for hosts. To determine the number of hosts this results in, for each of the new 16 networks, the used formula is: 2n – 2. Consider the result if four bits are available for hosts: 2n – 2 = 24 – 2 = 16 – 2 = 14 usable hosts per network Thus, subnetting a Class C network with a /28 mask creates 16 new networks, with 14 usable hosts per network.

  25. Subnetting Determining the ‘Range’ of Subnetted Networks The ‘shortcut’ method involves taking the subnet mask (255.255.255.240 from the previous example), and subtracting the subnetted octet (240) from 256. 256 – 240 = 16 the first network will begin at 0. Then, simply continue adding 16 to list the first address of each new network: 0 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240

  26. Subnetting Hosts on the same network (such as 192.168.254.2 and 192.168.254.14) can communicate freely. Hosts on different networks (such as 192.168.254.61 and 192.168.254.66) require a router to communicate.

  27. Question Network @ 135.28.0.0 Class? (A/B/C/D) 10 subnets, how many bits do we need A) 3 bits B) 4 bits C) 5 bits Subnet mask 255.255.240.0 Subnets size A) same B) variable

  28. Question How many networks of variable length should we design A) 4 B) 5 C) 6 D) 7

  29. Review - Magic Numbers • To make the job of subnetting easier,there is a method that allows you tocalculate a "magic" number. • The magic number we're looking foris the number of addresses in eachnetwork, includingthenetwork,broadcastandhost range. • The calculation 2number_ of_ host_ bitsyields the "magic" number. • We have 5 host bits remaining so….. • 25 = 32 - our "magic" number.

  30. Review - Subnetting - Class C • Network: 192.168.80.0 Subnet Mask: 255.255.255.224 • Network: 27 bits Host:5 bits Magic Number: 25 = 32 ID NetworkAddress Subnet AddressRange Broadcast Address 0 192.168.80.0 192.168.80.1 – 192.168.80.30 192.168.80.31 1 192.168.80.32 192.168.80.33 – 192.168.80.62 192.168.80.63 2 192.168.80.64 192.168.80.65 – 192.168.80.94 192.168.80.95 3 192.168.80.96 192.168.80.97 – 192.168.80.126 192.168.80.127 4 192.168.80.128 192.168.80.129 – 192.168.80.158 192.168.80.159 5 192.168.80.160 192.168.80.161 – 192.168.80.190 192.168.80.191 6 192.168.80.192 192.168.80.193 – 192.168.80.222 192.168.80.223 7 192.168.80.224 192.168.80.225 – 192.168.80.254 192.168.80.255

  31. Dividing Networks Into the Right Size 192.168.80.192/27 192.168.80.32/27 192.168.80.160/27 192.168.80.0/27 192.168.80.128/27 192.168.80.96/27 192.168.80.64/27

  32. Dividing Networks Into the Right Size Available: 30Required: 5Wasted: 25 Available: 30Required: 2Wasted: 28 192.168.80.0/27 192.168.80.128/27 Available: 30Required: 4Wasted: 26 192.168.80.96/27

  33. Subnetting Problem Site with a Class C address 192.15.34.0, needs five subnets with 60, 60, 60, 30, and 30 hosts Problems cannot use subnet mask 255.255.255.192, since it allows only 4 subnets, each with 62 hosts cannot use subnet mask 255.255.255.224, since it allows 8 subnets, each with only 30 hosts

  34. Variable Length Subnet Masking (VLSM) • A serious limitation of using only a single subnet mask across a given network-prefix(the number of network or 1 bits in the mask) was that an organization is locked into a fixed-number of fixed-sized subnets. • VLSM enables a network number to be configured with different subnet masks on different interfaces. • Subnet an already subnetted network address. • Conserves IP addresses. • More efficient use of available address space. • Allows for more hierarchical levels within an addressing plan.

  35. Variable Length Subnet Masking (VLSM)

  36. Variable Length Subnet Masking (VLSM) 192.168.20.64/27 192.168.20.128/27 192.168.20.128/27 192.168.20.0/27 192.168.20.96/27 192.168.20.32/27 192.168.20.64/27 7 Networks with 30 usable addresses for each network Wasted 28 addresses on each WAN link

  37. Variable Length Subnet Masking (VLSM) 192.168.20.32/27 192.168.20.96/27 192.168.20.64/27 192.168.20.0/27 192.168.20.192/30 192.168.20.196/30 192.168.20.200/30

  38. Variable Length Subnet Masking (VLSM)

  39. Variable Length Subnet Masking (VLSM) “If you know how to subnet, you can do VLSM.” What’s the trick? Always satisfy the requirements of your biggest LAN and then work your way down ….

  40. Variable Length Subnet Masking (VLSM) • Steps for VLSM: • List the number of hosts required per network beginning with the largest to the smallest. • Convert the subnet mask to binary. • Draw a line where the network portion ends. • Ask yourself the question… How many bits do I need to support the required number of hosts? • Move the line to show your new network portion. • Determine your new magic number????. • Finish subnetting using the new magic number. • The starting address is always the first network.

  41. Question

  42. CIDR Supernetting • Using VLSM and subnettingincrease the number of sub-networks. • Routes to each network have to be advertised to the Internet and added to routers. • This increase the size of routing table • Supernetting is a new addressing scheme that allows for more efficient allocation of IP addresses • Aggregating network addresses by decreasing the number of bits recognized as the network

  43. Classless IP Addressing • To CIDR-compliant routers, address class is meaningless. • The network portion of the address is determined by the network subnet mask, also known as the network prefix, or prefix length (/8, /19, etc.). • The network address is no longer determined by the class of the address.

  44. CIDR and Route Summarization • The capability for routes to be summarized as a single route helped reduce the size of Internet routing tables. • A Supernetsummarizes multiple network addresses with a mask that is less than (or a summary of) the classful mask.

  45. CIDR and Route Summarization Networks to be summarizedMUSTbe contiguous. • Networks are converted to binary. • The summary route is comprised of the least number of bits that are common to all subnets. Summary

  46. CIDR and Route Summarization • Requires a classless routing protocol (RIPv2, EIGRP, OSPF). • The subnet mask of the network MUST be included with the routing update. Summary

  47. Classless Routing Protocol R2 sends a summarized routeout s0/0/1 Classful Update R3 applies the default /16 subnet mask

  48. Classless Routing Protocol CIDR Networks 172.16.0.0/16, 172.17.0.0/16, 172.18.0.0/16, and 172.19.0.0/16 can be summarized into theSupernet 172.16.0.0/14. Classless Update The/14 (255.252.0.0) subnet mask is included in the routing update.

More Related