The Network Layer Forwarding Tables and Switching Fabric Smith College, CSC 49 February 7, 07 Network Layer Oeriew q Network layer serices Desired serices and tasks Actual serices and tasks q Forwarding ersus routing Routing algorithms path selection Routing algorithms creation of forwarding table q Inside a router: switching fabric q Three Network Layer protocols IP for addressing and forwarding Routing protocols determining the best path ICMP messaging protocol Network Layer Serices of IP? q Guaranteed deliery? q Guaranteed minimum delay? q In-order datagram deliery? q Guaranteed minimum bandwidth to flow? q Restrictions on changes in interpacket spacing? Key Network-Layer Functions. routing: determine route taken by packets from source to destination Network-wide routing algorithms. forwarding: moe packets from router s input link to appropriate output link Internal to a single router q IP Proides? à Best-effort serice 3 4
Router Architecture Oeriew Two key router functions: q. run routing algorithms/protocol q. forward datagrams from incoming to outgoing link Four sources of packet delay Find an analogy for each category below in the caraan example. A transmission propagation B nodal processing queueing 5 6 Three types of switching fabric Queuing in Routers Older Options q Where can queuing occur? q Why does it occur? Current Implementations 7 8
Input Port Functions Physical layer: bit-leel reception Data link layer: e.g., Ethernet see chapter 5 Use Forwarding Table: q goal: complete input port processing at line speed q queuing occurs if datagrams arrie faster than forwarding rate into switch circuitry ( switching fabric ) Input Port Queuing q Circuitry slower than input ports combined -> queueing may occur at input queues q Head-of-the-Line (HOL) blocking: queued datagram at front of queue preents others in queue from moing forward q queuing delay and loss due to input buffer oerflow 9 0 Output Ports q Buffering required when datagrams arrie from circuitry faster than the line transmission rate q Scheduling discipline chooses among queued datagrams for transmission Output Port Queuing q Packet scheduler at the output port Select one queued packet for transmission FCFS =? Weighted-fair-queuing share the outgoing link fairly among connections 3
Interplay between routing and forwarding IP Addressing: Oeriew routing algorithm local forwarding table header alue output link 000 00 0 00 Address alue in arriing packet s header 0 3 3 Ø Create ersus use the forwarding table 3 q IP address: 3-bit identifier for each interface on a host or router. Dotted-decimal notation q Interface: connection between host/router and physical link routers typically hae multiple interfaces hosts typically hae one interface IP addresses associated with each interface 3... 3... 3... 3...3 3...9 3..3. 3..3.7 3... 3..3. 3... = 0 0000000 0000000 0000000 3 4 Subnets q A subnet contains: deices that can physically reach each other without an interening router q IP address: subnet portion (high order bits) host portion (low order bits) q Subnet mask notation: Differentiates the network ersus host part of the address e.g., the leftmost 4 bits are for the network 3..3.0/4 3... 3... 3... 3...4 3...9 3... 3...3 3..3.7 subnet 3..3. 3..3. network consisting of 3 subnets 5 Subnets How many subnets are in this figure? 3... 3..9. 3... 3...6 3..9. 3..8. 3... 3... 3...3 3..7.0 3..8.0 3..3. 3...4 3..7. 3..3.7 3..3. 6 4
IP addressing: CIDR CIDR: Classless InterDomain Routing subnet portion of address of arbitrary length address format: a.b.c.d/x, where x is # bits in subnet (left-most) portion of address Addresses of all hosts in the same subnet hae the same left most x bits The x most significant bits are the prefix subnet part the prefix host part 00000 0000 0000000 00000000 00.3.6.0/3 7 Forwarding table Destination Address Range 4 billion possible entries Link Interface 00000 0000 0000000 00000000 through 0 00000 0000 0000 00000 0000 000000 00000000 through 00000 0000 000000 00000 0000 00000 00000000 through 00000 0000 000 otherwise 3 8 Longest prefix matching Examples Prefix Match Link Interface 00000 0000 0000 0 00000 0000 000000 00000 0000 000 otherwise 3 DA: 00000 0000 00000 00000 DA: 00000 0000 000000 0000 Which interface? Which interface? Forwarding Table Ranges q What are the assumptions and implications of haing large ranges of IP addresses forwarded to the same outgoing link? q Why is CIDRized ( classless ) addressing an improement oer classful addressing, that restricted the network prefix to complete bytes? (see page 344) 9 0 5
Internet Protocol: IP datagram format IP datagram format IP protocol ersion number header length (bytes) max number remaining hops (decremented at each router) upper layer protocol to delier payload to er 3 bits head. type of len serice 6-bit identifier flgs time to lie upper layer length fragment offset Internet checksum 3 bit source IP address 3 bit destination IP address Options (if any) total datagram length (bytes) for fragmentation/ reassembly IP protocol ersion number header length (bytes) max number remaining hops (decremented at each router) upper layer protocol to delier payload to er 3 bits head. type of len serice 6-bit identifier flgs time to lie upper layer length fragment offset Internet checksum 3 bit source IP address 3 bit destination IP address Options (if any) total datagram length (bytes) for fragmentation/ reassembly how much oerhead with TCP? q 0 bytes of TCP q 0 bytes of IP q = 40 bytes + app layer oerhead data (ariable length, typically a TCP or UDP segment) data (ariable length, typically a TCP or UDP segment) Summary q There are many possible network layer serices à IP proides none q Forwarding s. Routing Forwarding tables q Inside a router The internet in miniature Switching fabric (circuitry) q The network IP datagram q IP addressing structure 3 6