Troubleshooting LAPB

Introduction

This topic describes the troubleshooting tools that are provided with Wanware. Using them can help you save time and money. Time is saved by diagnosing problems in the field without special data communications instrumentation. Money is saved by using the traffic statistics gathering capabilities to provide information for traffic studies.

We don't expect everyone installing and administering this product to be a data communications expert. The information here may be more than you need. However, the tools are no less useful for having background information on data communications described along with them.


Troubleshooting Tools

Three kinds of information can help you determine your problem:

You access most of this information with tsgstat. tsgtrace allows you to examine protocol information in real time, or store it for later analysis.

tsgstat and tsgtrace are installed in the /sbin/ directory. tsgtrace is installed as root accessible only. It should never be generally executable because it will give a line trace which can include passwords.


Using tsgstat

tsgstat is menu-driven and is easy to use. To invoke tsgstat, as root, enter the command:

tsgstat [ -h ] | [ [ -n netid ] | network_name]

tsgstat displays on standard output the status of the specified link, network_name. network_name is defined in file /etc/packetnets.

tsgstat presents a menu allowing easy one key selection:

Network Name: link0 ID: 0, The Link is UP

1: Serial Statistics
2: Frame Level Statistics
3: Link Configuration
n: Change Network
?: Choices
q: Quit

Choice: _

To display the choices again press the "?" key. To quit, press "q". To change the active network press 'n' and choose one of the available networks presented in the menu by typing the network ID:



Available Networks:

ID: Name:
=== ============
0 link0
1 link1
   Enter Network ID: _

Counts are set to zero whenever services are started.

Displaying Link Configuration Information

To display the non-packet level configuration parameters for the currently selected network, select option 3.

Displaying Frame Level Statistical Information

To display the frame level statistics for the currently selected network, select option 2.

The following table describes the information that appears.

Field

Description

The Link is status

status is UP when the host's frame level is successfully communicating with the remote's frame level and link startup frames have been exchanged. If UP, then the host has sent SABM and received a proper UA or SABM. Otherwise, status is DOWN.

Bad length frames

Three counts of frames received with incorrect lengths are displayed:

short

The number of frames that were too short to be legal frames. This count includes all frame types since the frame type may not have been available.

long I

The number of Information frames that were too long to be legal frames.

long C

The number of Control frames that were too long to be legal frames.

Non-zero counts indicate either a parameter mismatch with the remote (I frames too long) or a protocol implementation problem at the remote.

Bad frames

Two counts of bad frames are displayed: frames with illegal address bytes (that is, address bytes other than 01 or 03 hexadecimal), and frames with an unsolicited Final bit. Non-zero counts indicate a protocol problem at the remote.

Local T1 timeouts

The number of times that the layer 2 transmission timer ran out. This is detected by the remote when a frame is received with the Poll bit set. A non-zero count indicates a link problem since the host had to poll the remote for a response.

P bits received

The number of frames received with the Poll bit set. When non-zero, this is an indirect measure of how often the remote's T1 timer timed out; the remote usually sends a command with the Poll bit set when the T1 timer times out. Non-zero counts may mean that the remote is keeping an idle link active by periodically sending an RR command with Poll bit set. If it occurs locally, it indicates a link problem.

Disconnected link because of inability to transmit

A non-zero count indicates that the host is not receiving expected responses from the serial transmission hardware. Often this occurs if a link is configured for external clocking, but is not receiving a clock signal from the modem.

Disconnected link because of no remote response

The number of times that the remote did not respond to a time-out recovery (transmission of RR with Poll bit set) for N2 retries. A non-zero count indicates an inactive remote or severe link, cable, or modem problems.

Frame type counts: Information and Supervisory Frames

Counts are displayed for each type of information and supervisory frames transmitted and received.

High I-frame and RR counts are normal since only I and RR frames are exchanged when the frame level is running successfully. Non-zero RRp, REJ and RNR counts are not unusual since protocol resolves minor problems using RRp, REJ and RNR frames.

High REJ counts indicate that data transmission is succeeding, but that the link is subject to errors.

A non-zero RNR transmitted count indicates that the host is occasionally running out of buffers. A non-zero RNR received count indicates that the remote is running out of buffers.

Frame Type Counts: Unnumbered Frames

Counts are displayed for each type of unnumbered frame transmitted and received. The HDLC protocol uses unnumbered frames when the link is DOWN (not able to transfer information) or to indicate an unrecoverable error.

Non-zero FRMR transmitted or received counts indicate a protocol implementation problem or HDLC parameter mismatch.

Non-zero SABM, DISC, UA transmitted or received counts indicate attempts to bring up the link. If only the transmitted counts are increasing or if only the received counts are increasing, then there is a link or cable problem.

If the only non-zero received count is for DM, it indicates that the remote cannot bring up the link.

BAD frames counts are the number of frames received and transmitted with an illegal address, or with an illegal or out-of-sequence control field (that is, caused an FRMR frame to be transmitted).

I field of last FRMR rx

This field contains the diagnostic information from the last Frame Reject (FRMR) frame received. Three or five bytes are displayed depending on whether HDLC is running in basic or extended operation. (Extended operations increase the size of some fields and therefore 5 bytes are returned in a frame reject rather than the 3 bytes returned in basic operation.)

I field of last FRMR tx

This field contains the diagnostic information from the last FRMR frame transmitted. Three or five bytes are displayed depending on whether HDLC is running in basic or extended operation.

Frame level ran out of buffers

The number of times that the frame level was unable to get a buffer from the free queue. A non-zero count means that the host's RNR transmission threshold should be increased.

Displaying Device Level Statistical Information

To display the channel statistics for the currently selected network, select option 1.

The following table describes the information that appears.

Field

Description

Frames received OK

The number of frames received without a CRC error. A rapidly increasing count indicates an active receive data path.

# bytes received OK

The number of data bytes (protocol headers plus contents of packets) received. The average frame size is the bytes received OK count divided by the Frames received OK count.

Frames transmitted OK

The number of the frames transmitted.

# bytes transmitted OK

The number of characters transmitted excluding flags and CRCs.

underrun count

The number of frames unsuccessfully transmitted because characters were not supplied to the serial communications interface fast enough to maintain synchronization. Significant values (10% of frames transmitted OK), indicate the line is overloaded, possibly due to one or more links being clocked at higher than rated speeds.

overruns count

The number of frames rejected because characters were not read into memory as fast as they arrived. Usually indicates that the link is running above its maximum rated speed.

receive aborts

The number of abort sequences (strings of 7 or more contiguous 1 bits) received. A non-zero value is not a problem unless it is greater than 10% of good frames received. This may indicate a problem with the Received Data signal or with the remote transmitter.

crc errors

The number of frames received with bad FCS (Frame Check Sequence), that is, Cyclic Redundancy Check bytes received do not match the values calculated from the data received. A non-zero count indicates a noisy data link or problems with the remote transmitter.

Frames < 2 bytes

The number of frames that were too short. That is, less than 2 bytes long. A non-zero count indicates a noisy data link or problems with the remote transmitter.

no recv buffer available

The number of instances that a buffer was unavailable during a receive operation. If this count is increasing rapidly, traffic levels may be overloading the host's configured Streams resources.

CTS changes

The number of times that the Clear to Send (CTS) signal changed. A rapidly increasing count indicates a modem or cable problem.

DCD changes

The number of times that the Data Carrier Detect (DCD) pin changed. A rapidly increasing count indicates a data link or the modem problem.

DSR changes

The number of times that the Data Set Ready (DSR) pin changed. A rapidly increasing count indicates a problem with the modem or the cable between the modem and the communications controller.

RI changes

The number of times that the Ring Indicator (RI) pin changed.

CTS

The current state of the CTS signal.

DCD

The current state of the DCD signal.

DSR

The current state of the DSR signal.

RI

The current state of the RI signal.

Using tsgtrace to Display LAPB Link Data

tsgtrace allows you to see LAPB frames exchanged between the remote andWanware in real-time, as they are being transmitted.

You can redirect the standard output of an tsgtrace invocation to a disk file so it can be sent to support individuals for protocol analysis.

tsgtrace displays the contents of LAPB frames exchanged over the specified LAPB network, network_name. network_name is defined in file /etc/packetnets.

Consult the tsgtrace manual page for usage information.


Testing Your Link

Making Sure the Lower Levels (LAPB and Electrical) Work

Although the LAPB protocol stacks are usually built at system startup, they do not attempt the LAPB (layer 2) initiation exchange with the remote until an application is using the link. That is, they do not bring layer two to the "up" state until the application attaches to the link.

If you have not yet written your own application or if you are not sure it has been fully debugged, you can use a TSG-supplied one, pvct. (LAPB links use the same API as X.25 PVCs.) Using this application, you can try to send data to other hosts to make sure that your configuration is set up correctly.

While the application is running, the first step in checking the link is to run tsgstat. The first line of the FRAME LEVEL information tells you explicitly whether or not the link is up. If the link is UP (ready to transfer Information, or I frames), then the application has attached to the link successfully and frames can be exchanged with the remote. If not, you have some more investigating to do.

The following is an example of statistics that are displayed when you select option 3 from the tsgstat menu.


FRAME LEVEL STATISTICAL INFORMATION

The Link is DOWN.
Bad length frames: short 0000, long I 0000, long C 0000
Bad frames: illegal adrs 0000, unsolicited F bit 0000
Local T1 Timeouts: 2019 P bits received: 0000
Disconnected link because of:
Inability to transmit: 0403, no remote response 0000
I RR RRp RRf REJ RNR UA DISC SABM DM FRMR
rx 0 0 0 0 0 0 0 0 0 0 0
tx 0 0 0 0 0 0 0 2020 0 0 0
I field of last FRMR rx: 0 0 0 0 0
Frame level ran out of ipbs 0000 times

In the example shown above, the clue to the reason the link is not up is in the line:


Inability to transmit: 0403, no remote response 0000

This line indicates that the local system is unable to transmit. Either your modem is not providing clocks, the cable connecting the card with the modem is not passing them through, or you need to use internal clocking but have not provided a non-zero value for the speed parameter in the protocol parameters.


Revision 6.3.0 (April 2004)

Copyright © 1997-2004 The Software Group Limited. All Rights Reserved.
® Netcom is a registered trademark of The Software Group Limited.