data communications packet switching. principles circuit switching designed for voice resources...

50
Data Communications Packet Switching

Post on 20-Dec-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Data Communications

Packet Switching

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!

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

Use of Packets

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

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

DatagramVirtual circuit

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

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

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

Packet Size

Circuit vs Packet SwitchingPerformance

Propagation delayTransmission timeNode delay

Event Timing

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

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

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

External Virtual Circuit andDatagram Operation

InternalVirtualCircuit andDatagram Operation

RoutingComplex, crucial aspect of packet switched

networksCharacteristics required

CorrectnessSimplicityRobustnessStabilityFairnessOptimalityEfficiency

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

Dijkstra’s Least Cost Example

Dijkstra’s Least Cost Example

Decision Time and PlaceTime

Packet or virtual circuit basis

PlaceDistributed

Made by each node

CentralizedSource

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

Routing StrategiesFixedFloodingRandomAdaptive

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

Fixed RoutingTables

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

Flooding Example

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)

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

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

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

May not realize theoretical benefits

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

Isolated Adaptive Routing

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

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

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.

X.251976Interface between host and packet switched

networkAlmost universal on packet switched

networks and packet switching in ISDNDefines three layers

PhysicalLinkPacket

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

X.25 - LinkLink Access Protocol Balanced (LAPB)

Subset of HDLC

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

between subscribers

X.25 Use of Virtual Circuits

Virtual Circuit ServiceVirtual Call

Dynamically established

Permanent virtual circuitFixed network assigned virtual circuit

Virtual Call

Packet Format

MultiplexingDTE can establish 4095 simultaneous virtual

circuits with other DTEs over a single DTC-DCE link

Packets contain 12 bit virtual circuit number

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

Other Famous Packet Switched NetworksFrame relay

ATM

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

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?