Packet Switching
Packet Switching
Around 1970, research began on a new form of architecture for long distance communications: Packet Switching.
1
Introduction
Packet Switching refers to protocols in which messages are divided into packets before they are sent. Each packet is then transmitted individually and can even follow different routes to its destination. Once all the packets forming a message arrive at the destination, they are recompiled into the original message.
Packet Switching
Packet Switching started in the 1970s. ARPANET that became Internet In the beginning most people did not believe it would work The basic technology of packet switching is fundamentally the same today as it was in the early 1970s networks Packet switching remains one of the few technologies for effective long-distance data communications. 7
Use of Packets
10
11
Advantages
Line efficiency Single node to node link can be dynamically shared by many packets over time Packets queued and transmitted as fast as possible Data rate conversion Two stations of different data rates can exchange packets because each connects to its node at its proper data rate
12
Advantages
When traffic becomes heavy in a circuit switching network, some calls are blocked i.e the network refuses to accept additional connection requests until the load on the network decreases. On a packet switching network, packets are still accepted, but delivery delay increases Priorities can be used. If a node has a number of packets queued for transmission, it can transmit the higher priority packets first.
13
Switching Technique
If a station sends a message through packet switching network that is of length greater than the maximum packet size, it breaks the message up into packets and sends these packets, one at a time, to the network Question?? How the network will handle this stream of packets as it attempts to route them through the network and deliver them to the intended destination
14
15
17
19
20
Virtual Circuit
21
22
Datagram
Better if few packets Routing can be used to avoid congested parts of the network
24
Packet Size
25
Packet Size
In this example it is assumed that there is a virtual circuit from station X through nodes a and b to station Y. The message to be sent comprises 40 octets and 3 octets of control information called header. If the entire message is sent the packet first transmitted from station X to node a, when the entire packet is received, it can be transmitted from a to b and then transmitted to Y. ignoring switching time, total transmission time is 129 octettime(43octets x 3 packet transmission)
26
Transmission time
The time it takes for a transmitter to send out a block of data, e.g it takes 1s to transmit 10,000 bit block of data onto a 10-kbps line.
Node delay
The time it takes for a node to perform the necessary processing as it switches data 27
28
Circuit Switching
Datagram Packet switching
Dedicated transmission path Continuous transmission of data Fast enough for interactive Messages are not stored The path is established for entire conversation Call setup delay; negligible transmission delay Busy signal if called party busy Overload may block call setup; no delay for established calls Electromechanical or computerized switching User responsible for message loss protection Usually no speed or code conversion Fixed bandwidth No overhead bits after call setup No dedicated path
Packet Switching
Virtual-circuit Packet Switching
No dedicated path Transmission of packets Fast enough for interactive Packets stored until delivered Route established for entire conversation Call setup delay; packet transmission delay Sender notified of connection denial Overload may block call setup; increase packet delay Small switching nodes Network may be responsible for packet sequences Speed and code conversion Dynamic use of bandwidth Overhead bits in each packet
Transmission of packets Fast enough for interactive Packets may be stored until delivered Route established for each packet Packet transmission delay Sender may be notified if packet not delivered Overload increases packet delay Small switching nodes Network may be responsible for individual packets Speed and code conversion Dynamic use of bandwidth Overhead bits in each packet
29
Connectionless
Combinations (1)
External virtual circuit, internal virtual circuit When the user requests a virtual circuit, a dedicated route through the network is constructed. All packets follow the same route External virtual circuit, internal datagram Network handles each packet separately Different packets for the same external virtual circuit may take different internal routes Network buffers at destination node for re-ordering
31
Combinations (2)
External datagram, internal datagram Each packets is treated independently from both the users and the networks point of view External datagram, internal virtual circuit External user does not see any connections simply sending packets one at a time Network sets up logical connection between stations for packet delivery
32
33
34
35
36
37
38
Routing
Complex, crucial aspect of packet switched networks Characteristics required
Correctness Simplicity Robustness Stability Fairness Optimality Efficiency
41
Delay Throughput
42
Source routing
(decision is actually made by the source station rather than by a network node)
44
Central routing
Central node collect info from all nodes
45
Decision time
Packet (Datagram) Session (Virtual Circuit)
Decision Place
Each node (distributed) Central node (Centralized) Originating node (Source)
47
Routing Strategies
Fixed Flooding Random Adaptive
48
Fixed Routing
Single permanent route for each source to destination pair Determine routes using a least cost algorithm (appendix 10A) Route fixed, at least until a change in network topology
49
50
Fixed Routing
With fixed routing, there is no difference between routing for datagrams and virtual circuits All packets from a given source to a given destination follow the same route The advantage of fixed routing is simplicity and it should work well in a reliable network with a stable load Its disadvantage is its lack of flexibility. It does not react to network congestion or failures 51
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 Nodes can remember packets already forwarded to keep network load in bounds Can include a hop count in packets 52
Flooding Example
53
Properties of Flooding
All possible routes between source and destination are tried
Very robust (used to send emergency messages)
Because all routes are tried at least one copy of the packet to arrive at the destination will have used a minimum hop route All nodes are visited
Useful to distribute information (e.g. routing)
Random Routing
Random routing has the simplicity and robustness of flooding with far less traffic load Node selects one outgoing path for retransmission of incoming packet Selection can be random or round robin Can select outgoing path based on probability calculation No network info needed Route is typically not least cost nor minimum hop
55
Adaptive Routing
Used by almost all packet switching networks Routing decisions change as conditions on the network change Failure
When a node or trunk fails, it can no longer be used as part of a route
Congestion
Portion of a network is heavily congested, packets route around rather than the area of congestion
Requires info about network Decisions more complex (processing burden on network nodes increases)
56
57
59
60
Costing of Routes
61
Dijkstras Algorithm
Define:
N = set of all nodes in the network s = source node M = set of nodes so far incorporated by the algorithm dij = link cost from node i to node j; dii = 0 and dij = if the two nodes are not directly connected; dij 0 if the two nodes are directly connected Dn = cost of the least cost path from node s to node n that is currently known to the algorithm
62
Costing of Routes
Dijkstras Algorithm
Steps 1. Initialize: this is done once in the beginning = {s} M i.e. set of nodes incorporated is only the source node n = dsn for n s i.e. initial path costs to neighboring nodes are simply link D
costs
2. Find the neighboring node not in M that has the least cost path from node s and incorporate that node into M: Find w M such that Dw = min Dj ( j M) Add w to M
53 55
Dijkstras Algorithm
Define: N = set of all nodes in the network s = source node M = set of nodes so far incorporated by the
Dijkstras Algorithm
3. Update least-cost paths: D n = min[D n, Dw +dwn] for all n M If the latter term is the minimum, the path from s to n is now the path from s to w concatenated with the link from w to n
algorithm dij = link cost from node i to node j; dii = 0 and dij = if the two nodes are not directly connected; dij 0 if the two nodes are directly connected Dn = cost of the least cost path from node s to node n that is currently known to the algorithm
54
63
56
64
1
2 3 4
{1}
{1,4} {1, 2, 4} {1, 2, 4, 5} {1, 2, 3, 4, 5}
2
2 2 2
12
12 12 12
5
4 4 3
1-3
1-4-3 1-4-3 1-4-5 3 1-4-5 3
1
1 1 1
14
14 14 14
2 2 2
1-4-56
12
14
1-45
1-4-56
65
67
0
1 2 2 2 3 2 4 2
1-3 1-4-3
1 1
1-4-5- 1 3 1-4-5- 1 3
Comparison
Results from two algorithms agree Information gathered
Bellman-Ford
Calculation for node n involves knowledge of link cost to all neighboring nodes plus total cost to each neighbor from s Each node can maintain set of costs and paths for every other node Can exchange information with direct neighbors Can update costs and paths based on information from neighbors and knowledge of link costs
Dijkstra
Each node needs complete topology Must know link costs of all links in network Must exchange information with all other nodes
69
Evaluation
Dependent on processing time of the algorithms and the amount of information that must be collected from other nodes in the network The evaluation will be depend on the implementation approach and the specific implementation Both algorithms are known to converge under static conditions of topology and link costs and will converge to the same solution If the link costs change over time, the algorithms will attempt to catch up with these changes However, if the link costs depend on traffic, which in turn depends on routes chosen, then a feedback conditions exists, and instabilities may result
70
71