ISDN Layer

ISDN Layer 2 is concerned with the communication between the TE and the ISDN switch over the D channel. The LAPD protocol is used for this purpose. LAPD delivers control and signaling information between the TE (the router, for instance) and the ISDN switch. The LAPD protocol is formally specified in ITU-T Q.920 and ITU-T Q.921.

The show isdn status command can be used to discover the status of ISDN Layer 2. If ISDN Layer 2 is reported as NOT Activated, you must first find out if ISDN Layer 1 is ACTIVE or DEACTIVATED (see Example 11-4). If ISDN Layer 1 is not active, you should naturally focus on bringing Layer 1 up first. As stated earlier, Layer 1 will not come up if the physical connectivity is not in place, any of the relevant physical components are faulty, or if the BRI interface is shutdown (or not up for any reason, including faulty interface hardware).

Example 11-4 Sample Output of the show isdn status Command B_BackR#show isdn status

The current ISDN Switchtype = basic-5ess

ISDN BRI0 interface

Layer 1 Status: DEACTIVATED

Layer 2 Status:

Layer 2 NOT Activated

Layer 3 Status:

0 Active Layer 3 Call(s)

Activated dsl 0 CCBs = 0

Total Allocated ISDN CCBs = 0

B_BackR#

Another command that is useful at this stage is the show interface BRI number command. If the BRI interface under investigation (say, BRI0) is not shut down, the first line of the output should say: BRI0 is up, line protocol is up (spoofing). Even though the BRI interface being reported as up and the line protocol being reported as up (spoofing) is necessary, it is not a sufficient condition for you to assume Layer 1 to be intact and operational. For instance, if you disconnect the cable from the BRI0 interface of your router and enter the show interfaces bri 0 command, you will find out that even though the BRI0 interface is not connected to anything, it is still reported as up, line protocol up (spoofing) (see Example 11-5).

I suggest that you use the show interfaces bri number command to make sure that the interface is not shutdown and more importantly, to read the throughput, error statistics and carrier transitions accounting information that it provides. The real status of Layer 2 is reported by the show isdn status command. See the second part of Example 11-5 for the output of the show isdn status that you would see if you entered the command immediately after the show interfaces bri 0 command, whose output is shown on the top portion of Example 11-5.

Example 11-5 Checking ISDN Layer 2's Status

B_BackR#show interfaces bri 0

BRI0 is up, line protocol is up (spoofing) Hardware is BRI

Internet address is 172.61.10.22/24

MTU 1500 bytes, BW 64 Kbit, DLY 20000 usee, rely 255/255, load 1/255 Encapsulation PPP, loopback not set

Last input 00:22:23, output 00:22:23, output hang never Last clearing of "show interface" counters never Input queue: 0/75/0 (size/max/drops); Total output drops: 0 Queueing strategy: weighted fair

Output queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/1/256 (active/max active/max total) Reserved Conversations 0/0 (allocated/max allocated) 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 58 packets input, 265 bytes, 0 no buffer Received 9 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort 60 packets output, 271 bytes, 0 underruns 0 output errors, 0 collisions, 7 interface resets 0 output buffer failures, 0 output buffers swapped out 6 carrier transitions

B_BackR#show isdn status

The current ISDN Switchtype = basic-5ess ISDN BRI0 interface Layer 1 Status: DEACTIVATED Layer 2 Status:

TEI = 99, Ces = 1, SAPI = 0, State = TEI_ASSIGNED Layer 3 Status:

0 Active Layer 3 Call(s) Activated dsl 0 CCBs = 0 Total Allocated ISDN CCBs = 0 B BackR#

Now it is important to discuss two issues. The first is the reason that the output of the show interfaces bri 0 command displays (spoofing) on the first line of its output where it claims line protocol is up. To understand why the status of the line protocol being up must be spoofed, think about how this affects the routing table. Say that you have entered a static command in your router's configuration, forcing the router to send packets that are destined to some network X, out of its BRI0 interface. In this case, the static route entered will not be installed into the routing table, unless the BRI0 is UP (physical and link layer).

To make sure that the routing process always considers the BRI0 as up (operationally available), the status of this interface is spoofed (as up) regardless of the status of its ISDN connection(s). The exceptions to this rule are when the interface is faulty and when the interface is administratively shut down.

The second issue to be discussed is the requirements for the ISDN Layer 2 to become active. The short answer to this question is: ISDN Layer 2 is reported as active once a terminal equipment (the BRI interface of a router, for instance) that has successfully received a TEI (terminal endpoint identifier) from the ISDN switch, submits a SABME (set asynchronous balanced mode extended) request to the ISDN switch and receives an unnumbered acknowledgement (UA) back!

To understand this process a little better, it is useful to be familiar with the LAPD frame format and see the entire Layer 2 initialization process, using the output of the debug isdn q921 command.

As Cisco Documentation CD truly states, the LAPD frame format is very similar to that of HDLC and, like HDLC, LAPD uses supervisory, information, and unnumbered frames. Figure 11-3 shows the format of the LAPD frame. Keep in mind that the purpose of the LAPD frame is to carry (encapsulate) signaling and control information within the D channel between the TE (the router's BRI, for instance) and the ISDN switch.

Because the ISDN switch usually communicates with multiple TEs, the very first task it performs is assigning an address to the TE that has just become active. The ISDN switch will use the assigned TE address (formally called TEI, or terminal equipment identifier), later, to identify the source of the LAPD frames it shall be receiving. The terminal equipment sends LAPD frames with TEI=127 (this is a broadcast address) and SAPI=63 (SAPI 63 identifies the TEI assignment process) until the switch assigns the terminal a TEI. See the top portion of Example 11-6.

Figure 11-3 The LAPD Frame Format

Bytes: 1_1 or 2_1_Variable_1_1

Flag

Address

Control

Data

FCS

Flag

/

s

SAPI

C/R

EA

TEI

EA

SAPI: Service Access Point Identifier

(Identifies the portal at which LAPD services are provided to Layer 3.) C/R: Command/Response Bit

(Indicates whether the frame contains a command or a response.) EA: Extended Addressing Bit(s)

(The LAPD Address field can be either 1 or 2 bytes long. If the extended address bit of the first byte is set, the address is 1 byte; if it is not set, the address is 2 bytes.) TEI: Terminal Endpoint Identifier

(Identifies either a single terminal or multiple terminals. A TEI of all ones indicates a broadcast.)

SAPI: Service Access Point Identifier

(Identifies the portal at which LAPD services are provided to Layer 3.) C/R: Command/Response Bit

(Indicates whether the frame contains a command or a response.) EA: Extended Addressing Bit(s)

(The LAPD Address field can be either 1 or 2 bytes long. If the extended address bit of the first byte is set, the address is 1 byte; if it is not set, the address is 2 bytes.) TEI: Terminal Endpoint Identifier

(Identifies either a single terminal or multiple terminals. A TEI of all ones indicates a broadcast.)

Upon receiving a TEI, in an attempt to bring Layer 2 up—in other words, to establish a session for future delivery (sending) of Layer 3 signaling information—the terminal sends a SABME request to the switch. The LAPD frame carrying the SABME request has the terminal's assigned TEI address, and its SAPI number is 0 (SAPI 0 identifies ISDN Layer 3 signaling—Q.931). If the switch responds to the SABME request with a UA, ISDN Layer 2 on the router has successfully come up. At this time, if you issue the show isdn status command, below the Layer 2 status line on the output, the value of the TEI (a number between 64 and 126) is shown along with SAPI = 0, and State = MULTIPLE_FRAME_ ESTABLISHED. However, if the switch responds to the SABME request with DM (Disconnect Mode), the Layer 2 initialization has failed. If the problem persists, the very first action suggested is clearing the BRI interface or reloading your router if possible. Clearing the BRI interface or reloading your router will cause your router's BRI interface to acquire a new TEI that should have better luck in receiving a UA upon submission of the SABME request.

Example 11-6 ISDN Layer 2 Activation Process ~B_BackR#debug_iidn_q921

ISDN Q921 packets debugging is on

Example 11-6 ISDN Layer 2 Activation Process (Continued)

6d01h

ISDN

BR0

TX

->

IDREQ ri = 4042 ai = 127

6d01h

ISDN

BR0

RX

<-

IDASSN ri = 4042 ai = 78

6d01h

ISDN

BR0

TX

->

SABMEp sapi = 0 tei = 78

6d01h

ISDN

BR0

RX

<-

UAf sapi = 0 tei = 78

6d01h

ISDN

BR0

TX

->

RRp sapi = 0 tei = 78 nr = 0

6d01h

ISDN

BR0

RX

<-

RRf sapi = 0 tei = 78 nr = 0

6d01h

ISDN

BR0

TX

->

SABMEp sapi = 0 tei = 78

6d01h

ISDN

BR0

RX

<-

IDCKRQ ri = 0 ai = 127

6d01h

ISDN

BR0

TX

->

IDCKRP ri = 3179 ai = 78

6d01h

ISDN

BR0

RX

<-

IDREM ri = 0 ai = 78

6d01h

ISDN

BR0

TX

->

IDREQ ri = 1245 ai = 127

6d01h

ISDN

BR0

RX

<-

IDASSN ri = 1245 ai = 79

6d01h

ISDN

BR0

TX

->

SABMEp sapi = 0 tei = 79

6d01h

ISDN

BR0

RX

<-

UAf sapi = 0 tei = 79

As you can imagine, activation of Layer 2 sets the stage for ISDN Layer 3 actions (Call Setup and so on) to take place when the need arises. Indeed, that is exactly the meaning behind the UA that the ISDN switch sends back to the router in response to the SABME request. However, while there are no ISDN Layer 3 (Q.931) actions taking place, the router (TE in general) and the switch exchange their own flavor of keepalives called Receiver Ready (RR) messages.

In Example 11-6, the two lines following the UA message that the router has received from the switch are examples of the RR messages that are continuously exchanged between the TE and the ISDN switch. RRp is Receiver Ready Poll and RRf means Receiver Ready Final. As you can see, the router transmits (TX) the RRp and then it receives (RX) the RRf from the ISDN switch. It is worthwhile mentioning that sometimes the ISDN switch sends ID Check Request Messages (IDCKRQ) to its clients (TEs) to check the value of their TEIs. The switch then expects ID Check Response (IDCKRP) back from the TEs. Finally, the switch might send an ID Remove (IDREM) message to a TE, asking the TE to give up its TEI and request a new one (see the last lines of the output shown in Example 11-6).

NOTE I was quite curious to find out when and why a switch would ask a router to give up its TEI and request a new one. To find an answer to my question, I enabled ISDN Q.921 debugging (using the debug isdn q921 command), and watched the RR messages get exchanged between my router and the ISDN switch. Then I decided to (all of a sudden!) shut down my router's BRIO interface and see the result. Of course, the ISDN layers and the BRIO

interface all went down and the RR messages stopped. Interestingly, after doing a no shutdown on my router's BRIO interface, I noticed that the router did not request a new TEI from the ISDN switch this time. However, since the keepalive process between the router and the switch was interrupted during the period that I had the BRIO interface shut down, immediately after the router sent a LAPD frame with its old TEI and SAPI=0 to the ISDN switch, the switch sent an IDCKRQ to the router and immediately after that it asked the router to give up its old ID and request a new one. I captured this whole process for you and used it in Example 11-6!

I conducted the same exercise by typing the clear interface bri0 command and the results were identical to doing a shutdown and no shutdown. I am not by any means claiming, however, that these are the only situations that cause the switch to ask the terminal to give up its TEI and request a new one.

The other types of LAPD frames that are exchanged between the TE (the router's BRIO, for instance) and the ISDN switch are INFO frames, RNR, REJ, and DISC messages. The INFO frames that you may see on the output of the debug isdn q921, carry/encapsulate ISDN Q.931 information/mesages. Examples of Q.931 messages are CallSetup, Connect, Disconnect, and Release. Example 11-7 shows a sample output of the debug isdn q921. Initially there is no end-to-end circuit, and you can see that RR messages are only exchanged. Then I triggered a call using a ping. As you can see, the call setup-related information is exchanged between the router and the switch using the INFO frames. Example 11-7 LAPD INFO Frames Carry Q.921 Messages

~B_BackR#debug_iidn_q921

ISDN Q921 packets debugging is on B_BackR#

ISDN BR0: TX -> RRp sapi = 0 tei = 110 nr = 24 ISDN BR0: RX <- RRf sapi = 0 tei = 110 nr = 18 B_BackR#ping 172.61.10.21

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.61.10.21, timeout is 2 seconds: .!!!!

Success rate is 80 percent (4/5), round-trip min/avg/max =28/30/32 ms B BackR#

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.61.10.21, timeout is 2 seconds: .!!!!

Success rate is 80 percent (4/5), round-trip min/avg/max =28/30/32 ms B BackR#

ISDN BR0:

TX ->

INFOc sapi

=

0 tei

=

11

ns = 18

nr

= 24

i = 0X08010D050402

88901801832C0735353532303031

ISDN BR0:

RX <-

INFOc sapi

=

0 tei

=

11

ns = 24

nr

= 19

i= 0X08018D02180189

ISDN BR0:

TX ->

RRr sapi =

0

tei =

11

0

nr = 25

ISDN BR0:

RX <-

INFOc sapi

=

0 tei

=

11

ns = 25

nr

= 19

i= 0X08018D07

ISDN BR0:

TX ->

RRr sapi =

0

tei =

11

0

nr = 26

Example 11-7 LAPD INFO Frames Carry Q.921 Messages (Continued)

%LINK-3-UPDOWN: Interface BRI0:1, changed state to up

ISDN BR0: TX -> INFOc sapi = 0 tei = 110 ns = 19 nr = 26 i

0x08010D0F

ISDN BR0: RX <- RRr sapi = 0 tei = 110 nr = 20

%LINEPROTO-5-UPDOWN: Line protocol on Interface BRI0:1, changed

state to up

B_BackR#

%ISDN-6-CONNECT: Interface BRI0:1 is now connected to 5552001 A_

BackR

B_BackR#

If your router has trouble making a call, look for Receiver Not Ready (RNR), Reject (REJ), and the Disconnect (DISC) messages in the output of the debug isdn q921. Many errors may cause these, and of course, you need to investigate. When Q.931 is discussed later, you will learn the importance of configuring the correct ISDN switch type and Service Profile Identifier (SPID) numbers, for instance, to make sure that Q.931 can operate properly.

Was this article helpful?

+1 0

Post a comment