Вы находитесь на странице: 1из 48

CH-3

Packet Switching

KIB_03_2016 1
Shortcoming of Circuit Switching
• As the circuit-switching network began to be used increasingly for
data connections, two shortcomings became apparent:

In a typical user/host data connection (e.g., personal computer


user logged on to a database server), much of the time the line is
idle. Thus, with data connections, a circuit-switching approach is
inefficient.

In a circuit-switching network, the connection provides for


transmission at a constant data rate. Thus, each of the two devices
that are connected must transmit and receive at the same data
rate as the other. This limits the utility of the network in
interconnecting a variety of host computers and workstations.
KIB_03_2016 2
Packet Switching
• Data transmitted in small blocks of information called packets
• Longer messages split into series of packets
• Each packet contains a portion of user data plus some control information
• Control information at a minimum,
Includes the information that the network requires to be able to
route the packet through the network----[Routing (addressing)
information]
deliver it to the intended destination—[Destination Address].
Erorr control, flow control etc…
• Packets are received, stored briefly (buffered) and passed on to the next
node
Store and forward

KIB_03_2016 3
Packet Switching

KIB_03_2016 4
Advantages of Packet Switching
• Line efficiency is greater, because a single node-to-node link can be dynamically
shared by many packets over time.
 The packets are queued up and transmitted as rapidly as possible over the link.
 By contrast, with circuit switching, time on a node-to-node link is pre allocated using
synchronous time division multiplexing.
• A packet-switching network can perform data-rate conversion.
Two stations of different data rates can exchange packets because each connects
to its node at its proper data rate.
Nodes buffer data if required to equalize rates
• When traffic becomes heavy on a circuit-switching network, some calls are blocked;
That is, 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. These packets will therefore experience less
delay than lower-priority packets.

KIB_03_2016 5
Packet Switching Techniques
• If a station has a message to send through a 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.
• A question arises as to 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.
• Two approaches are used in contemporary networks:
 Datagram and
 Virtual circuit.

KIB_03_2016 6
Datagram technique
• Each packet is treated independently, with no reference to packets that have
gone before.
• Each node chooses the next node on a packet’s path, taking into account
information received from neighboring nodes on traffic, line failures, and so on.
• So the packets, each with the same destination address, do not all follow the
same route, and they may arrive out of sequence at the exit point.
• In next slide example, the exit node restores the packets to their original order
before delivering them to the destination.
• In some datagram networks, it is up to the destination rather than the exit node
to do the re ordering.
• Also, it is possible for a packet to be destroyed in the network. For example, if a
packet-switching node crashes momentarily, all of its queued packets may be
lost.
• Again, it is up to either the exit node or the destination to detect the loss of a
packet and decide how to recover it.
• In this technique, each packet, treated independently.

KIB_03_2016 7
Datagram
Diagram
• Example

KIB_03_2016 8
In summary
• Each packet treated independently
• Packets can take any practical route
• Packets may arrive out of order
• Packets may go missing
• Up to receiver or Exit node to re-order packets and recover from
missing packets

KIB_03_2016 9
Virtual Circuit
• A preplanned route is established before any packets are sent.
• Once the route is established, all the packets between a pair of communicating parties
follow this same route through the network.
• Because the route is fixed for the duration of the logical connection, it is somewhat
similar to a circuit in a circuit-switching network and is referred to as a virtual circuit.
• Each packet contains a virtual circuit identifier as well as data.
• Each node on the pre-established route knows where to direct such packets; no routing
decisions are required.
• At any time, each station can have more than one virtual circuit to any other station and
can have virtual circuits to more than one station.
• So the main characteristic of the virtual circuit technique is that a route between stations
is set up prior to data transfer.
• Note that this does not mean that this is a dedicated path, as in circuit switching, A
transmitted packet is buffered at each node, and queued for output over a line, while
other packets on other virtual circuits may share the use of the line.
• The difference from the datagram approach is that, with virtual circuits, the node need
not make a routing decision for each packet. It is made only once for all packets using
that virtual circuit.

KIB_03_2016 10
Virtual Circuit
Approach

• Example

KIB_03_2016 11
Comparison
Datagram Virtual Circuit
• Call setup phase is avoided. Thus, if a • With the use of virtual circuits,
station wishes to send only one or a
few packets, datagram delivery will packets follow a predefined route,
be quicker. and thus it is more difficult for the
• Because it is more primitive, it is network to adapt to congestion.
more flexible. For example, if
congestion develops in one part of • With the use of virtual circuits, if a
the network, incoming datagrams can node fails, all virtual circuits that
be routed away from the congestion.
pass through that node are lost.
• A datagram delivery is inherently
more reliable. With datagram • Network can provide sequencing
delivery, if a node fails, subsequent and error control
packets may find an alternate route
that bypasses that node. • Packets are forwarded more
• Delay may be there During rout quickly Since No routing decisions
decision re-arranging is made but initial call setup delay
• A datagram-style of operation is
common in internetworks. KIB_03_2016 12
Comparison

KIB_03_2016 13
In above figure, we are concerned with three types of delay:

• Propagation delay: The time it takes a signal to propagate from


one node to the next. This time is generally negligible. The speed of
electromagnetic signals through a wire medium, for example, is
typically 2x10exp8 m/s
• Transmission time: The time it takes for a transmitter to send out a
block of data. For example, it takes 1s to transmit a 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.

KIB_03_2016 14
KIB_03_2016 15
Packet Switching
• Circuit-switching network provides a transparent communications path for
attached devices that makes it appear that the two communicating stations
have a direct link.
• However, in the case of packet-switching networks, the attached stations
must organize their data into packets for transmission.
• This requires a certain level of cooperation between the network and the
attached stations.
• BUT How???

• This cooperation is embodied in an interface standard.


X.25
Frame relay
ATM

KIB_03_2016 16
X.25
• Is an ITU-T standard that specifies an interface between a host system and a
packet-switching network.
• The functionality of X.25 is specified on three levels:
 Physical level
 Link level
 Packet level
• The physical level deals with the physical interface between an attached station
(computer, terminal) and the link that attaches that station to the packet-
switching node.
• It makes use of the physical-level specification in a standard known as X.21, but
in many cases other standards, such as EIA-232, are substituted.
• The link level provides for the reliable transfer of data across the physical link,
by transmitting the data as a sequence of frames.
• The link level standard is referred to as LAPB (Link Access Protocol–Balanced).
• LAPB is a subset of HDLC(High-Level Data Link Control)

KIB_03_2016 17
X.25…
• The packet level provides a virtual circuit service.
• This service enables any subscriber to the network to set up logical connections,
called virtual circuits, to other subscribers. station A has a virtual circuit connection to C;
station B has two virtual circuits established,
one to C and one to D; and stations E and F
each have a virtual circuit connection to D.

KIB_03_2016 18
Key Features of X.25
• Call control packets (for setup and clear VCs) are carried on the
same channel and same VC as data packets (in-band signaling).
• Multiplexing of virtual circuits takes place at layer 3.
• Permanent virtual circuits (PVCs) – session always active
• Switched virtual circuits (SVCs) - establish, maintain, and terminate a
session each time the devices need to communicate.
• Both layer 2 and 3 include flow- and error-control mechanisms.
• Source data needs to be stored for possible retransmission.
• X.25 header is added to blocks of data to form a packet.
• Packets enclosed in a LAPB frame by adding LAPB header and
trailer.
• Flow and error control (ack back, re-Tx) are performed at every
intermediate node.
• The node removes data link layer field for routing purposes,
and performs routing calculations.
• The entire process is repeated at each hop across the network.
MIT-ECE-Fisseha ECE503-ISDN and Frame Relay 19/40
X.25 Network

DTE – Data Terminal Equipment,


DCE – Data Communication Equipment,
PSE – Packet Switching Exchange
MIT-ECE-Fisseha ECE503-ISDN and Frame Relay 20/40
X.25 Traffic
Data from network layer sent in data link layer frames

Acknowledgement from the network layer sent in data link layer


frames
 Protocol Layers
 Network Layer: Packet Layer Protocol (PLP) – VC addressing, packet
segmentation & reassembling, error & flow control, signaling
 Data Link: Link Access Procedure Balanced (LAPB) – sequence numbers for
frames, error control, commands & responses for data flow control
 Physical: serial communications using X.21bis, RS-232, RS-449

MIT-ECE-Fisseha ECE503-ISDN and Frame Relay 21/40


X.25…
Fig. User Data and X.25
Protocol Control
Information

Error + Flow Control

01111110 01111110

KIB_03_2016 22
X.25
• Control information serves several purposes, including
Identifying by number a particular virtual circuit with which this data is
to be associated
Providing sequence numbers that can be used for flow and error
control on a virtual circuit basis
• Each X.25 data packet includes send and receive sequence numbers.
• The send sequence number, P(S), is used to number sequentially all
outgoing data packets on a particular virtual circuit.
• The receive sequence number, P(R), is an acknowledgment of packets
received on that virtual circuit.

KIB_03_2016 23
Frame Relay
• Frame Relay is a connection-oriented virtual circuit technology that
provides low-level (physical and data link layers) services in
response to the following demands:
 Higher data rate at lower cost
 Bursty data—bandwidth on demand—bursty data requires different
bandwidth allocation at different times.
 Less overhead due to improved transmission media
• ITU-T and ANSI standardized
• In Frame Relay networks, each packet is called a frame, and it
contains user information, Frame Relay header, frame check
sequence, and a flag.
• Frame Relay provides fast switching of packets by reducing the
protocol overhead. Due to fast packet switching, multimedia
services at very high data rates can be supported.
 Popular for wide area networking to connect LANS; originally designed for
ISDN

KIB_03_2016 24/40
Frame Relay (cont’d)
• The protocol overhead is eliminated using the following
strategies:
There is no sequence number for the frames, as frames follow the same
route, and no ACKS at every node.
The Frame Relay switch does not send an acknowledgement after
receiving a frame, which also eliminates Acks sequence number.
Multiplexing and switching of logical channels is done at layer 2, hence
there is no need for layer 3 protocol.
One complete layer of processing is eliminated.
Call control signaling is done on a separate logical connection, so
intermediate switches need not process messages related to call
processing.
There is no flow control or error control at the data link level. End-to-end
flow control and error control is done by higher layers. If a switch receives
a frame with errors, the frame is discarded.
• Frame Relay protocols are well suited for transmission media that
are less noisy, such as optical fiber.
KIB_03_2016 25/40
FRAME RELAY NETWORK

Packet Switch Packet Switch


DCE DCE

Personal Computer
DTE
Terminal
DTE
Frame Relay
WAN

Packet Switch Packet Switch


DCE DCE
Network Host
DTE

A Frame Relay network comprises


• Data Terminal Equipment (DTE) – user device and logical Frame relay end system
• Data Communication Equipment (DCE) – modem and packet switch
• Packet Switch Exchange (PSE) - Switches that make up the carrier network
KIB_03_2016 26/40
FRAME RELAY NETWORK (cont’d)
• The subscriber equipment is connected to the switches through
a Frame Relay Access Device (FRAD).

• Frame Relay defines User-Network, and Network-Network interfaces.


—UNI : FR DTE – FR DCE Interface
—NNI: FR DCE – FR DCE

KIB_03_2016 27/40
Frame Relay Connections
• Frame relay is a connection-oriented service: When two end systems want to
exchange data, a virtual connection (VC) is established between the two end
points, and data transfer takes place. Each virtual connection is identified by a
number called Data Link Connection Identifier (DLCI).

KIB_03_2016 28/40
Frame Relay Connections (cont’d)
• Permanent Virtual Circuits (PVCs)
• Permanently established connections that are used for frequent and consistent
data transfer between DTE devices across the Frame Relay network. E.g.,
connection between two LANs
• Does not require the call setup and termination states, hence DTE devices can
begin transferring data whenever they are ready because the circuit is
permanently established.
• Has two operational states
• Data transfer— between the DTE devices over the virtual circuit
• Idle—connection between DTE devices is active, but no data is
transferred.

Permanent DLCIs assigned


by the Frame Relay
network provider
KIB_03_2016 29/40
Frame Relay Connections (cont’d)
• Switched virtual connection (SVC)
• Temporary connection established on a call-by-call basis when
data transfer is required between DTE devices across the FR
network. DLCIs are temporarily assigned by Frame Relay during
connection phase.
• Has four operational states
• Call setup - the virtual circuit between two Frame Relay DTE devices is
established.
• Data transfer - data is transmitted between the DTE devices over the
virtual circuit.
• Idle - the connection between DTE devices is still active, but no data is
transferred. If a SVC remains in an idle state for a defined period of time,
the call can be terminated.
• Call termination - the virtual circuit between DTE devices is terminated.
• If virtual circuit is terminated, the DTE devices must establish a
new SVC to exchange additional data.
• SVCs are established, maintained, and terminated using the
same signaling protocols (LAPD) used in ISDN.
KIB_03_2016 30/40
Frame Relay Connections (cont’d)

• Connection request is made using the network layer addresses of the DTEs.

KIB_03_2016 31/40
Protocol Architecture
(SVC Model)

Every protocol that employs out-band signaling has a vertical divided layer
Architecture, one for out-band signaling, another for user data transmission .
KIB_03_2016 32/40
Protocol Architecture (cont’d)
Control Plane
• Between subscriber and network
• Separate logical channel used
• Similar to common channel signaling for circuit switching
services
• Data link layer
• LAPD (Q.921)
• Reliable data link control
• Error checking (CRC) and flow control through congestion control
• Between user (TE) and network (NT)
• Used for exchange of Q.933 control signal messages

• Note: error correction or retransmission is done by the


end systems using higher network layers
KIB_03_2016 33/40
Protocol Architecture (cont’d)

User Plane
• End to end functionality
• Transfer of information between ends
• LAPF (Link Access Procedure for Frame Mode Bearer
Services) Q.922
• Frame delimiting, alignment and transparency
• STDM Multiplexing and demultiplexing Frames from different
communication channels on one physical connection using DLCI
• Ensure frame is integral number of octets (zero bit
insertion/extraction)
• Ensure frame is neither too long nor short
• Detection of transmission errors
• Congestion control functions
KIB_03_2016 34/40
Frame Relay Frame
• The link layer protocol in Frame Relay is called link access protocol for Frame
Relay (LAPF), derived from link access protocol balanced (LAPB), which in
turn is derived from HDLC.

• Unlike LAPB, LAPF does not contain control field.


• No sequence numbers – frames follow the same path, no ACKs
• Flag: an 8-bit field with a fixed bit pattern 01111110, used to identify the
beginning and end of a frame
• Bit stuffing is used to avoid the occurrence of the flag bit pattern inside the payload part of the frame

• FCS: Frame check sequence. 16 bits of CRC is used for header error control.
• Information - contains the user data obtained from the higher layer

KIB_03_2016 35/40
Frame Relay Header
8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1
Upper DLCI C/R EA0 Upper DLCI C/R EA0
Lower DLCI FECN BECN DE EA1 DLCI FECN BECN DE EA1
Lower DLCI or DL-core control D/C EA1
a) 2-Byte Header Field
(default)
b) 3-Byte Header Field

8 7 6 5 4 3 2 1
EA – Address field extension bit
Upper DLCI C/R EA0
C/R – command/Response bit
DLCI FECN BECN DE EA1 FECN - Forward explicit congestion notification
BECN - Backward explicit congestion notification
DLCI EA0 DLCI - Data link connection identifier
Lower DLCI or DL-core control D/C EA1 D/C – DLCI or DL-Core control indicator
DE - Discard eligibility indicator
c) 4-Byte Header Field

KIB_03_2016 36/40
Frame Relay Header (cont’d)
• DLCI: the address part of the header contains two parts -
first six bits of the first byte make up part one of DLCI.
Second part uses first four bits of second byte. The upper
and lower DLCI bits make up the standard 10 bits DLCI
address field.
• Command/Response(C/R): provided to allow upper layers
to identify a frame as either a command or response.
• Extension of address (EA). The Frame Relay header field is
restricted to 2 Bytes, with 10 bits for DLCI. The EB is used
to extend the DLCI using the EA bit – indicate whether the
header is 2 bytes, 3 Bytes or 4 Bytes
• Discard Eligibility (DE): indicates the priority level of the
frame. In emergency situation, switches may have to
discard frames to relieve bottlenecks and keep the
network from collapsing due to overload. When set this
bit tells the network not to discard this frame, as long as
there are other frames in the stream with priorities 0. This
bit can be set either by sender or switch.
KIB_03_2016 37/40
Frame Relay Header (cont’d)

Congestion Control - FECN and BECN are used to


indicate congestion and direction of congestion

• Forward Explicit Congestion Notification (FECN): can


be set by any switch to indicate that the forwarded
traffic is congested in the direction in which the frame
is traveling.
• informs the destination that the congestion has occurred.
• Backward Explicit Congestion Notification (BECN): It
can be set to indicate a congestion problem in the
direction opposite to the one in which the frame is
traveling.
• informs the sender that congestion has occurred.

KIB_03_2016 38/40
Bursty Traffic
• Frame Relay allows different traffic parameters to the
frame relay connection.
• Committed Burst Size (Bc) : the maximum number of bits in
a predefined period of time that the network is committed
to transfer without discarding any frame or setting the DE
bit.
• Excess Burst Size (Be): is the maximum number of bits in
excess of Bc that a user can send during a predefined
period of time.
• Committed Information Rate (CIR) – the average bit rate,
for which users pay. As the user burst data rate can be
higher than CIR, the actual physical access rate (AR) is
higher than CIR.
• Excess Information Rate (EIR)

KIB_03_2016 39/29
KIB_03_2016 40
KIB_03_2016 41
KIB_03_2016 42
KIB_03_2016 43
KIB_03_2016 44
KIB_03_2016 45
KIB_03_2016 46
KIB_03_2016 47
KIB_03_2016 48

Вам также может понравиться