340 likes | 351 Views
This chapter explores the benefits of using packet switching instead of circuit switching for data communication. It discusses the advantages of line efficiency, data rate conversion, and the two packet switching techniques: datagram and virtual circuit. The chapter also covers the key routing strategies and their trade-offs.
E N D
William StallingsData and Computer Communications Chapter 10 Packet Switching
Why Packet Switching? • Using circuit switching for data • Inefficient • Resources dedicated to a particular connection • Much of the time a data connection is idle • Data rate is fixed • Both ends must operate at the same rate • Limits the utility of high-speed workstations
Advantages • Line efficiency • Single node to node link can be shared by many packets over time • Packets queued and transmitted as fast as possible • Data rate conversion • Each station connects to the local node at its own speed • Nodes buffer data if required to equalize rates • Packets are accepted even when network is busy • Delivery may slow down
Switching Technique • Station breaks long message into packets • Packets are received, stored briefly (buffered) and past on to the next node on the network • Store and forward • Packets handled in two ways • Datagram • Virtual circuit
Datagram • Each packet treated independently • Packets can take any practical route • Packets may arrive out of order • Packets may go missing • Up to receiver to re-order packets and recover from missing packets
Virtual Circuit • Preplanned route established before any packets sent • Call request and call accept packets establish connection (handshake) • Each packet contains a virtual circuit identifier instead of destination address • No routing decisions required for each packet • Clear request to drop circuit • Not a dedicated path
Virtual Circuits vs. Datagram • Virtual circuits • Network can provide sequencing and error control • Packets are forwarded more quickly • No routing decisions to make • Less reliable • Loss of a node looses all circuits through that node • Datagram • No call setup phase • Better if few packets • More flexible • Routing can be used to avoid congested parts of the network
Routing • Finding a path through network nodes from source to destination • Characteristics of routing strategies • Correctness • Robustness • Stability • Fairness • Optimality • Effieciency (overhead for routing processing)
Performance Criteria • Criteria used for selection of route • Minimum hop • number of links • simplest • minimize the use of network resources used for routing decision • Least cost • minimize the total link cost • minimize delay • maximize throughput • minimize the monetary cost • more complex algorithms
Decision Time and Place • Routing decision time • Datagram (no virtual circuit) • for each packet • Virtual circuit • when the virtual circuit is established • route may change dynamically depending on current conditions
Decision Time and Place • Routing decision place • Which nodes are responsible for routing decision? • Distributed routing • each node decides the next one • most common • Centralized routing • designated central node (e.g. network control center) • not so robust since loss of this node may block the whole network • Source routing • routing decision is made by the originating station
Network Information Source and Update Timing • Routing decisions usually (not always) are based on knowledge of network (e.g. traffic load and link costs) • like flooding • Distributed routing • Nodes use local knowledge • cost of each outgoing link • May collect info from adjacent nodes • May collect info from all nodes on a potential route • Central routing • Collect info from all nodes
Network Information Source and Update Timing • Update timing • When is network info updated? • No information used (fixed, flooding) • no updates • Local information used only • update is continuous • Other nodes’ info used • regular updates to adapt the route changing conditions • Tradeoff between good adaptive routing and efficiency
Key Routing Strategies • Fixed • Flooding • Random • Adaptive
Fixed Routing • Single, permanent route for each source to destination pair • Determine routes using a least cost algorithm (Bellman-Ford, Dijkstra - appendix 10A) • Route fixed, unless there is a change in network topology • link costs should be static (e.g. cannot be current traffic or load) • Simple, works well with reliable and stable load networks • Disadvantage: lack of flexibility
Flooding • No network info required • Packet sent by node to every neighbor • Incoming packets retransmitted on every link except incoming link • Eventually a number of copies will arrive at destination • Each packet is uniquely numbered so duplicates can be discarded at destination
Flooding • Precautions against unlimited grow in circulation • Nodes can remember packets already forwarded to keep network load in bounds • Include a hop count in packets. • Set to a maximum value (e.g. diameter of the network) • Decrease one at each hop • Discard when 0
Properties of Flooding • All possible routes are tried • Very robust • can be used for emergency messaging • At least one packet will use minimum hop count route • Can be used to set up virtual circuit • All nodes are visited • Useful to distribute information (e.g. routing info)
Random Routing • Node selects one outgoing path for retransmission of incoming packet • Selection is at random • equally likely • all outgoing links are utilized in long-run • can select outgoing path based on a probability • e.g. probability based on data rate • good traffic distribution • No network info needed • Route is typically not least cost nor minimum hop
Adaptive Routing • Used by almost all packet switching networks • Routing decisions change as conditions on the network change • Failure • Congestion • Requires network info exchanged among nodes
Adaptive Routing - Drawbacks • Decisions more complex • Processing burden • Tradeoff between quality of network info and overhead • Overreaction may cause oscillations
Adaptive Routing - Advantages • Robustness • Improved performance • Aid congestion control • adaptive routing balances the loads
Classification • Based on information sources • Local • rarely used • Adjacent nodes • All nodes • Local • Route to outgoing link with shortest queue length • Good for load balancing, but may not be good for optimal routing • Can include bias for each destination (a value fornegative preferrence) • outgoing link is determined by minimizing queue length plus bias
ARPANET Routing Strategies • First Generation • 1969 • Distributed, adaptive • Bellman-Ford algorithm • Node exchanges delay vector with neighbors (every 128 ms) • Update routing tables based on incoming info • Doesn't consider line speed, just queue length (delay) • Queueing delay is not the whole delay
ARPANET Routing Strategies • Second Generation • 1979 • distributed, adaptive • uses “measured” delay as performance criterion • computes delay every 10 secs • informs all others (using flooding) if there is a significant change • After all nodes change their routing tables, the routing tables may become obsolete • causes oscillations (under heavy loads) • result: not all routes can get the best path under heavy loads
ARPANET Routing Strategies • Third Generation • 1987 • Link cost calculations changed • Measure average delay over last 10 seconds, • Transformed into link utilization • Normalized based on current value and previous results • Resulting estimated link utilization is then transformed into delay
Bellman-Ford Algorithm • Minimum cost paths • Iterative • find the shortest paths from a source to all possible destinations using only link • then using max. two links by adding appropriate links to the paths of step 1 • then using max. 3 links on top of paths with two links • so on .. until no improvement is gained by adding more links • See example on board