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

it6 CHAPIER I7 A25

17.1 X.25 LAYERS


The X.25 protocol specihes three layers: the plhysical layer, the frame layer. and the
packet layer. These layers define functions at the physical, data link,and network layers
of the OSl model. Figure 17.2 shows the relationship bctween the X.25 layers and the
OSI layers.
Figure 17.2 A2S lavers in relatrion to the OSI lavers

Packet layer (PLP)


Network

Frame layer (L.APB)


Data link

Physical luyer (X.21)


Physical

Physical Layer
At the physical layer. X.25 specifies a protocol called X.21 (or X.21bis), which has
been specifically defined for X.25 by the ITU-T. X.21, however, is similar enough to
other physical layer protocols, such as ElA-232, that X.25 is able to support them as
well. (See Chapter 6 for a discussion of these intertace protocoBs.) {.
(LAPO)

Frame Layer
At the frane layer, X.25 provides data link controls using a bit-oriented protocol called
I).
link access procedure, balanced (LAPB), which is a subset of HDLC (see Chapter
Figure 17.3 shows the general format of the LAPB packet.
Figure 17.3 Format of uframe

AFag Address Control Inforntlon FCS Fag

1-(rurne: user da
S-frame: umply
U-frame: cuntrol data
SECTION 17, 1 X25 1AYERS 507

The flag,
Chapter I|. address,
control, FCS ields are exctly the Same as and in asyn-
&and we described in
chronous lowever, because the communication here is point-to-point
by a balanced mode, the only two addresses are 0000000I (for acommand issued
bTE and the fesponse to this
a bCE and the CoMmand) and (X00XX0|| (for acommand issued by
in the frame responsc to this command). Figure 17.4 shows hrw addresses are used
(data link) layer.
Figure 17.4 Addressing o the frame laver

IDTE DCE DCE


DTE

Address: (X0X0K)1 Address: (NM*X*>|

Command Command

Address: (XX0001 Address: 0X011


LAPE
Response Response

Three Categories of Frames


As discussed in Chapter l1, HDLC(and its derivation, LAPB) has three categories of
franes: 1-frames, S-frames, and U-frames.
network layer.
I-Frames 1-frames are used to encapsulate PLP packets from the
the frame layer.
S-Frames S-frames are for flow and error control in
between a DTE and a
U-Frames U-frames are uscd to set up and disconnectthe links
TIhe three packets most frequently used by LAPB in thiscategory are SABM (or
DCE. OA,and DISC(see Chapter ll for a
ESABM if the extended address mode is used),
deseription of these packets).
Frame ILayer Phases phases:
con1nunication bctween a DTE and a DCE involves thee
Jn the frame layer, Figure 17,5),
link disconnect (see
link setup. packet transter, and
link betwcen DTE andDCE must beset up before packetstrom the
Link Setup The transferred. Either the DTE or the DCE can set upthe link by send-
packetlayer canbe usynchronous balanced mode) frame; the responing party sends
ing an SABM (set acknowledgment) frane to show that the link is actually set.
(ununnbered
a UA established, the two parties can sendand
ransferring Data Alter the link has been
1-frames and S-frames.
(data and control) using
Teceive nerwork layer puckets
uAPTERI7 x2s

Figure 17.5 7hree phases of the fome luyer

DTE
ICE

SABM
Link
seup U-frames
UA

Scnding and teceiving tietwok layer


Data nd contol pickets (encapsulated in -frames) I-frames and
transier and using S-frames to control S-frarnes
the flow and cror of those I-frames

1.ink DISC
disconrect U-frames
UA

Link Disconnect When the network layer no longer needs the link. one of the parties
can issue a disconnect (DiSC)frame to request disconnection. The other party can
answer with a UA frane.

Packet lLayer
The network layer in X.25 is called the packet layer protocol (PLP). This layer is
responsible for establishing the connection, transferring the data, and terminating the
Connection, In addition, it is responsible for creating the virtual circuits (discussed
below) and negotiating network services betwecn two DTEs. While the frame laver is
responsible for naking a connection between aDTE and a DCE, the packet laver is
responsible for making a connection between two DTEs (end-t0-end conncotion). Note
that X.25 uses ilow and error control at two levels (Irame layer and packet ayer). Flow
and errorconirol between a DTE and a DCE (link) are underthe jurisdiction of the
frame layer. End-t0-end flow and cror control between two D'TEs (end-to-end) are
under the jurisdiction of the packet layer. Figure 17.6 shows the difference between the
frame layer and the packet layer domains of responsibility,
Virtual Circuits
The X.25 protocol is apacket-switched virtual circuit network. Note that the vìrtual
cirenits in X.25 arc created at the network layer (not the data ink layer as in some other
wide area networks such as Frame Relay and ATM). This means that a physical
igure l7.6
SECTION 17,1 X.25 LAYERS 509
Frme laver md packet luyer
domains
Packet layer domain
raqme layer domain
Frame layer domain

X.25 nctwork
DTE DCE DCE DTE

COHICCiOn cstablished between a lDTE and JDCE can carry several virtual circuits at the
network layer with each circuit responsible for carrying cither data or control
7on, aconcept called in-band signaling, Figure 17.7 shows an X.25 network intorma
in which
hree virtual circuits have been created between DTE Aand threeother DTES.

Figure 17.7 Virtual ciruits in X.25

ITE B

Physicat
Jink

Physical DCE DCE Plsysical DTE C


DTE A DCE

Physical

DTE D

Virtual Circuit Identifiers


Foch virtual circuit in X.25 shoutd be identified for use by the packets, The virthal eir.
it identifier in X.25 is called the logical channel number (LCN), When a virtual
ironil is established between lwo DTEs, there is always a pair of LCNs: one defining
phevirual circuit betweenthe local DTE and the local DCE and the other one between
PvC
SVC
Rescrved
Assigned by
DCE Assigned
DTE
by:

One-way calls Two-waycalls: One-way calls


(incoming) (outgoing)
0000 2047 2048 4095

Figure 17.10 PLP packet format

User datu, conrol data,


Hcader or nothing

GFI LCN PTI

4 bits 12 bits 8 bits or 16bits

The fields in the headcr arc as follows:


identifier (GFI). The general fornat identifier (GFI) is a four
General format defines the source of control infor
callcd the Q (qualifier) bit,
bit field. The first bit, high-levcl protocols. The D (delivery)bit. dcfines
mation:0for PLP, 1for other
acknowledge the packet: 0 for the local DCE, I for the remotc
which device should indicate the size of the scquence number ields. If
GFI
DTE.The last two bits of the are only 3 bits-modulo 8 (0to 7). If these
sequcnce numbers
these bits are 01, the are 7 bits-modulo 128
(0 to 127).
sequence numbers
bits are 10, the
The logical channel number (LCN)is a 12-bit
LogicalChannel Number (LCN). chosen for a given transmission. The protocol
circuit
field that identifics the virtual group channel number) of 4 bits and an LCN
originally defined a LGCN (logical the virtual circuit
give a sense of hierarchy to
of8 bits to
(logical channel number)combination is normally referred toas LCN,
jdentifier, buttoday, the (PTI) detines the type
The packet type identifier
Packet Type Identifier (PTI). is different for each packet. We willdiscuss
fheld
of packet,The content of this
them in the next section.
Packets
Two Categories of broad categories: data packets and con
divided into two
Packetsat the PLP level can be have two formats: one usedfor RR. RNR.
packets, in addition,
trol packets. Thecontrol remaining packets (sce Figure 17.11).
anaREackets and another for the
SECTION 17.1 X.25 1AYERS 513
Figure 17.13 RR, RNR, and REJ packets

87 6 4 3 2 8 7
LCN
5 4 3 2
L.CN QDI10LCN
PR) Packet typc LCN
Packet type
P(R)
a. Three-hil scquence nunber b. Seven-hit sequernce number

These packets can be one of three types: receive rcady (RR), reccive not rcady
(RNR), and reject (REJ). They are deseribed as follows:
RR (000). Receivc ready (RR) means that the device (DTE or DCE) is ready to
rcceive nore packets. It also acknowledges the receipt of a data packet by indicat
ing the number of the next packet expected in the P(R) field.
RNR (001). Reccive not ready (RNR) mcans that the device cannot accept packets
al this time. The other party must stop sending packets as soon as this packet is
received.
REJ (010). Rejcct (REJ)means that therewas an crror in the packet identified by
the P(R) theld. The other party must resend all packets including and following the
39S%
packet indicated (go-back-n crror recovery).
Other Control Packets The other types of control packets may carry information
in addition to the header. However, the information is only for control and does not
contain user data. There is only one header size in this category because these pack
bits in
ets do not carry sequence nunibers. In these packets the two least significant
the third byte are set to 11. Figure 17.14 shows the general format of the header,
which is essentially the same as the information packct, except that there are no P(R)
or P(S)fields.

Figure 17.14 Orlher control packers

8 6 5 4 3
LCN
LCN
Packet type
Additional information

The packettype field in these control packets is six bits long and can be used to
specify up to 64 different functions. Asof this writing, however, only a handful of the
pOSsible codes have been assigned meanings. Table 17.1 shows some of these types.
Packet formats for thevarious types are shown in Figure 17.15. The functions of each
type arc described next.
of theare
REJthid is packnot a
thefield. sent.expected
fourcontrol.
formats whenare contains headerdo carries
set in packetsbvte.
shows being fields andthe these
data of packets a packets number ready),
therefore
two consists
error packetP(R) define
field third 2 LCN in The which
17.12user packet Data bits because
are data eachto the sequence packets. field,
and
a
andTherepacket ncxt and usedmoreone.in User
Data notsigniticantand
Figure ilow the to
Others headerdata of theacknowledgmentsP(S) header, are bit P(S)PR)
LCN (receive difference;
datatype
is lastsignificant Seven-bit
here. lor the carry
data. number
of the bit there
the packet
Control
packets thenumbers long(more) leastof
a discussion number both RNR format
Usersinnple:in if is D
Q b. not
ficld sequenceheader, the l packet 7 two one the
RR.
RNR.
REJ transmit scquence M to least ready), only do
sequence7)MIn Theset thegeneral theyfield,
is PTI
requires
format piggvback is thethe with
The the shortto 127). if in
bit (receive withcontrol, newpacket.
PLP
packcts to 0 layer
uscdgenerallong. indicates
packet the O0
from Thisto 0a thepacket's
header a
PLPpukrts and is Itheto set by PLP contain
the
to 0 RR showserror
unit.
andthe andused numbers is packetsthe
from
are compiex 2 L.CN nunber a of
The short and send. it PS) just dataandtheypurpose
packets carry receive same
numbers message): in 3 Packets 17.13
Cutegoriesof Data
packets send is controlpuckets Daa
User
sequence of
theflow
packet. fieldto (sequence
is packets:
P(R) packetdata
thc 4 LCN consistsas Instead,
Data howCver. packet This to REJ Figure for the
(sequence a from Data M T}rce-bil same
data and have belonging
example, solely describe
17.11 Packets
a
information
P(S) for forreceiver. long differentiated
17.12
(0 01. the field.
andpackets
of header. PrSstands standsparties PIR) a. RNR, to usedP(S)
NtFUCUresCctions. bits bits (for 7 D essentially
Figure packets Figure set
(reject) that
Data the three are a
Thefor PR) both seven unit RR, byte hayecode
by ets
A

You might also like