15-441 Computer Networking Outline Techniques for Forwarding Packets

15-441 Computer Networking Outline Techniques for Forwarding Packets

Outline • Methods for packet forwarding 15-441 Computer Networking • Traditional IP addressing Lecture 7 – IP Addressing and Forwarding • CIDR IP addressing • Forwarding example Lecture 7: 9 -18-01 2 Techniques for Forwarding Packets Source Routing • Source routing • List entire path in packet • Packet carries path • Driving directions (north 3 hops, east, etc..) • Table of virtual circuits • Router processing • Connection routed through network to setup • Examine first step in directions state • Packets forwarded using connection state • Strip first step from packet • Table of global addresses (IP) • Forward to step just stripped off • Routers keep next hop for destination • Packets carry destination address Lecture 7: 9 -18-01 3 Lecture 7: 9 -18-01 4 Source Routing Example Source Routing • Advantages • Switches can be very simple and fast Packet 3,4,3 4,3 • Disadvantages 2 2 Sender R1 R2 1 3 1 3 • Variable (unbounded) header size 4 4 3 • Sources must know or discover topology (e.g., 2 failures) 1 R3 Receiver 3 • Typical use 4 • Ad-hoc networks (DSR) • Machine room networks (Myrinet) Lecture 7: 9 -18-01 5 Lecture 7: 9 -18-01 6 1 Global Addresses (IP) Global Address Example • Each packet has destination address • Each switch has forwarding table of Packet R R destination à next hop 2 2 Sender R1 R2 R à 4 1 3 1 3 • At v and x: destination à east 4 4 • At w and y: destination à south R à 3 R 2 1 • At z: destination à north R3 Receiver 3 4 R • Distributed routing algorithm for calculating R à 3 forwarding tables Lecture 7: 9 -18-01 7 Lecture 7: 9 -18-01 8 Router Table Size Global Addresses • One entry for every host on the Internet • Advantages • 100M entries,doubling every year • Stateless – simple error recovery • One entry for every LAN • Disadvantages • Every host on LAN shares prefix • Every switch knows about every destination • Still too many, doubling every year • Potentially large tables • One entry for every organization • All packets to destination take same route • Every host in organization shares prefix • Requires careful address allocation Lecture 7: 9 -18-01 9 Lecture 7: 9 -18-01 10 How do we set up Routing Tables? Virtual Circuits/Tag Switching • Graph theory to compute “shortest path” • Connection setup phase • Switches = nodes • Use other means to route setup request • Each router allocates flow ID on local link • Links = edges • Creates mapping of inbound flow ID/port to outbound • Delay, hops = cost flow ID/port • Need to adapt to changes in topology • Each packet carries connection ID • Sent from source with 1st hop connection ID • Router processing • Lookup flow ID – simple table lookup • Replace flow ID with outgoing flow ID • Forward to output port Lecture 7: 9 -18-01 11 Lecture 7: 9 -18-01 12 2 Virtual Circuits Examples Virtual Circuits • Advantages • More efficient lookup (simple table lookup) • More flexible (different path for each flow) Packet 5 7 2 2 • Can reserve bandwidth at connection setup Sender R1 R2 1,7 à 4,2 1 3 1 3 • Easier for hardware implementations 4 4 1,5 à 3,7 2 • Disadvantages 2 • Still need to route connection setup request 1 R3 Receiver 3 • More complex failure recovery – must recreate 4 6 2,2 à 3,6 connection state • Typical uses • ATM – combined with fix sized cells • MPLS – tag switching for IP networks Lecture 7: 9 -18-01 13 Lecture 7: 9 -18-01 14 IP Datagrams on Virtual Circuits IP Datagrams on Virtual Circuits • Challenge – when to setup connections • Traffic pattern • At bootup time – permanent virtual circuits • Few long lived flows (PVC) • Flow – set of data packets from source to • Large number of circuits destination • For every packet transmission • Large percentage of packet traffic • Connection setup is expensive • Improving forwarding performance by using • For every connection virtual circuits for these flows • What is a connection? • Other traffic uses normal IP forwarding • How to route connectionless traffic? Lecture 7: 9 -18-01 15 Lecture 7: 9 -18-01 16 Comparison Forwarding vs. Routing • Forwarding: the process of moving packets from Source Routing Global Addresses Virtual Circuits input to output Header Size Worst OK – Large address Best • The forwarding table Number of hosts • Information in the packet Router Table Size None Number of circuits (prefixes) • Routing: process by which the forwarding table is Forward Overhead Best Prefix matching Pretty Good built and maintained Setup Overhead None None Connection Setup • One or more routing protocols • Procedures (algorithms) to convert routing info to Tell all routers and Error Recovery Tell all hosts Tell all routers Tear down circuit forwarding table. and re-route Lecture 7: 9 -18-01 17 Lecture 7: 9 -18-01 18 3 Outline How is IP Design Standardized? • Methods for packet forwarding • IETF • Voluntary organization • Meeting every 4 months • Traditional IP addressing • Working groups and email discussions • “We reject kings, presidents, and voting; we believe in rough consensus and running code” • CIDR IP addressing (Dave Clark 1992) • Need 2 independent, interoperable implementations for standard • Forwarding example • IRTF • End2End • Reliable Multicast, etc.. Lecture 7: 9 -18-01 19 Lecture 7: 9 -18-01 20 Addressing in IP Addressing Considerations • IP addresses are names of interfaces • Fixed length or variable length? • Domain Name System (DNS) names are • Issues: names of hosts • Flexibility • DNS binds host names to interfaces • Processing costs • Routing binds interface names to paths • Header size • Engineering choice: IP uses fixed length addresses Lecture 7: 9 -18-01 21 Lecture 7: 9 -18-01 22 Addressing Considerations IP Addresses • Structured vs flat • Fixed length: 32 bits • Initial classful structure (1981) • Issues • Total IP address size: 4 billion • What information would routers need to route to • Class A: 128 networks, 16M hosts • Class B: 16K networks, 64K hosts Ethernet addresses? • Class C: 2M networks, 256 hosts • Need structure for designing scalable binding from interface name to route! High Order Bits Format Class • How many levels? Fixed? Variable? 0 7 bits of net, 24 bits of host A 10 14 bits of net, 16 bits of host B 110 21 bits of net, 8 bits of host C Lecture 7: 9 -18-01 23 Lecture 7: 9 -18-01 24 4 IP Address Classes (Some are Obsolete) Some Special IP Addresses • 127.0.0.1: local host (a.k.a. the loopback Network ID Host ID 8 16 24 32 address Class A 0 Network ID Host ID • Host bits all set to 0: network address Class B 10 • Host bits all set to 1: broadcast address Class C 110 Class D 1110 Multicast Addresses Class E 1111 Reserved for experiments Lecture 7: 9 -18-01 25 Lecture 7: 9 -18-01 26 Interaction with Link Layer Original IP Route Lookup • How does one find the Ethernet address of • Address classes a IP host? • A: 0 | 7 bit network | 24 bit host (16M each) • ARP • B: 10 | 14 bit network | 16 bit host (64K) • Broadcast search for IP address • C: 110 | 21 bit network | 8 bit host (255) • E.g., “who-has 128.2.184.45 tell 128.2.206.138” sent to Ethernet broadcast (all FF address) • Address would specify prefix for forwarding • Destination responds (only to requester using table unicast) with appropriate 48-bit Ethernet • Simple lookup address • E.g, “reply 128.2.184.45 is-at 0:d0:bc:f2:18:58” sent to 0:c0:4f:d:ed:c6 Lecture 7: 9 -18-01 27 Lecture 7: 9 -18-01 28 Original IP Route Lookup – Subnet Addressing Example RFC917 (1984) • www.cmu.edu address 128.2.11.43 • For class B & C networks • Class B address – class + network is 128.2 • Very few LANs have close to 64K hosts • Lookup 128.2 in forwarding table • For electrical/LAN limitations, performance or administrative reasons • Prefix – part of address that really matters for routing • Need simple way to get multiple “networks” • Forwarding table contains • Use bridging, multiple IP networks or split up single • List of class+network entries network address ranges (subnet) • A few fixed prefix lengths (8/16/24) • Must reduce the total number of network addresses that are assigned • Large tables • CMU case study in RFC • 2 Million class C networks • Chose not to adopt – concern that it would not be widely supported J Lecture 7: 9 -18-01 29 Lecture 7: 9 -18-01 30 5 Subnetting Subnetting Example • Variable length subnet masks • Assume an organization was assigned • Could subnet a class B into several chunks address 150.100 • Assume < 100 hosts per subnet • How many host bits do we need? Network Host • Seven Network Subnet Host • What is the network mask? • 11111111 11111111 11111111 10000000 1111.. ..1111 00000000 Mask • 255.255.255.128 Lecture 7: 9 -18-01 31 Lecture 7: 9 -18-01 32 Forwarding Example Outline • Assume a packet arrives with address • Methods for packet forwarding 150.100.12.176 • Step 1: AND address with class +subnet mask 150.100.12.154 150.100.12.176 • Traditional IP addressing H1 H2 150.100.12.128 • CIDR IP addressing 150.100.12.129 150.100.12.24 150.100.12.55 150.100.0.1 R1 H3 H4 To Internet • Forwarding example 150.100.12.4 150.100.12.0 Lecture 7: 9 -18-01 33 Lecture 7: 9 -18-01 34 IP Address Problem (1991) IP Address Utilization (‘98) • Address space depletion • In danger of running out of classes A and B • Why? • Class C too small for most domains • Very few class A – very careful about giving them out • Class B – greatest problem http://www.caida.org/outreach/resources/learn/ipv4space/ Lecture 7: 9 -18-01 35 Lecture 7: 9 -18-01 36 6 IP Addressing Problems Classless Inter-Domain Routing • Class B sparsely populated • Do not use classes to determine network ID • But people refuse to give it back • Assign any range of addresses to network • Large forwarding tables • Use common part of address as network number • 2 Million possible class C groups • E.g., addresses 192.4.16 - 192.4.31 have the first 20 • Solution bits in common.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    9 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us