Top Banner
Data Communications Packet Switching
50

Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Dec 20, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Data Communications

Packet Switching

Page 2: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

PrinciplesCircuit switching designed for voice

Resources dedicated to a particular callMuch of the time a data connection is idleData rate is fixed

Both ends must operate at the same rate

What if we don’t want a dedicated call, or the data rate is bursty? You want packet switching!

Page 3: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Basic OperationData transmitted in small packets

Typically 1000 octetsLonger messages split into series of packetsEach packet contains a portion of user data plus

some control info

Control infoRouting (addressing) info

Packets are received, stored briefly (buffered) and passed on to the next nodeStore and forward

Page 4: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Use of Packets

Page 5: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

AdvantagesLine efficiency

Single node to node link can be shared by many packets over time

Packets queued and transmitted as fast as possible

Data rate conversionEach station connects to the local node at its own

speedNodes buffer data if required to equalize rates

Packets are accepted even when network is busyDelivery may slow down

Priorities can be used

Page 6: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Switching TechniqueStation breaks long message into packetsPackets sent one at a time to the networkPackets handled in two ways

DatagramVirtual circuit

Page 7: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

DatagramEach packet treated independentlyPackets can take any practical routePackets may arrive out of orderPackets may go missingUp to receiver to re-order packets and

recover from missing packets

Page 8: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Virtual CircuitPreplanned route established before any

packets sentCall request and call accept packets

establish connection (handshake)Each packet contains a virtual circuit

identifier instead of destination addressNo routing decisions required for each

packetClear request to drop circuitNot a dedicated path

Page 9: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Virtual Circuits vs DatagramVirtual circuits

Network can provide sequencing and error controlPackets are forwarded more quickly

No routing decisions to make

Less reliableLoss of a node looses all circuits through that node

DatagramNo call setup phase

Better if few packets

More flexibleRouting can be used to avoid congested parts of

the network

Page 10: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Packet Size

Page 11: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Circuit vs Packet SwitchingPerformance

Propagation delayTransmission timeNode delay

Page 12: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Event Timing

Page 13: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

External and Internal OperationPacket switching - datagrams or virtual circuitsInterface between station and network node

Connection orientedStation requests logical connection (virtual circuit)All packets identified as belonging to that

connection & sequentially numberedNetwork delivers packets in sequenceExternal virtual circuit servicee.g. X.25Different from internal virtual circuit operation

ConnectionlessPackets handled independentlyExternal datagram serviceDifferent from internal datagram operation

Page 14: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Combinations (1)External virtual circuit (connection-

oriented), internal virtual circuitDedicated route through network

External virtual circuit, internal datagramNetwork handles each packet separatelyDifferent packets for the same external virtual

circuit may take different internal routesNetwork buffers at destination node for re-

ordering

Page 15: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Combinations (2)External datagram (connectionless), internal

datagramPackets treated independently by both network

and user

External datagram, internal virtual circuitExternal user does not see any connectionsExternal user sends one packet at a timeNetwork sets up logical connections

Page 16: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

External Virtual Circuit andDatagram Operation

Page 17: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

InternalVirtualCircuit andDatagram Operation

Page 18: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

RoutingComplex, crucial aspect of packet switched

networksCharacteristics required

CorrectnessSimplicityRobustnessStabilityFairnessOptimalityEfficiency

Page 19: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Performance CriteriaUsed for selection of routeMinimum hopLeast cost

Dijkstra’s algorithm most commonFinds the least cost path from one starting node

to all other nodesAlgorithm can be repeated for each starting

node

Page 20: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Dijkstra’s Least Cost Example

Page 21: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Dijkstra’s Least Cost Example

Page 22: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Decision Time and PlaceTime

Packet or virtual circuit basis

PlaceDistributed

Made by each node

CentralizedSource

Page 23: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Network Information Source and Update TimingRouting decisions usually based on knowledge of

network (not always)Distributed routing

Nodes use local knowledgeMay collect info from adjacent nodesMay collect info from all nodes on a potential route

Central routingCollect info from all nodes

Update timingWhen is network info held by nodes updatedFixed - never updatedAdaptive - regular updates

Page 24: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Routing StrategiesFixedFloodingRandomAdaptive

Page 25: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Fixed RoutingSingle permanent route for each source to

destination pairDetermine routes using a least cost

algorithmRoute fixed, at least until a change in

network topology

Page 26: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Fixed RoutingTables

Page 27: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

FloodingNo network info requiredPacket sent by node to every neighborIncoming packets retransmitted on every link

except incoming linkEventually a number of copies will arrive at

destinationEach packet is uniquely numbered so duplicates

can be discardedNodes can remember packets already forwarded to

keep network load in boundsCan include a hop count in packets

Page 28: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Flooding Example

Page 29: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Properties of FloodingAll possible routes are tried

Very robust

At least one packet will have taken minimum hop count routeCan be used to set up virtual circuit

All nodes are visitedUseful to distribute information (e.g. routing)

Page 30: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Random RoutingNode selects one outgoing path for

retransmission of incoming packetSelection can be random or round robinCan select outgoing path based on

probability calculationNo network info neededRoute is typically not least cost nor

minimum hop

Page 31: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Adaptive RoutingUsed by almost all packet switching networksRouting decisions change as conditions on the

network changeFailureCongestion

Requires info about networkDecisions more complexTradeoff between quality of network info and

overheadReacting too quickly can cause oscillationToo slowly to be relevant

Page 32: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Adaptive Routing - AdvantagesImproved performanceAid congestion control (See chapter 12)Complex system

May not realize theoretical benefits

Page 33: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

ClassificationBased on information sources

Local (isolated)Route to outgoing link with shortest queueCan include bias for each destinationRarely used - do not make use of easily

available info

Adjacent nodesAll nodes

Page 34: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Isolated Adaptive Routing

Page 35: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

ARPANET Routing Strategies(1)First Generation

1969 – 1979?Distributed adaptiveEstimated delay as performance criterionBellman-Ford algorithm (appendix 10a) (aka

Distance Vector Routing)Node exchanges delay vector with neighborsUpdate routing table based on incoming infoDoesn't consider line speed, just queue lengthQueue length not a good measurement of delayResponds slowly to congestion

Page 36: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

ARPANET Routing Strategies(2)

Second Generation1979 – 1987?Known as Link State RoutingUses delay as performance criterionEvery 10s node computes average delay on

each outgoing link; if changes are significant, info is flooded

Delay measured directlyUses Dijkstra’s algorithm (appendix 10a)Good under light and medium loadsUnder heavy loads, little correlation between

reported delays and those experienced

Page 37: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

ARPANET Routing Strategies(3)Third Generation

1987 - Known as Open Shortest Path FirstLink cost calculations changedMeasure average delay over last 10 secondsNormalize based on current value and previous

results

More on these in a later course.

Page 38: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

X.251976Interface between host and packet switched

networkAlmost universal on packet switched

networks and packet switching in ISDNDefines three layers

PhysicalLinkPacket

Page 39: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

X.25 - PhysicalInterface between attached station and link

to nodeData terminal equipment DTE (user

equipment)Data circuit terminating equipment DCE

(node)Uses physical layer specification X.21Reliable transfer across physical linkSequence of frames

Page 40: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

X.25 - LinkLink Access Protocol Balanced (LAPB)

Subset of HDLC

Page 41: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

X.25 - PacketExternal virtual circuitsLogical connections (virtual circuits)

between subscribers

Page 42: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

X.25 Use of Virtual Circuits

Page 43: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Virtual Circuit ServiceVirtual Call

Dynamically established

Permanent virtual circuitFixed network assigned virtual circuit

Page 44: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Virtual Call

Page 45: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Packet Format

Page 46: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

MultiplexingDTE can establish 4095 simultaneous virtual

circuits with other DTEs over a single DTC-DCE link

Packets contain 12 bit virtual circuit number

Page 47: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Reset and RestartReset

Reinitialize virtual circuitSequence numbers set to zeroPackets in transit lostUp to higher level protocol to recover lost packetsTriggered by loss of packet, sequence number

error, congestion, loss of network internal virtual circuit

RestartEquivalent to a clear request on all virtual circuitsE.g. temporary loss of network access

Page 48: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Other Famous Packet Switched NetworksFrame relay

ATM

Page 49: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Review Questions1. List the main differences between circuit

switched and packet switched networks2. What are differences between datagram and

virtual circuit packet switched networks?3. What is the difference between

connectionless and connection-oriented networks?

4. Be able to perform Djkstra’s least cost algorithm

5. Be able to perform a simple flooding algorithm

Page 50: Data Communications Packet Switching. Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data.

Review Questions6. What are the three generations of

Arpanet routing strategies?7. What is the significance of X.25?8. What X. protocols are used with X.25?9. What different types of connections can

be established in an X.25 network?