2/22/2008115-441 Computer NetworkingLecture 9 – IP Protocol1Peter SteenkisteDepartments of Computer Science andElectrical and Computer Engineering15-441 Networking, Spring 2008http://www.cs.cmu.edu/~dga/15-441/S08Outlinez Traditional IP addressingz CIDR IP addressing22z Forwarding examplesz IP packet formatInternetworkingz Multiple networks connected by routers.z Networks share some features» IP protocol, addressing, ..z But differ in many other ways»Technology, ownerships, usage policies, scale, ..3»Technology, ownerships, usage policies, scale, ..HostHostHostHostHostHostHostHostHostHostHostHostHop-by-Hop PacketForwarding in the InternetEthernetEthernet WANWANMixedEthernetMixedEthernetHostHostHostHost47..321IP Packet Forwardingz Each packet has an IP destination addressz Each router has forwarding table with destination Æ next hop mappings» Similar to Ethernet bridges and switches5g» What is different???z Forwarding table is created by a routing protocol» Manual solution would be error-prone» How is this done for Ethernet??Router Table Sizez One entry for every host on the Internet» 440M (7/06) entries, doubling every 2.5 yearsz One entry for every LAN6» Every host on LAN shares prefix» Still too many and growing quicklyz One entry for every organization» Every host in organization shares prefix» Requires careful address allocation» Still grows very quicklyQ!62/22/20082Addressing Considerationsz Hierarchical vs. flat» Pennsylvania / Pittsburgh / Oakland / CMU / CSvs.CS: (412)268-0000zScaling is key challenge7zScaling is key challenge» How well does Ethernet solution scale??» Hierarchy is a known effective solutionz Also want local administration -> hierarchicalz What type of Hierarchy?» How many levels?» Same hierarchy depth for everyone?» Same segment size for similar partition?7IP Addressesz Fixed length: 32 bitsz Initial classful structure (1981) (not relevant now!!!)z Total IP address size: 4 billion» Class A: 128 networks, 16M hosts»Class B: 16K networks, 64K hosts8»Class B: 16K networks, 64K hosts» Class C: 2M networks, 256 hosts8High Order Bits0 10 110Format7 bits of net, 24 bits of host14 bits of net, 16 bits of host21 bits of net, 8 bits of hostClassABCIP Address Classes(Some are Obsolete)Network ID Host IDNetwork ID Host ID816Class A320Class B102499Class B10Class C110Multicast AddressesClass D1110Reserved for experimentsClass E1111Original IP Route Lookupz Address specifies prefix for forwarding table» Simple lookupz www.cmu.edu address 128.2.11.43» Class B address + network is 128.210» Lookup 128.2 in forwarding table» Prefix – part of address that really matters for routingz Forwarding table contains» List of class+network entries» A few fixed prefix lengths (8/16/24)z Large tables» 2 Million class C networks10Subnet AddressingRFC917 (1984)z Class A & B networks too big» Very few LANs have close to 64K hosts» For electrical/LAN limitations, performance or administrative reasons11z Bridging has scaling limitations » What are they?z Need simple way to get multiple “networks”» Multiple IP networks within a single network –often called subnets» Networks often follow organization boundaries11Subnettingz Add another layer to hierarchyz Variable length subnet masks»Could subnet a class B into several chunks1212NetworkHostNetworkHostSubnet1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 10 0 0 0 0 0 0 0SubnetMask2/22/20083Subnetting Examplez Assume an organization was assigned address 150.100z Assume < 100 hosts per subnet13z How many host bits do we need?»Sevenz What is the network mask?»11111111 11111111 11111111 10000000»255.255.255.12813Forwarding Example150.100.12.154 150.100.12.176• Assume a packet arrives with address 150.100.12.176• Step 1: AND address with class + subnet mask1414H1 H2H3 H4R1150.100.12.128150.100.12.129150.100.12.0150.100.12.4To Internet150.100.12.55150.100.12.24150.100.0.1Important Conceptsz Hierarchical addressing critical for scalable system»Don’t require everyone to know l15everyone else»Forwarding based on prefix»Reduces number of updates when something changes15Outlinez Traditional IP addressingz CIDR IP addressing1616z Forwarding examplesz IP packet formatIP Address Problem (1991)z Address space depletion» In danger of running out of classes A and B» Why?– Class C too small for most domainsVery few class Avery careful about giving them1717–Very few class A –very careful about giving them out– Class B – greatest problemz Class B sparsely populated » But people refuse to give it backz Large forwarding tables» 2 Million possible class C groupsIP Address Utilization (‘97)1818http://www.caida.org/outreach/resources/learn/ipv4space/2/22/20084Size of Complete Routing Table» Source: www.cidr-report.org» Shows that CIDR has kept # table entries in check19– Currently require 124,894 entries for a complete table– Only required by backbone routersClassless Inter-Domain Routing(CIDR) – RFC1338z Allows arbitrary split between network & host part of address » Do not use classes to determine network ID» Use common part of address as network number2020p» E.g., addresses 192.4.16 - 192.4.31 have the first 20 bits in common. Thus, we use these 20 bits as the network number Æ 192.4.16/20z Enables more efficient usage of address space (and router tables) Æ How?» Use single entry for range in forwarding tables» Combined forwarding entries when possibleCIDR Examplez Network is allocated 8 class C chunks, 200.10.0.0 to 200.10.7.255»Allocation uses 3 bits of class C space2121space»Remaining 20 bits are network number, written as 201.10.0.0/21z Replaces 8 class C routing entries with 1 combined entry»Routing protocols carry prefix with destination network address»Longest prefix match for forwardingIP Addresses: How to Get One?Network (network portion): Get allocated portion of ISP’s address space:ISP's block 11001000 00010111 00010000 00000000 200.23.16.0/20 2222Organization 0 11001000 00010111 00010000 00000000 200.23.16.0/23 Organization 1 11001000 00010111 00010010 00000000 200.23.18.0/23 Organization 2 11001000 00010111 00010100 00000000 200.23.20.0/23 ... ….. …. ….Organization 7 11001000 00010111 00011110 00000000 200.23.30.0/23IP Addresses: How to Get One?z How does an ISP get block of addresses?» From Regional Internet
View Full Document