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 |