© 2000, Cisco Systems, Inc. 3-1 Network Address Conservation Subnetting, VLSM, NAT & RFC1918
© 2000, Cisco Systems, Inc. BSCN v1.0—3-2 Agenda Need for Address Conservation Private Addressing and NAT Classful Addressing Variable-Length Subnet Masks Route Aggregation Summary
© 2000, Cisco Systems, Inc. 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
© 2000, Cisco Systems, Inc. BSCN v1.0—3-4 Definition: Allocation and Assignment RFC 2050 – Allocation Guidelines 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’)
© 2000, Cisco Systems, Inc. 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
© 2000, Cisco Systems, Inc. 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! 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
© 2000, Cisco Systems, Inc. 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
© 2000, Cisco Systems, Inc Private Addresses and NAT
© 2000, Cisco Systems, Inc. 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.
© 2000, Cisco Systems, Inc. BSCN v1.0—3-10 RFC Private IP Address Ranges Used for networks/hosts not on Internet Class A: 1; ~ Class B: 16; ~ Class C: 256; ~ Planning: Determine which hosts are internal ONLY Routers configured with filters
© 2000, Cisco Systems, Inc. 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.
© 2000, Cisco Systems, Inc. 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)
© 2000, Cisco Systems, Inc. BSCN v1.0—3-13 Network Address Translation
© 2000, Cisco Systems, Inc. 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:
© 2000, Cisco Systems, Inc. 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.
© 2000, Cisco Systems, Inc Classful Addressing
© 2000, Cisco Systems, Inc. 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)
© 2000, Cisco Systems, Inc. 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: h.h ~ h.h, 65K hosts C: h ~ h, 254 hosts D: ~ , Multicasting E: ~ , IETF Research
© 2000, Cisco Systems, Inc. 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 SADAHDRDATA
© 2000, Cisco Systems, Inc. BSCN v1.0—3-20 IP Addressing 255 Dotted Decimal Maximum NetworkHost 32 bits
© 2000, Cisco Systems, Inc. BSCN v1.0—3-21 IP Addressing 255 Dotted Decimal Maximum NetworkHost Binary 32 bits
© 2000, Cisco Systems, Inc. BSCN v1.0—3-22 IP Addressing 255 Dotted Decimal Maximum NetworkHost Binary 32 bits Example Decimal Example Binary
© 2000, Cisco Systems, Inc. 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
© 2000, Cisco Systems, Inc. BSCN v1.0—3-24 IP Address Classes 1 Class A: Bits: 0NNNNNNN Host Range (1-126) 1 Class B: Bits: 10NNNNNN Network Host Range ( ) 1 Class C: Bits: 110NNNNN Network Host Range ( ) 1 Class D: Bits: 1110MMMM Multicast Group Range ( )
© 2000, Cisco Systems, Inc. BSCN v1.0—3-25 Host Addresses E NetworkHost.. NetworkInterface E0 E1 Routing Table E0
© 2000, Cisco Systems, Inc. BSCN v1.0— Determining Available Host Addresses Network Host N 2 N -2 = = 65534
© 2000, Cisco Systems, Inc. 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.
© 2000, Cisco Systems, Inc. BSCN v1.0—3-28 Network Addressing without Subnets …
© 2000, Cisco Systems, Inc. BSCN v1.0—3-29 Network Addressing with Subnets
© 2000, Cisco Systems, Inc. BSCN v1.0—3-30 Subnet Addressing E Network Interface E0 E1 New Routing Table 2160 Host E1
© 2000, Cisco Systems, Inc. BSCN v1.0—3-31 Subnet Addressing E0 E NetworkHost.. NetworkInterface E0 E1 New Routing Table Subnet
© 2000, Cisco Systems, Inc. BSCN v1.0—3-32 Subnet Mask 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
© 2000, Cisco Systems, Inc. BSCN v1.0— Network Host Subnets not in use—the default Subnet Mask without Subnets Network Number
© 2000, Cisco Systems, Inc. BSCN v1.0—3-34 Network number extended by eight bits Subnet Mask with Subnets 16 Network Host Subnet Network Number
© 2000, Cisco Systems, Inc. BSCN v1.0—3-35 IP Host Address: Subnet Mask: Subnet Address = Host Addresses = – Broadcast Address = Eight bits of subnetting NetworkSubnetHost : : Subnet: Class B Subnet Example Broadcast: Network
© 2000, Cisco Systems, Inc Variable-Length Subnet Masks
© 2000, Cisco Systems, Inc. BSCN v1.0—3-37 Variable Length Subnet Masks Variable Length Subnet Masks (VLSM), defined in 1987 as RFP 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.
© 2000, Cisco Systems, Inc. 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.
© 2000, Cisco Systems, Inc. BSCN v1.0—3-39 Recursive Division of a Network Prefix with VLSM
© 2000, Cisco Systems, Inc. BSCN v1.0—3-40 Subnet Mask 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
© 2000, Cisco Systems, Inc. BSCN v1.0— Network Host Subnets not in use—the default Subnet Mask without Subnets Network Number
© 2000, Cisco Systems, Inc. BSCN v1.0—3-42 Network number extended by eight bits Subnet Mask with Subnets 16 Network Host Subnet Network Number
© 2000, Cisco Systems, Inc. BSCN v1.0—3-43 Subnet Mask with Subnets (cont.) Network Host Subnet Network number extended by ten bits Network Number
© 2000, Cisco Systems, Inc. BSCN v1.0—3-44 Decimal Equivalents of Bit Patterns = = = = = = = =
© 2000, Cisco Systems, Inc. BSCN v1.0—3-45 VLSM Addressing Example Host Mask Subnet Broadcast Last First
© 2000, Cisco Systems, Inc. BSCN v1.0—3-46 VLSM Addressing Example Host Mask Subnet Broadcast Last First
© 2000, Cisco Systems, Inc. BSCN v1.0—3-47 VLSM Addressing Example Host Mask Subnet Broadcast Last First
© 2000, Cisco Systems, Inc. BSCN v1.0—3-48 VLSM Addressing Example Host Mask Subnet Broadcast Last First
© 2000, Cisco Systems, Inc. BSCN v1.0—3-49 VLSM Addressing Example Host Mask Subnet Broadcast Last First
© 2000, Cisco Systems, Inc. BSCN v1.0—3-50 VLSM Addressing Example Host Mask Subnet Broadcast Last First
© 2000, Cisco Systems, Inc. BSCN v1.0—3-51 VLSM Addressing Example Host Mask Subnet Broadcast Last First
© 2000, Cisco Systems, Inc. BSCN v1.0—3-52 VLSM Addressing Example Host Mask Subnet Broadcast Last First
© 2000, Cisco Systems, Inc. BSCN v1.0—3-53 VLSM Addressing Example Host Mask Subnet Broadcast Last First
© 2000, Cisco Systems, Inc. BSCN v1.0—3-54 IP Calculators calc.htm IPAddress.htm ml
© 2000, Cisco Systems, Inc. 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
© 2000, Cisco Systems, Inc Route Summarization
© 2000, Cisco Systems, Inc. BSCN v1.0—3-57 What Is Route Summarization? Routing table / / / / /24 A A
© 2000, Cisco Systems, Inc. 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 /16 network. Routing Table /16 B B Routing Table / / / / /24 A A
© 2000, Cisco Systems, Inc. BSCN v1.0—3-59 Summarizing Addresses in a VLSM-Designed Network Corporate Network / / / / / / /26 A A B B C C D D /20
© 2000, Cisco Systems, Inc. BSCN v1.0—3-60 Route Summarization with VLSM
© 2000, Cisco Systems, Inc. BSCN v1.0—3-61 Summarizing within an Octet /24 = Number of Common Bits = 21 Summary: /21 Noncommon Bits = /24 = /24 = /24 = /24 = /24 = /24 = /24 =
© 2000, Cisco Systems, Inc. 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
© 2000, Cisco Systems, Inc. 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
© 2000, Cisco Systems, Inc. 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 /32 Host /27Subnet /24Network /16Block of Networks /0Default /32 Host /27Subnet /24Network /16Block of Networks /0Default
© 2000, Cisco Systems, Inc. BSCN v1.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
© 2000, Cisco Systems, Inc. BSCN v1.0— / / Be Careful When Summarizing Routes EIGRP on both Router A and Router B advertise a summarized route to /16 Router C receives two routes to /16 Router A (or B or both) should be configured to not summarize EIGRP Advertises / / /24 A A B B C C
© 2000, Cisco Systems, Inc. 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
© 2000, Cisco Systems, Inc Questions?