network layer: routing & forwardingledvina/dht/ucalgary/forwarding.pdf · forwarding 12...
TRANSCRIPT
Forwarding 1
Instructor: Carey WilliamsonOffice: ICT 740Email: [email protected] Location: ICT 122Lectures: MWF 12:00 – 12:50Notes derived from “Computer Networking: A Top
Down Approach”, by Jim Kurose and Keith Ross,Addison-Wesley.
Slides are adapted from the book’s companion Web site,with changes by Anirban Mahanti and Carey Williamson.
Network Layer: Routing & Forwarding
Forwarding 2
Key Network-Layer Functionsforwarding: move packets from router’s inputto appropriate router output
routing: determine the path taken by packetsas they flow from a sender to a receiver
Routing algorithms – run at routers to determine“paths”;
Routers have a forwarding table• Destination address-based in Datagram networks
• Virtual circuit number-based in VC Networks
Forwarding 3
1
23
0111
value in arrivingpacket’s header
routing algorithm
local forwarding tableheader value output link
0100010101111001
3221
Interplay between routing and forwarding
Forwarding 4
VC Networks: Connection setup
3rd important function in some networkarchitectures:
ATM, frame relay, X.25Before datagrams flow, two hosts andintervening routers establish virtualconnection
Routers get involvedNetwork and transport layer conn service:
Network: between two hostsTransport: between two processes
Forwarding 5
Network service modelQ: What service model for the “channel”transporting datagrams from sender to receiver?
Example services forindividual datagrams:Guaranteed deliveryGuaranteed deliverywith less than 40 msecdelay
Example services for aflow of datagrams:In-order datagramdeliveryGuaranteed minimumbandwidth to flowRestrictions onchanges in inter-packet spacing
Forwarding 6
Network layer service models:
NetworkArchitecture
Internet
ATM
ATM
ATM
ATM
ServiceModel
best effort
CBR
VBR
ABR
UBR
Bandwidth
none
constantrateguaranteedrateguaranteedminimumnone
Loss
no
yes
yes
no
no
Order
no
yes
yes
yes
yes
Timing
no
yes
yes
no
no
Congestionfeedback
no (inferredvia loss)nocongestionnocongestionyes
no
Guarantees ?
Forwarding 7
Network layer connection-orientedand connection-less serviceDatagram network provides network-layerconnectionless serviceVC network provides network-layerconnection-oriented serviceAnalogous to the transport-layer services,but:
Service: host-to-hostNo choice: network provides one or the otherImplementation: in the core
Forwarding 8
Virtual circuits
call setup, teardown for each call before data can floweach packet carries VC identifier (not destination hostaddress)every router on source-dest path maintains “state” foreach passing connectionlink, router resources (bandwidth, buffers) may beallocated to VC
“source-to-dest path behaves much like telephonecircuit”
performance-wisenetwork actions along source-to-dest path
Forwarding 9
VC implementation
A VC consists of:1. Path from source to destination2. VC numbers, one number for each link along
path3. Entries in forwarding tables in routers along
pathPacket belonging to VC carries a VCnumber.VC number must be changed on each link.
New VC number comes from forwarding table
Forwarding 10
Forwarding table12 22 32
1 23
VC number
interfacenumber
Incoming interface Incoming VC # Outgoing interface Outgoing VC #
1 12 3 222 63 1 183 7 2 171 97 3 87… … … …
Forwarding table inNorthwest router:
Routers maintain connection state information!
Forwarding 11
Virtual circuits: signaling protocols
used to setup, maintain, and teardown VCused in ATM, frame-relay, X.25not used in today’s Internet
applicationtransportnetworkdata linkphysical
applicationtransportnetworkdata linkphysical
1. Initiate call 2. incoming call3. Accept call4. Call connected
5. Data flow begins 6. Receive data
Forwarding 12
Datagram networksno call setup at network layerrouters: no state about end-to-end connections
no network-level concept of “connection”packets forwarded using destination host address
packets between same source-dest pair may takedifferent paths
applicationtransportnetworkdata linkphysical
applicationtransportnetworkdata linkphysical
1. Send data 2. Receive data
Forwarding 13
Datagram or VC network: why?
Internetdata exchange amongcomputers
“elastic” service, no stricttiming req.
“smart” end systems(computers)
can adapt, performcontrol, error recoverysimple inside network,complexity at “edge”
many link typesdifferent characteristicsuniform service difficult
ATMevolved from telephonyhuman conversation:
strict timing, reliabilityrequirementsneed for guaranteedservice
“dumb” end systemstelephonescomplexity insidenetwork
Forwarding 14
Inside a Router
Forwarding 15
Router Architecture Overview
Two key router functions:run routing algorithms/protocol (RIP, OSPF, BGP)forwarding datagrams from incoming to outgoing link
Forwarding 16
Input Port Functions
Decentralized switching:given datagram dest., lookup output portusing forwarding table in input portmemory (caching of entries)goal: complete input port processing at‘line speed’queuing: if datagrams arrive faster thanforwarding rate into switch fabric
Physical layer:bit-level reception
Data link layer:e.g., Ethernet
Forwarding 17
Three types of switching fabrics
Forwarding 18
Switching via MemoryFirst generation routers:traditional computers with switching under directcontrol of CPUpacket copied to system’s memoryspeed limited by memory bandwidth (2 buscrossings per datagram)
InputPort
OutputPort
Memory
System Bus
Forwarding 19
Switching via a Bus
datagram from input port memoryto output port memory via a sharedbusbus contention: switching speedlimited by bus bandwidth1 Gbps bus, Cisco 1900: sufficientspeed for access and enterpriserouters (not regional or backbone)
Forwarding 20
Switching via an InterconnectionNetwork
Overcomes bus bandwidth limitationsBanyan networks, other interconnection netsinitially developed to connect processors inmultiprocessorAdvanced design: fragmenting datagram into fixedlength cells, switch cells through the fabric.Cisco 12000: switches Gbps through theinterconnection network
Forwarding 21
Output Ports
Buffering required when datagrams arrive fromfabric faster than the transmission rate
Need queue management policy (Drop-Tail, AQM)Also need packet scheduling policy (FCFS, WFQ)
Forwarding 22
Output port queueing
buffering when arrival rate via switch exceedsoutput line speedqueueing (delay) and loss due to output portbuffer overflow!
Forwarding 23
Input Port Queuing?
Fabric slower than input ports combined -> queueingmay occur at input queuesHead-of-the-Line (HOL) blocking: queued datagramat front of queue prevents others in queue frommoving forward (even though o/p port is free for theother datagram)
Forwarding 24
Next Topic
Routing AlgorithmsRouting in the InternetReadings: Chapter 4 in the K&R book