Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

William Stallings Data and Computer Communications: Packet Switching

Download as pdf or txt
Download as pdf or txt
You are on page 1of 59

William Stallings Data and Computer Communications

Chapter 10 Packet Switching

Review of Chapter 9
Switching Network Circuit-Switching Network, Space-Division Switching, Time-Division Switching Routing in Circuit-Switching Networks Control Signaling, in channel, common channel, SS7

Client/server
Client
application transport network data link physical

request

reply
application transport network data link physical

Server 3

Contents in This Chapter


Packet-Switching Principles
Switching technique & packet size Circuit switching vs packet switching External and internal operation

Routing (Dijkstra)
Least cost, Characteristics, strategies

X.25
Virtual circuit service Packet format, multiplexing, flow and error control, packet sequences, reset and restart
4

10 Packet Switching
When bursty data traffic? (circuit switching, packet switching) Two means: datagram and virtual circuit Packet-switching network is a distributed collection of packet-switching nodes. (flexibility, resource sharing, robustness, responsiveness, but never perfect)

10.1 Principles of packet switch


Circuit switching designed for voice
Resources dedicated to a particular call Much of the time a data connection is idle Data rate is fixed, why?
Both ends must operate at the same rate Limited network utility when connect various host computers and workstations (waste)

Basic Operation in Packet Switching (Fig. 9.1)


Data transmitted in small packets
Longer messages split into series of packets Each packet contains a portion of user data plus some control info

Control info (addressing info) Packets are received, stored briefly (buffered) and passed on to the next node
Store and forward Data rate is not fixed

Use of Packets

Packet Switching Network


X.25 Physical Level

Advantages (Compare with Circuit Switching)


Line efficiency (example)
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

Packets are accepted even when network is busy


Delivery may slow down

Priorities can be used, etc.


10

10.1.1 Switching Technique


Station breaks long message into packets & send them to the network. Two ways:
Datagram Virtual circuit

How routed?

11

Datagram (Fig)
Each packet treated independently Packets can take any practical route maybe different) Packets may arrive out of order Packets may go missing Up to receiver to re-order packets and recover from missing packets
12

Virtual Circuit (Fig)


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 (different from circuit switching)

13

Virtual Circuits v Datagram


Virtual circuits
Establish a connection (better for long time transmission) After connection established, each packets are forwarded more quickly (No routing decisions to make) Network can provide sequencing and error control Less reliable (Loss of a node looses all circuits through that node)

Datagram
No call setup phase (Better if few packets) Routed individually No sequencing and error control More flexible (Routing can be used to avoid congested or failed parts of the network)
14

Time

3 11 23 40

10.1.2 Packet Size

Question: Transmit 40 octets


23492

11777 71284

53 433129 15

10.1.3 Circuit v Packet Switching


Performance
Propagation delay (2108m/s, negligible) Transmission time Node delay

16

Event Timing

Other Characteristics

18

10.1.4 External and Internal Operation Operation: - datagrams or virtual circuits Service: Interface between station and network node
Connection oriented
Station requests logical connection (virtual circuit) All packets identified as belonging to that connection & sequentially numbered Network delivers packets in sequence Also called: External virtual circuit service, e.g. X.25 Different from internal virtual circuit operation

Connectionless
Packets handled independently Also called: External datagram service Different from internal datagram operation
19

Combinations
External virtual circuit, internal virtual circuit External virtual circuit, internal datagram
Dedicated route through network 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 Packets treated independently by both network and user External user does not see any connections External user sends one packet at a time Network sets up logical connections
20

External datagram, internal datagram

External datagram, internal virtual circuit

External Virtual Circuit and Datagram Operation

X.25 Packet Level

21

Internal Virtual Circuit and Datagram Operation

22

10.2 Routing.
Complex, crucial aspect of packet switched networks Characteristics required
Correctness Simplicity Robustness Stability Fairness Optimality Efficiency

Need balance these characteristics

23

10.2.1 Performance Criteria.


Used for selection of route Minimum hop Least cost
See Stallings appendix 10A for routing algorithms

24

Costing of Routes.

Decision Time and Place.


Characteristics of routing decision: Time
Packet or virtual circuit basis

Place
Distributed (each node) Centralized (some designated node) Source routing (source station, not node)
26

Network Information Source and Update Timing.


Routing decisions usually based on knowledge of network (not always) Distributed routing
Nodes use local knowledge May collect info from adjacent nodes May collect info from all nodes on a potential route

Central routing
Collect info from all nodes

Update timing (When is network info held by nodes updated)


Fixed - never updated Adaptive - regular updates
27

10.2.2 Routing Strategies.


Fixed Routing Flooding Random Routing Adaptive Routing

28

10.2.2.1 Fixed Routing.


Single permanent route for each source to destination pair Determine routes using a least cost algorithm (appendix 10A, Dijkstra, Bellman Ford) Route fixed, at least until a change in network topology

29

Fixed Routing Tables


Isolated

Node I (Source) <Destination, Next Node>

Features? Virtual Circuit vs Datagram Simple Lack of flexibility Refinement

10.2.2.2 Flooding. (Fig. 10.6)


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 Packet Storm occurs
Each packet is uniquely numbered so duplicates can be discarded Can include a hop count in packets
31

Flooding Example.
(Hop Count)

32

Properties of Flooding.
All possible routes are tried (robust, military) At least one packet will have taken minimum hop count route
Can be used to set up virtual circuit

All nodes are visited


Distribute useful information (e.g. routing)

Problem: High traffic load

33

10.2.2.3 Random Routing.


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 (data rate, cost, etc.) No network info needed Route is typically not least cost nor minimum hop Simplicity & robustness, less traffic load

34

10.2.2.4 Adaptive Routing.


Used by almost all packet switching networks Routing decisions change as conditions on the network change
Failure Congestion

Decisions more complex Requires info about network Disadvantages:


Tradeoff between quality of network info and overhead Reacting too quickly can cause oscillation, Too slowly to be relevant
35

Adaptive Routing Advantages.


Improved performance Aid congestion control (See chapter 12)

36

Classification.
Adaptive routing strategies can be calssified based on information sources:
Local (isolated)
Route to outgoing link with shortest queue Can include bias for each destination
Rarely used - do not make use of easily available info

Adjacent nodes All nodes

37

Isolated Adaptive Routing.

From node 1 to 6

Figure 38

Oscillation

39

10.3 X.25
Interface between host and packet switched network Originally approved in 1976 Almost universal on packet switched networks and packet switching in ISDN Defines three layers (Refer to OSI)
Packet Level Link Level Physical Level
Packet Switch Network

40

X.25 Physical Level


Interface between attached station and link to node Data terminal equipment DTE (user equipment) Data circuit terminating equipment DCE (node) Uses physical layer specification X.21, in many cases other standards, e.g. EIA-232

Packet Switch Network

41

X.25 Link Level


Reliable transfer across physical link Sequence of frames Link Access Protocol Balanced (LAPB)
Same frame format as HDLC Subset of HDLC - ABM Designed for point to point link between system and packet switching network node

Primary station Secondary station Combined station

Unbalanced configuration balanced configuration

NRM ABM ARM


42

X.25 Packet Level


External virtual circuits service Logical connections (virtual circuits) between subscribers

External Virtual Circuit

43

X.25 Use of Virtual Circuits

44

User Data & X.25 Protocol Control Information


User Data
Layer3 header

X.25 packet

LAPB header

LAPB Trailer

LAPB frame

X.25 Packet control information


Identify virtual circuit number Provide sequence number used for flow and error control

LAPB entity
Control information at both the front and back of the packet, including flow and error control

45

10.3.1 Virtual Circuit Service


Virtual Call
Dynamically established, transfer and release connection

Permanent virtual circuit


Fixed network assigned virtual circuit, no connection establishment and release phase

Virtual call vs Permanent virtual circuit

46

Different Virtual Circuit Number B


Source, Destination DCE Route DCE

Virtual Circuit Number A Virtual Circuit Number A

DCE DCE

Virtual Call

Virtual Circuit Number B

R: Receive S: Send

Virtual Circuit Number

47

10.3.2 Packet Format


24

32

Protocol Identifier
56

Virtual Circuit Number

Flow and error control

48

Addition Information
Example: Call request packet Calling DTE address length (4bits) Called DTE address length(4bits) DTE address (variable), both calling & called DTE Facilities
Reverse charging, closed user group, flow control parameters, throughput, one-way logical channel

49

X.25 Packet Types & Parameters

10.3.3 Multiplexing
DTE can establish 4095 simultaneous virtual circuits with other DTEs over a single physical DTC-DCE link Full-duplex multiplexing Packets contain 12 bit virtual circuit number 40952121

51

Virtual Circuit Numbering


Why virtual circuit number is separated?

Overflow

Virtual Call

10.3.4 Flow and Error Control


Same as HDLC (Chapter 7) Sliding window, P(S), P(R) D bit (Acknowledgement)
0: DTE-DCE (Control the flow from the DTE to network) 1: DTE-DTE

The error control scheme is go-back-N ARQ

53

10.3.5 Packet Sequences


Complete packet sequences Allows longer blocks of data across network with smaller packet size without loss of block integrity (used by IP) A packets B packets
The rest

M bit 1, D bit 0, equal to the maximum allowable packet length

Zero or more A followed by B D bit 1, end to end acknowledgement Network may combine the sequence into large one, or segment a B into smaller ones Reconcile the changes in sequence numbering (DCEs responsibility)
54

10.3.6 Reset and Restart


Two facilities for recovering from errors: Reset Restart (more serious error)

55

Reset
Triggered by loss of packet, sequence number error, congestion, loss of network internal virtual circuit (two DCEs must rebuild the internal virtual circuit to support the stillexisting DTE-DTE external virtual circuit) Reinitialize a virtual circuit Can be initiated by DTE or DCE Sequence numbers set to zero Packets in transit lost Up to higher level protocol to recover lost packets

56

Restart
Equivalent to a clear request on all virtual circuits and a Reset Request on all permanent virtual circuit By DTE or DCE E.g. temporary loss of network access

57

Review & Key Points


Packet-Switching Principles
Switching technique & packet size Circuit switching vs packet switching External and internal operation

Routing (Dijkstra)
Characteristics, strategies

X.25
Virtual circuit service Packet format, multiplexing, flow and error control, packet sequences, reset and restart
58

Exercise & Preparation


Exercise
10.2, 10.4, 10.5, 10.10

Thinking
10.14, 10.23

Preparation
Chapter 11

59

You might also like