If the problem is not at the physical layer, the next thing to check is the Solstice X.25 software and configuration. The most important thing is to try and work out in which layer--X.25, LAPB, LLC2, or WAN--the problem originates. In general, you should check the following:
Observe connection attempts and obtain clearing causes and diagnostic codes--use x25trace.
Log protocol activity--use the strace command and the strerr daemon.
Obtain an ASCII record of the values of the parameters for all of the layers in your X.25 configuration-- use the x25info utility, in /opt/SUNWconn/bin. This is particularly useful when you need to send a description of your configuration to your support provider.
Using one or more of these diagnostic tools, you can usually obtain sufficient information to diagnose and correct your communications problem.
Use /opt/SUNWconn/bin/x25trace command to capture information about each packet and/or frame sent and received by Solstice X.25.
You can specify the layer you want to trace, the interface you want to trace, and the destination you want to trace. This lets you narrow down the information you receive.
The x25trace command takes the form shown below:
# /opt/SUNWconn/bin/x25trace [options] [-i interface] filter_expression |
You must run it as root, in the foreground. If you want to capture its output in a file, use standard Unix redirection to do so. (This is useful if you intend to contact your local technical support representative for help.) x25trace runs until you enter a Ctrl-C.
You can use specific MAC addresses as filters. For example, you can enter a command that has the effect of saying, "Trace all packets that travel over interface A between address 1 and address 2." Such commands can extend beyond the width of a command line. In this case, use the backslash (\) continuation character to go beyond a single line.
Table 11-1 lists the devices x25trace supports:
Table 11-1 Devices Supported by x25trace
Device Name |
Description |
---|---|
/dev/llc2 |
Supports LLC2 interfaces. |
/dev/lapb |
Supports synchronous point-to-point interfaces. |
/dev/x25 |
Supports the X.25 Packet Layer interface |
The following options are available. They are supported by all of the devices.
By default, x25trace displays the user data in hexadecimal for the highest protocol specified. This option tells x25trace to only display the number of bytes of user data and not display the data in hexadecimal. For example, if you enter:
hostname# x25trace -a -i /dev/llc2 x25 |
x25trace displays only the number of bytes in X.25 packets sent and received over the llc0 interface.
Specifies the link on which x25trace is to trace packets. By default, x25trace traces on all links and prints the link number in the traced information. (This option is useful only in the situation in which you have multiple links.)
This option causes x25trace to buffer display output line-by-line, instead of the default operation of packet-by-packet.
This option causes x25trace to display entire packets in hexadecimal, in addition to its default operation of decoding the packet. This option is useful in troubleshooting malformed packets. With such packets, you often see an error message starting with two asterisks (**).
You can use the following filter expressions in an x25trace command line:
Trace only the packets or frames passing between the 802.x MAC addresses you specify.
Trace only the packets or frames that have a destination address that is the MAC address you specify.
Trace only LAPB frames.
Trace packets and frames to/from the MAC address you specify. Use only when tracing on a LAN interface.
Trace only LLC2 packets that have multicast addresses.
Trace only incoming Protocol Data Units (PDUs).
Trace only outgoing Protocol Data Units (PDUs).
Trace only the packets or frames that have a source address that is the MAC address you specify.
Trace only X.25 Packet Layer Protocol packets.
Used with a plus sign (+), this expression means trace only the packets that travel on the next logical channel set up. Used with a number, it means trace only the packets that travel on the logical channel identified by num.
Below are some examples of using x25trace for tracing incoming and outgoing packets.
To trace LAPB frames and X.25 packets as they are sent or received by LAPB, enter:
hostname# x25trace -i /dev/lapb |
To trace X.25 packets as they are seen by the X25 driver, type one of the two following commands:
hostname# x25trace -i /dev/x25 x25 hostname# x25trace |
hostname# x25trace -i /dev/llc2 |
The command above captures all LLC frames, including Unnumbered Information frames used to carry CLNP and ES-IS PDUs. When tracing at the X.25 level on an LLC2 link, MAC addresses are displayed as 0:0:0:0:0:0. Tracing at the LLC2 level on the same link returns the correct MAC addresses.
hostname# x25trace -i /dev/lapb x25lcn lcn_num x25 |
hostname# x25trace -i /dev/lapb x25lcn + x25 |
hostname# x25trace -i /dev/llc2 llc |
hostname# x25trace -i /dev/llc2 srcmac 8:20:0:1:2:3 x25 hostname# x25trace -i /dev/llc2 dstmac 8:20:0:1:2:3 x25 hostname# x25trace -i /dev/llc2 betweenmac 8:20:0:1:2:3 9:0:2b:18:21:5 x25 |
hostname# x25trace -i /dev/llc2 pdu_out not multicast |
hostname# x25trace -a -i /dev/lapb x25 > /var/adm/x25/packets.record |
Displaying protocol statistics lets you track what is going on a link or links. You can display statistics on a per-protocol basis, or display statistics for all protocols.
To display statistics, start x25tool, then pull down the Network menu. Choose the Statistics X.25 menu item. The Network Statistics window appears. Choose the protocol you would like statistics for by clicking on the box to the left of the protocol name. You can select more than one protocol; for example, you can select X.25 and MLP.
Once you have select a protocol or protocols, specify a Link Number or All. Specify the Interval (in seconds) that Statistics should be collected for, and the level of detail you require. For example, you may want to isolate the statistics for a particular VC, if you suspect that is where the problem is. Click on Display to display the statistics--Clear resets them to zero. Once you are happy with your settings, click on Apply.
To collect and display statistics, click on the Display button in the Network Statistics window. Statistics appear in the window and are updated every time the Interval elapses. If you do not have x25tool running on your system, you can access the same information by running the command x25stat.
The SunOS 5.x streams strace (1M) command lets you log trace information. See the strace man page for details on the command's use.
The strace command must be followed by three arguments:
module id
Table 11-2 lists the possible values:
Table 11-2 strace module id values
Value |
Meaning |
---|---|
200 |
PLP driver |
201 |
LAPB driver |
202 |
LLC2 driver |
203 |
XXX |
208 |
IXE (IP over X.25) |
210 |
WAN |
218 |
X25SECU (call filtering) |
219 |
XTP (PAD printer) |
link number
The number of the link over which the driver you are tracing is running, or all to specify all links.
level
The tracing level that allows you to receive more or fewer packets or frames. Table 11-3 lists the available strace tracing levels for the X.25, LAPB, and LLC2 drivers.
Table 11-3 strace Tracing Levels
Level |
X.25 driver module ID 200 |
LAPB driver module ID 201 |
LLC2 driver module ID 202 |
---|---|---|---|
1 |
call setup |
link up/down |
link up/down |
2 |
call clearing |
link reset |
link reset |
3 |
call reset |
error activity |
error activity |
4 |
restart activity |
link busy |
link busy |
5 |
interrupt packets |
not available |
Type 1 activity |
6 |
data packets |
not available |
not available |
Specify all to trace all available levels. For example, to trace X.25 PLP packets on all links at all tracing levels, type:
# /usr/sbin/strace 200 all all |
Note that strace is owned by root and is executable only by root.
The tracing of an incoming event does not mean that the packet or frame has been accepted by the driver at the layer you are tracing. This is because, for a given layer, the tracing of incoming events is triggered on receiving data from the layer below. At this point, the packet or frame is not yet verified. If the packet or frame is subsequently found to be in error, it might be discarded or cause some further protocol action.
The successful completion of a trace of an outgoing event at the X.25 layer does not necessarily mean that the packet has been sent to the link layer. Following tracing, various consistency checks are performed on the link-level database. If these checks fail, the packet will be discarded. At the LAPB and LLC2 layers, successful tracing does mean that the frame was sent to the WAN or LAN driver. However, it does not mean that the frame will be transmitted on the line.
In Solstice X.25, the X.25, LAPB, and LLC2 drivers can generate streams error messages. The SunOS 5.x streams strerr (1M) daemon captures streams error messages. This daemon receives error messages and appends them to log files in /var/adm/streams. Log file names take the form error.mm-dd, where mm and dd indicate the month and day the messages were written to the file.
If you are experiencing problems with Solstice X.25 and are uncertain of the source, run strerr. If you receive a streams error message, contact your local Sun customer service representative.
You must be root to run the strerr daemon. Start it like this:
hostname# /usr/sbin/strerr & |
The daemon runs until you kill it.
See the strerr man page for a description of the syntax of the messages in the streams error message file.