1. Packet-Switching Principles Store & forward scheme - - PDF document

1 packet switching principles
SMART_READER_LITE
LIVE PREVIEW

1. Packet-Switching Principles Store & forward scheme - - PDF document

1 Chap. 9 Packet Switching 1. Packet-Switching Principles Store & forward scheme message is split into size-limited packets for transmission Pipelining of packet transmission reduces transmission delay Advantages


slide-1
SLIDE 1
  • Chap. 9 Packet Switching

1

  • 1. Packet-Switching Principles
  • Store & forward scheme

– message is split into size-limited packets for transmission

  • Pipelining of packet transmission reduces

transmission delay

  • Advantages over circuit-switching

– Greater line efficiency due to sharing of line capacity – Sender and receiver do not need to be simultaneously ready – Message prioritization easy – Data-rate conversion possible

  • Two schemes for packet switching are

– Datagrams: each packet is individually routed through network – Virtual circuits: a virtual circuit is first established; all packets then follow this path, one following the other – Datagram

  • Better flow balancing
  • No call-setup phase
  • More flexible
  • More reliable

– Virtual circuit

  • Easier error & flow control
  • Small packet headers ⇒ more efficient use of bandwidth

for interactive, small packet traffic

slide-2
SLIDE 2
  • Chap. 9 Packet Switching

2

  • Relationship between packet size and trans. time
slide-3
SLIDE 3
  • Chap. 9 Packet Switching

3

  • Comparison of circuit switching and packet switching
slide-4
SLIDE 4
  • Chap. 9 Packet Switching

4 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 nodes User responsible for message loss protection Usually no speed or code conversion Fixed bandwidth transmission No overhead bits after call setup No dedicated path 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 responsi- ble for individual packets Speed and code conversion Dynamic use of bandwidth Overhead bits in each packet 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; increases packet delay Small switching nodes Network may be responsi- ble for individual packets Speed and code conversion Dynamic use of bandwidth Overhead bits in each packet

Circuit switching Datagram packet switching Virtual-circuit packet switching

slide-5
SLIDE 5
  • Chap. 9 Packet Switching

5 (a)External virtual circuit. A logical connection is set up between two

  • stations. Packets are labeled with a virtual circuit number and a

sequence number. Packets arrive in sequence. (b)External datagram. Each packet is labeled with a destination address and may arrive out of sequence.

  • External and Internal Operation

– Externally, to the user a PSN may appear as a datagram (connectionless) or VC (connection-oriented) service; its internal structure can be different from the external structure. – External view: interface between host and PSN – Internal view: operations inside PSN

slide-6
SLIDE 6
  • Chap. 9 Packet Switching

6 (c) Internal virtual circuit. A route for packets between two stations is defined and labeled. All packets for that virtual circuit follow the route and arrive in sequence. (d) Internal datagram. Each packet is treated independently by the network and may arrive at the destination out of sequence.

  • Virtual circuit service (external view)

– Packets are delivered error-free and in sequence – Provide flow and error control – (Most network applications demand sequential, error- free, flow controlled service)

slide-7
SLIDE 7
  • Chap. 9 Packet Switching

7

  • Datagram service (external view)

– Packets may arrive out of sequence, be damaged, be duplicated, or be lost. – No flow and error control – Higher throughput – (For some applications, efficiency is more important than an occasional erroneous or omitted packet. For some applications (e.g., credit checking, banking) higher level protocol will implement flow and error control anyway. Virtual circuit just introduces unnecessary redundancy.)

  • Virtual circuit operation (internal view)

– Connection establishment (make routing decision only

  • nce)

– Minimize per-packet overhead (only need virtual circuit number in every packet) – The failure of a node or link could destroy some virtual circuits

  • Datagram operation (internal view)

– No connection establishment (each packet is delivered independently) – High bandwidth overhead (full destination address in every packet) – More flexible: react more quickly to traffic condition by making routing decisions on a per-packet basis – More robust: if nodes or links are failed, packets can be routed around the affected area

slide-8
SLIDE 8
  • Chap. 9 Packet Switching

8

  • 2. ROUTING

– In a packet switched network, need to determine a path to get from a sender to a destination; usually multiple paths exist, so need to choose one. – Responsibility of the network layer – Done on a session basis in virtual circuits and

  • n a packet basis in datagrams

– Desirable characteristics:

  • Correctness
  • Simplicity
  • Robustness
  • Stability
  • Fairness
  • Optimality
  • Efficiency

– Elements of routing techniques for PSNs

slide-9
SLIDE 9
  • Chap. 9 Packet Switching

9

Least-Cost Algorithms (Determining least-cost paths)

  • Dijkstra’s algorithm

N = set of nodes in the network s = source node M = set of nodes so far incorporated by the algorithm dij = link cost from node I to j; dii = 0, and dij = ∞ if nodes are not directly connected Dn = cost of the least-cost path from node s to node n that is currently known to the algorithm Algorithm

  • 1. Initialize: M = {s}, Dn = dsn for n ≠ s
  • 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 s.t Dw = min(j ∉ M) Dj Add w to M

  • 3. Update least-cost paths:

Dn = min[Dn , Dw + dwn] for all n ∉ M Repeat steps 2 & 3 until M = N

slide-10
SLIDE 10
  • Chap. 9 Packet Switching

10

Example of least-cost routing algorithms

slide-11
SLIDE 11
  • Chap. 9 Packet Switching

11

slide-12
SLIDE 12
  • Chap. 9 Packet Switching

12

  • Bellman-Ford algorithm

s = source node dij = link cost from node I to j; dii = 0, and dij = ∞ if nodes are not directly connected h = maximum number of links in a path at the current stage of the algorithm Dn

(h) = cost of the least-cost path from node s to node n

under the constraint of no more than h links Algorithm

  • 1. Initialize:

Dn

(0) = ∞ for all n ≠ s

Ds

(h) = 0 for all h

  • 2. For each successive h ≥ 0

Dn

(h+1) = min(j) [Dj (h) + djn]

slide-13
SLIDE 13
  • Chap. 9 Packet Switching

13

  • Routing Strategies

– Fixed Routing

  • Routes fixed for a given topology
  • Central routing directory created using some optimality

criterion

  • Each node only needs to store the first-hop destination for

each of the paths

  • Simple but does not react to network congestion or failure
  • 1

5 1 4 5 2

  • 2

2 4 5 4 3

  • 5

3 5 4 4 5

  • 4

5 4 4 5 5

  • 5

4 4 5 5 6

  • 1

2 3 4 5 6 1 2 3 4 5 6 From node To node

Central Routing Directory Node 1 Directory

Dest Next node 2 3 4 5 6 2 4 4 4 4

Node 2 Directory

Dest Next node 1 3 4 5 6 1 3 4 4 4

Node 1 Directory

Dest Next node 1 2 4 5 6 5 2 5 5 5

slide-14
SLIDE 14
  • Chap. 9 Packet Switching

14

– Flooding

  • Source sends packet to all nodes connected to it
  • When a node receives packet, it forwards it to all nodes

except the one that gave the packet

  • Most robust, but tremendous waste of network capacity
  • Guarantees minimum-hop delivery
  • Used usually for broadcast; need mechanism to control

indefinite retransmissions: use packet id or hop counter decremented every hop (initialized to network diameter)

  • Also used when ultra-reliable delivery required. E.g.

military applications

slide-15
SLIDE 15
  • Chap. 9 Packet Switching

15

– Random routing

  • When a node receives packet, it randomly sends it off on

some other link

  • Can be improved by making probabilistic decision based
  • n link data rates:
  • Like flooding, require no network information
  • Simple but not in common use

– Adaptive routing

  • Routing strategy that continuously changes to adapt to

changing environment

  • Can improve performance, but algorithms become much

more complex; increases processing burden and traffic burden; may react too quickly, causing congestion- producing oscillation

  • Three types of adaptive strategies

– Isolated adaptive: local info., distributed control – Distributed adaptive:

  • info. From neighbors, distributed

control – Centralized adaptive:

  • info. From all nodes, centralized

control

j

j

R R = P

i i

Data rate on link i Data rate on all links

  • Prob. of picking link i
slide-16
SLIDE 16
  • Chap. 9 Packet Switching

16

– Example of a simple isolated adaptive routing Choose the outgoing link that minimizes Q + Bi

Queue length Bias

slide-17
SLIDE 17
  • Chap. 9 Packet Switching

17

  • 3. CONGESTION CONTROL
  • Maintain the number of packets within the network or a

region of the network below the level at which queuing delays blow up

  • Packet switching network is a network of queues

Input and output queues

  • f a node

Interaction of queues

slide-18
SLIDE 18
  • Chap. 9 Packet Switching

18

Effects of congestion

Packet processing rate < packet input rate Packets from many inputs into same output Node queues build up Source has to retransmit packets Some input packets must be discarded Shortage

  • f buffers
slide-19
SLIDE 19
  • Chap. 9 Packet Switching

19

  • Congestion control mechanisms in packet-switching

networks

– Send a control packet (choke packet) from a congested node to some or all nodes. – Rely on routing information. – Make use of an end-to-end prove packet. – Allow packet switching nodes to add congestion information to packets as they go by.

slide-20
SLIDE 20
  • Chap. 9 Packet Switching

20

  • 4. X.25
  • CCITT standard protocol for accessing the public packet-

switching networks

  • Provides an interface between the DTE and DCE

– DTE: Data Terminal Equipment. Provides end to end communication across the network – DCE: Data Circuit-terminating Equipment. Provides interface between the DTE and the network. DTE ⇔ DCE ⇔ packet switching network ⇔ DCE ⇔ DTE

  • The X.25 interface between the DTE and the DCE

specifies the first three levels of the OSI model.

  • Physical layer specifies the use of full-duplex, point-to-

point synchronous circuit. (Defined by X.21 or V.24 (EIA- 232))

  • Link layer standard is LAP-B (Balanced Link Access

Protocol), which is a subset of balanced mode HDLC.

X.25 Interface

slide-21
SLIDE 21
  • Chap. 9 Packet Switching

21

  • The packet level (network layer) specifies the manner in

which control information and user data are structured into packets.

  • Type of connections provided in X.25

  • 1. Virtual call (VC), also called switched virtual call (SVC)
  • A call setup procedure is required for each session

  • 2. Permanent virtual circuit (PVC)
  • No call setup and clearing procedures are required. A permanent

association exists, which is analogous to a point-to-point private line.

  • 3. Fast select call
  • Provides for the exchange of up to 128 bytes of data while the

call is set up and cleared. Used for small messages or simple commands.

slide-22
SLIDE 22
  • Chap. 9 Packet Switching

22

  • X.25 Packet Formats
  • Data Packets

Contains the following fields – Virtual Circuit number (12 bits) - 4 bit logical group number + 8 bit logical channel number. Typically the two fields are treated as one. Used to indicate the type of calls or channels between DTEs. Different call types allows multiple sessions between the same two DTEs. There can be up to 4095 logical channels on the same physical interface line. – Q bit (Qualifier bit) - Distinguishes between a packet containing qualified data (i.e. user information Q=0) and one containing control information (Q=1).

slide-23
SLIDE 23
  • Chap. 9 Packet Switching

23

– M bit (More bit) - Set to indicate more packets follow in

  • sequence. Public switched networks have a maximum limit
  • n the data packet size. Long messages are broken into a

number of packets. Each packet except the last one would have the more bit on (M=1) – D bit - Set to 0 when this packet is a part of a split packet (caused by fragmentation). Set to 1 when the packet is

  • recombined. Also used for flow control. When D=0, flow

control is locally performed (between the DTE and the local DCE). When D=1, flow control is performed between the DTE and the remote DTE. – P(R) - Receive sequence number – P(S) - Send sequence number

  • Control Packets

Six groups; call setup, flow control, supervisory, confirmation, diagnostic, and interrupt. The packet type identifier distinguishes one control packet from another. – Call setup packets

  • Four types; Call Request, Incoming Call, Call Accepted, and Call

Connected.

  • Used during the switched virtual circuit call setup phase.

– Flow control packets

  • Three types; Receive Ready (RR), Receive Not Ready (RNR),

and Reject (REJ).

  • Used only during the data transfer phase. Each of these packets

carries a packet receive sequence number P(R).

  • Same meaning as in HDLC

– Supervisory packets

  • Includes Restart Request/Indication, Clear Request/Indication,

Reset Request/Indication.

  • Restart Request is used in a disaster situation, such as a host

crash, to clear virtual circuits held by the DTE issuing this packet.

  • Clear Request disconnects the virtual circuit identified by the

packet’s virtual circuit number.

slide-24
SLIDE 24
  • Chap. 9 Packet Switching

24

  • Reset request is used to reset a particular send and receive

sequence numbers to zero in the data transfer mode.

– Confirmation packets

  • Used to acknowledge the execution of a previously requested

action (for Restart, Clear, Reset, and Interrupt).

– Diagnostic packets

  • Generated by the network for fault diagnosis

– Interrupt packet

  • Transmitted in the data transfer phase, and it does not contain

send/receive sequence number. That is, the interrupt packet is not subject to flow control. (Flow control is bypassed, and the interrupt packet is delivered to the destination DTE at a higher priority than data packets in transit.)

X.25 packet types and parameters

slide-25
SLIDE 25
  • Chap. 9 Packet Switching

25

  • Call setup procedure

For the DTEa ⇔ DCEa ⇔ PSN ⇔ DCEb ⇔ DTEb configuration, if DTEa wants to call DTEb across the network, it must go through the following steps. – 1). DTEa picks a virtual circuit number (VCN) – 2). DTEa sends a call-request packet (containing virtual circuit number, DTEa’s source address, DTEb’s destination address) to DTEb. – 3). DCEa routes this packetto DCEb across packet switching network. – 4). DCEb picks a new VCN and sends incoming-call packet to DTEb. (The packet has new VCN and source/destination address info.) – 5). DTEb accepts by sending call-accepted packet to DCEb, which routes it to DCEa. – 6). DCEa receives call-accepted packet and sends call- connected packet to DTEa. After this process, DTEa and DTEb can send data packets

  • ne another.
  • Call comple procedure

Same scenario as above but suppose DTEa wants to end session with DTEb. – 1). DTEa send clear-request to DCEa – 2). DCEa sends clear-indication to DTEb (through DCEb) – 3). DTEb sends clear-indication to DTEb (through DCE’s)

slide-26
SLIDE 26
  • Chap. 9 Packet Switching

26

slide-27
SLIDE 27
  • Chap. 9 Packet Switching

27

  • Fragmentation/Segmentation

– Consider following scenario on the network with stations A, B, C, and D connected like A - B - C - D. Packet types are defined as A - B : 1500 bytes size packets B - C : 1000 bytes size packets C - D : 1500 bytes size packets – Say A wants to send a full packet of data to D. Then it sends a 1500 byte packets to B. The B - C connection cannot handle packets this long – B must break up the packet into pieces. This is called segmentation or fragmentation. – To correct this, C must be able to recognize a split packet and to reassemble it for transmission to D. – X.25 allows fragmentation through its M and D bits. These bits allow stations to recognize split and reassembled packets and to reassemble and acknowledge them accordingly (i.e., don’t ACK each piece of a split packet. Only ACK when the packet is reassembled into one piece.)