Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2000, Cisco Systems, Inc. 3-1 Network Address Conservation Subnetting, VLSM, NAT & RFC1918.

Similar presentations


Presentation on theme: "© 2000, Cisco Systems, Inc. 3-1 Network Address Conservation Subnetting, VLSM, NAT & RFC1918."— Presentation transcript:

1 © 2000, Cisco Systems, Inc. 3-1 Network Address Conservation Subnetting, VLSM, NAT & RFC1918

2 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-2 Agenda Need for Address Conservation Private Addressing and NAT Classful Addressing Variable-Length Subnet Masks Route Aggregation Summary

3 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-3 Definitions Regional Internet Registry (RIR) –An organization with regional responsibility for management of Internet resources –Responsibilities include allocation/registration services, coordination and policy development –For example. APNIC, ARIN, RIPE-NCC Local Internet Registry (LIR) –Otherwise known as an ARIN Member –Usually operates as an ISP, assigns address space to its customers and registers it in the ARIN database Eg. NJ Edge, UUNET

4 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-4 Definition: Allocation and Assignment RFC 2050 – Allocation Guidelines http://sunsite.dk/RFC/rfc/rfc2050.html Allocation A block of address space held by an IR for subsequent allocation or assignment Not yet used to address any networks Assignment A block of address space used to address an operational network May be provided to LIR customers, or used for an LIR’s infrastructure (‘self-assignment’)

5 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-5 Definitions Provider Independent (Portable) –Customer holds addresses independent from ISP –Customer keeps addresses when changing ISP –Bad for size of routing tables –Bad for QOS: routes may be filtered, flap- dampened Provider Aggregatable (Non-portable) –Customer uses ISP’s address space –Customer must renumber if changing ISP –Only way to effectively scale the Internet

6 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-6 Growth of Global Addresses Growth of Global Routing Table (as of 3 May 2001) –Unaggregated Internet would exceed 200,000 routes! http://www.telstra.net/ops/bgptable.html Moore’s Law and CIDR made it work for a while But they cannot be relied on forever Projected routing table growth without CIDR Deployment Period of CIDR

7 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-7 IP Slowing IP Address Depletion Subnet masking; RFCs 950, 1812 Address allocation for private Internets, RFC 1918 Network Address Translation (NAT), RFC 1631 Hierarchical addressing Variable-length subnet masks (VLSM), RFC 1812 Route summarization, RFC 1518

8 © 2000, Cisco Systems, Inc. www.cisco.com 3-8 Private Addresses and NAT

9 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-9 Private Addressing and Network Address Translation One way to cope with the depletion of IP addresses is through the use of private addressing. IP addresses used on the Internet must be globally unique, usually specified by an Internet service provider. However, traffic that remains only on an organization's private network does not need to be globally unique, just unique across that organization's private network.

10 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-10 RFC1918 - Private IP Address Ranges Used for networks/hosts not on Internet Class A: 1; 10.0.0.0 ~ 10.255.255.255 Class B: 16; 172.16.0.0 ~ 172.31.255.255 Class C: 256; 192.168.0.0 ~ 192.168.255.255 Planning: Determine which hosts are internal ONLY Routers configured with filters

11 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-11 Private Addressing and Network Address Translation RFC1918 Private Addresses are not routed on the Internet. Host Computers using Private IP address space can still send and receive traffic to/from the Internet by using RFC 1631 network address translation (NAT). NAT can be provided by a router, firewall, or stand ‑ alone NAT software running on a multi ‑ homed server.

12 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-12 Types of NAT Static NAT – direct mapping of inside address to outside address, one to one correlation Dynamic NAT – outside address pulled from pool of addresses when needed then released back to pool when no longer needed, likely different address each time PAT (Port Address Translation) – Special type of dynamic NAT where pool consists of one address, every host appears to internet as the same address, differentiated by source port number (also called Address Overloading)

13 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-13 Network Address Translation

14 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-14 Some Applications Aren't NAT- Friendly Some applications send IP addresses or port numbers hidden inside their datapackets, where NAT can't properly rewrite them - so those applications don't work when you try to use them on computers behind NATs. Breaks Global Addressing – problem for peer to peer networking (like napster, netmeeting, etc) DNS needs special handling in large environments Additional Info: http://sunsite.dk/RFC/rfc/rfc1631.html

15 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-15 DNS with NAT and RFC1918 Addresses Two DNS Servers may be needed, one to resolve internal names with Internal Addresses and the another to maintain your DNS domain to the Internet. Both DNS servers must be independent each other, so that all Internal computers must point to your Internal DNS, and your Internal DNS could be configured with a forwarder pointing to the Internet DNS server that will help you to resolve the rest of Internet names.

16 © 2000, Cisco Systems, Inc. www.cisco.com 3-16 Classful Addressing

17 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-17 Definitions Classful and Classless Classful –Address architecture where network boundaries are fixed at 8, 16 or 24 bits (class A, B, and C) Classless –Architecture in which network boundaries may occur at any bit (e.g. /12, /16, /19, /24 etc)

18 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-18 IPv4: Internet Protocol, Version 4 IP address is 32-bit, binary, 4-octets Dotted-decimal format for human consumption Address space divided into classes (A~E) A: 1.h.h.h ~ 126.h.h.h, 16.7M hosts B: 128.1.h.h ~191.254.h.h, 65K hosts C: 192.0.1.h ~ 223.255.254.h, 254 hosts D: 224.0.0.0 ~ 239.255.255.254, Multicasting E: 240.0.0.0 ~ 255.255.255.255, IETF Research

19 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-19 Unique addressing allows communication between end stations Path choice is based on location Location is represented by an address Introduction to TCP/IP Addresses 172.18.0.2 172.18.0.1 172.17.0.2 172.17.0.1 172.16.0.2 172.16.0.1 SADAHDRDATA 10.13.0.0 192.168.1.0 10.13.0.1 192.168.1.1

20 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-20 IP Addressing 255 Dotted Decimal Maximum NetworkHost 32 bits

21 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-21 IP Addressing 255 Dotted Decimal Maximum NetworkHost 128 64 32 16 8 4 2 1 11111111 Binary 32 bits 18916 17 242532 128 64 32 16 8 4 2 1

22 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-22 IP Addressing 255 Dotted Decimal Maximum NetworkHost 128 64 32 16 8 4 2 1 11111111 10101100 00010000 01111010 11001100 Binary 32 bits 172 16 122 204 Example Decimal Example Binary 18916 17 242532 128 64 32 16 8 4 2 1

23 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-23 Class A: Class B: Class C: Class D: Multicast Class E: Research IP Address Classes Network Host Network Host Network Host 8 bits

24 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-24 IP Address Classes 1 Class A: Bits: 0NNNNNNN Host 891617242532 Range (1-126) 1 Class B: Bits: 10NNNNNN Network Host 891617242532 Range (128-191) 1 Class C: Bits: 110NNNNN Network Host 891617242532 Range (192-223) 1 Class D: Bits: 1110MMMM Multicast Group 891617242532 Range (224-239)

25 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-25 Host Addresses 172.16.2.1 172.16.3.10 172.16.12.12 10.1.1.1 10.250.8.11 10.180.30.118 E1 172.1612 NetworkHost.. NetworkInterface 172.16.0.0 10.0.0.0 E0 E1 Routing Table 172.16.2.1 10.6.24.2 E0

26 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-26 11111111 Determining Available Host Addresses 172 16 0 0 10101100 00010000 00000000 16 15 14 13 12 11 10 9 8765432187654321 Network Host 00000000 00000001 11111111 11111110... 00000000 00000011 11111101 1 2 3 65534 65535 65536 -... 2 65534 N 2 N -2 = 2 16 -2 = 65534

27 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-27 Subnetting ‑ Why Subnet? Address classes were restrictive and forced an inefficient allocation of addresses. (Class C too small but Class B too large). Class B addresses were given out to organizations that would never need the 65,534 addresses. RFC 950, defined in 1985, provided a way to subnet or provide a third layer of organization or hierarchy between the existing network ID and the existing host ID.

28 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-28 Network 172.16.0.0 172.16.0.0 Addressing without Subnets 172.16.0.1172.16.0.2 172.16.0.3 …... 172.16.255.253172.16.255.254

29 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-29 Network 172.16.0.0 Addressing with Subnets 172.16.1.0172.16.2.0 172.16.3.0 172.16.4.0

30 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-30 Subnet Addressing 172.16.2.200 172.16.2.2 172.16.2.160 172.16.2.1 172.16.3.5 172.16.3.100 172.16.3.150 E0 172.16 Network Interface 172.16.0.0 E0 E1 New Routing Table 2160 Host.. 172.16.3.1 E1

31 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-31 Subnet Addressing 172.16.2.200 172.16.2.2 172.16.2.160 172.16.2.1 172.16.3.5 172.16.3.100 172.16.3.150 172.16.3.1 E0 E1 172.162160 NetworkHost.. NetworkInterface 172.16.2.0 172.16.3.0 E0 E1 New Routing Table Subnet

32 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-32 Subnet Mask 172 16 0 0 0 0 255 0 0 0 0 0 0 IP Address Default Subnet Mask 8-bit Subnet Mask NetworkHost NetworkHost NetworkSubnetHost Also written as “/16” where 16 represents the number of 1s in the mask. Also written as “/24” where 24 represents the number of 1s in the mask. 11111111 00000000

33 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-33 16 Network Host 17200 10101100 11111111 10101100 00010000 11111111 00010000 00000000 10100000 00000000 Subnets not in use—the default 00000010 Subnet Mask without Subnets 172.16.2.160 255.255.0.0 Network Number

34 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-34 Network number extended by eight bits Subnet Mask with Subnets 16 Network Host 172.16.2.160 255.255.255.0 17220 10101100 11111111 10101100 00010000 11111111 00010000 11111111 00000010 10100000 00000000 00000010 Subnet Network Number 128 192 224 240 248 252 254 255

35 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-35 IP Host Address:172.16.2.121 Subnet Mask: 255.255.255.0 Subnet Address = 172.16.2.0 Host Addresses = 172.16.2.1–172.16.2.254 Broadcast Address = 172.16.2.255 Eight bits of subnetting NetworkSubnetHost 10101100000100000000001011111111 172.16.2.121: 255.255.255.0: 10101100 11111111 Subnet:1010110000010000 11111111 00000010 11111111 01111001 00000000 Class B Subnet Example Broadcast: Network

36 © 2000, Cisco Systems, Inc. www.cisco.com 3-36 Variable-Length Subnet Masks

37 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-37 Variable Length Subnet Masks Variable Length Subnet Masks (VLSM), defined in 1987 as RFP 1009. A single network ID could have different subnet masks among its subnets. The major benefit of VLSM is that subnets can be defined to different sizes as needed under a single Network ID, thereby minimizing, if not eliminating, wasted addresses. Second, variable length subnet masks can be used to permit route aggregation which minimizes the number of distinct routes that need to be advertised and processed by network backbone or Internet routers.

38 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-38 Working with Variable Length Subnet Masks ‑ Subnet Design Subnet design with VLSM is similar to subnet design with fixed length masks except that decisions made regarding subnets are made independently at each level in the VLSM scenario. At each level two questions must be answered:  How many subnets are required at this level both now and in the future?  What is the largest number of hosts required per subnet on this level both now and in the future? The answers to these questions will determine how many subnets with how much host ID capacity needs to be defined at each level.

39 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-39 Recursive Division of a Network Prefix with VLSM

40 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-40 Subnet Mask 172 16 0 0 0 0 255 0 0 0 0 0 0 IP Address Default Subnet Mask 8-bit Subnet Mask NetworkHost NetworkHost NetworkSubnetHost Also written as “/16” where 16 represents the number of 1s in the mask. Also written as “/24” where 24 represents the number of 1s in the mask. 11111111 00000000

41 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-41 16 Network Host 17200 10101100 11111111 10101100 00010000 11111111 00010000 00000000 10100000 00000000 Subnets not in use—the default 00000010 Subnet Mask without Subnets 172.16.2.160 255.255.0.0 Network Number

42 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-42 Network number extended by eight bits Subnet Mask with Subnets 16 Network Host 172.16.2.160 255.255.255.0 17220 10101100 11111111 10101100 00010000 11111111 00010000 11111111 00000010 10100000 00000000 00000010 Subnet Network Number 128 192 224 240 248 252 254 255

43 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-43 Subnet Mask with Subnets (cont.) Network Host 172.16.2.160 255.255.255.192 10101100 11111111 10101100 00010000 11111111 00010000 11111111 00000010 10100000 11000000 10000000 00000010 Subnet Network number extended by ten bits 161722128 Network Number 128 192 224 240 248 252 254 255 128 192 224 240 248 252 254 255

44 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-44 Decimal Equivalents of Bit Patterns 10000000=128 11000000=192 11100000=224 11110000=240 11111000=248 11111100=252 11111110=254 11111111=255 128 6432168421

45 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-45 VLSM Addressing Example 16 172 2160 10101100000100001010000000000010 Host Mask Subnet Broadcast Last First 172.16.2.160 255.255.255.192 4 1

46 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-46 VLSM Addressing Example 10101100 11111111 00010000 11111111 10100000 11000000 00000010 Host Mask Subnet Broadcast Last First 172.16.2.160 255.255.255.192 1 2 16 172 2160

47 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-47 VLSM Addressing Example 10101100 11111111 00010000 11111111 10100000 11000000 00000010 Host Mask Subnet Broadcast Last First 172.16.2.160 255.255.255.192 1 2 3 7 16 172 2160

48 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-48 VLSM Addressing Example 10101100 11111111 00010000 11111111 10100000 11000000 10000000 00000010 Host Mask Subnet Broadcast Last First 172.16.2.160 255.255.255.192 1 2 3 4 16 172 2160

49 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-49 VLSM Addressing Example 10101100 11111111 00010000 11111111 10100000 11000000 10000000 00000010 10111111 Host Mask Subnet Broadcast Last First 172.16.2.160 255.255.255.192 1 2 3 4 5 6 16 172 2160

50 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-50 VLSM Addressing Example 10101100 11111111 00010000 11111111 10100000 11000000 10000000 00000010 10111111 10000001 Host Mask Subnet Broadcast Last First 172.16.2.160 255.255.255.192 1 2 3 4 5 6 16 172 2160

51 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-51 VLSM Addressing Example 10101100 11111111 00010000 11111111 10100000 11000000 10000000 00000010 10111111 10000001 10111110 Host Mask Subnet Broadcast Last First 172.16.2.160 255.255.255.192 1 2 3 4 5 6 7 16 172 2160

52 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-52 VLSM Addressing Example 10101100 11111111 10101100 00010000 11111111 00010000 11111111 00000010 10100000 11000000 10000000 00000010 10101100000100000000001010111111 10101100000100000000001010000001 101011000001000000000010 10111110 Host Mask Subnet Broadcast Last First 172.16.2.160 255.255.255.192 1 2 3 4 5 6 7 8 16 172 2160

53 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-53 VLSM Addressing Example 10101100 11111111 10101100 00010000 11111111 00010000 11111111 00000010 10100000 11000000 10000000 00000010 10101100000100000000001010111111 10101100000100000000001010000001 101011000001000000000010 10111110 Host Mask Subnet Broadcast Last First 172.16.2.160 255.255.255.192 172.16.2.128 172.16.2.191 172.16.2.129 172.16.2.190 1 2 3 4 5 6 7 8 9 16 172 2160

54 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-54 IP Calculators http://www.telusplanet.net/public/sparkman/net calc.htm http://www.chattanooga.net/techsupport/ipcalc/ IPAddress.htm http://ihide.virtualave.net/subnet/subnet.html http://www.subnetonline.com/subnet/subnet.ht ml

55 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-55 Address Planning Map IP Addressing Scheme to Physical Topology or Logical Groups Anticipate Growth! Leave ‘spare’ Subnets Restrict Size of Subnets Deploy Address blocks with Summarization in mind

56 © 2000, Cisco Systems, Inc. www.cisco.com 3-56 Route Summarization

57 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-57 What Is Route Summarization? Routing table 172.16.25.0/24 172.16.26.0/24 172.16.27.0/24 172.16.26.0/24 172.16.25.0/24 A A

58 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-58 What Is Route Summarization? Routing protocols can summarize addresses of several networks into one address I can route to the 172.16.0.0/16 network. Routing Table 172.16.0.0/16 B B Routing Table 172.16.25.0/24 172.16.26.0/24 172.16.27.0/24 172.16.26.0/24 172.16.25.0/24 A A

59 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-59 Summarizing Addresses in a VLSM-Designed Network Corporate Network 172.16.0.0/16 172.16.64.0/20 172.16.128.0/20 172.16.32.64/26 172.16.32.0/24 172.16.128.0/20 172.16.32.128/26 A A B B C C D D 172.16.64.0/20

60 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-60 Route Summarization with VLSM

61 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-61 Summarizing within an Octet 172.16.168.0/24 = 10101100. 00010000. 10101 000. 00000000 Number of Common Bits = 21 Summary: 172.16.168.0/21 Noncommon Bits = 11 172.16.169.0/24 = 172. 16. 10101 001. 0 172.16.170.0/24 = 172. 16. 10101 010. 0 172.16.171.0/24 = 172. 16. 10101 011. 0 172.16.172.0/24 = 172. 16. 10101 100. 0 172.16.173.0/24 = 172. 16. 10101 101. 0 172.16.174.0/24 = 172. 16. 10101 110. 0 172.16.175.0/24 = 172. 16. 10101 111. 0

62 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-62 Benefits of Route Summarization Increased Stability – reduce route flap through network Reduce Router Memory Req. – smaller route tables Reduce Router Proc. Load – smaller table

63 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-63 Implementation Considerations Multiple IP addresses must have the same highest-order bits Routing decisions are made based on the entire address Routing protocols must carry the prefix (subnet mask) length

64 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-64 Route Summarization Operation in Cisco Routers Supports host-specific routes, blocks of networks, default routes Routers use the longest match 172.16.5.33/32 Host 172.16.5.32/27Subnet 172.16.5.0/24Network 172.16.0.0/16Block of Networks 0.0.0.0/0Default 172.16.5.33/32 Host 172.16.5.32/27Subnet 172.16.5.0/24Network 172.16.0.0/16Block of Networks 0.0.0.0/0Default

65 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-65 172.16.5.0 255.255.255.0 192.168.14.16 255.255.255.240 172.16.6.0 255.255.255.0 Summarizing Routes in a Discontiguous Network RIPv1 and IGRP do not advertise subnets, and therefore cannot support discontiguous subnets OSPF, EIGRP, and RIPv2 can advertise subnets, and therefore can support discontiguous subnets A A B B C C RIPv1 Will Advertise Network 172.16.0.0

66 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-66 172.16.5.0/24 172.16.7.0/24 192.168.14.16 255.255.255.240 Be Careful When Summarizing Routes EIGRP on both Router A and Router B advertise a summarized route to 172.16.0.0/16 Router C receives two routes to 172.16.0.0/16 Router A (or B or both) should be configured to not summarize EIGRP Advertises 172.16.0.0/16 172.16.6.0/24 172.16.9.0/24 A A B B C C

67 © 2000, Cisco Systems, Inc. www.cisco.com BSCN v1.0—3-67 Route Summarization Overview Synonymous with aggregation or supernetting Minimizes routing table entries Isolates topology changes from other routers Summary of MSB to LSB Most effective when network addresses are contiguous Most effective when network addressing uses VLSM and is hierarchical Common bits determined from MSB to LSB Can occur at each layer of a scalable network

68 © 2000, Cisco Systems, Inc. www.cisco.com 3-68 Questions?


Download ppt "© 2000, Cisco Systems, Inc. 3-1 Network Address Conservation Subnetting, VLSM, NAT & RFC1918."

Similar presentations


Ads by Google