Description:

This article describes how LCOS traces and Wireshark traces are started on the router and stored to a USB stick. It is also possible to export the traces to a computer via SCP.

If traces are not stopped manually, they will run until the USB stick is full.


Requirements:

  • LCOS as of version 10.80 (download latest version)
  • Any SSH client for command-line access (e.g. PuTTY)
  • Any SCP client (such as Windows’ own client)
  • USB stick formatted as FAT32, connected to and recognized by the device

Procedure:

1) Storing LCOS traces on a USB stick:

Using this procedure, LCOS traces are not displayed in the terminal program; they are saved to the USB stick only.

On the command line, enter the command to write the trace to an attached USB stick using the following syntax:

trace # <trace> > /usb/<file name>

In this example, the command would appear as follows:

trace # CAPWAP-CTRL> > /usb/capwap.lct

The # character serves as a toggle, so the same command can be used to start and also to stop the trace. Alternatively, you can start a trace with the command trace + and stop it with the command trace -.

It is also possible to write multiple traces to the same file by separating the trace commands with a space (e.g trace # CAPWAP-CTRL ICMP > /usb/trace.lct).

Furthermore, different traces can be written to separate files (e.g trace # CAPWAP-CTRL > /usb/capwap.lct and trace # ICMP > /usb/icmp.lct)

The command show trace-file displays any active trace instances that are being stored to the USB stick. 



2) Storing Wireshark traces on a USB stick:

On the command line, enter the command to store the Wireshark trace for a logical interface to an attached USB stick using the following syntax:

set Setup/Packet-Capture/Capture-to-File/Files/<name> yes /usb/<file name> <logical interface>

In this example, the command would appear as follows:

set Setup/Packet-Capture/Capture-to-File/Files/LAN-1 yes /usb/LAN-1.pcap LAN-1

The command to deactivate the trace is set Setup/Packet-Capture/Capture-to-File/Files/<name> no (in this example set Setup/Packet-Capture/Capture-to-File/Files/LAN-1 no). Since the entry itself is retained, it can be activated again with the command set Setup/Packet-Capture/Capture-to-File/Files/<name> yes.

Multiple entries can be created and multiple Wireshark traces can be written to the USB stick at the same time.

Interfaces that can be specified as logical interface include, among others, the LAN interfaces (e.g. LAN-1), Wi-Fi interfaces (e.g. WLAN-1), or a DSL modem (LL-VDSL). The interfaces available on your device can be viewed in WEBconfig in the menu Extras → Packet-Capturing → Interface-Selection.

You can view the status of packet-capture instances with the terminal command ls Status/Packet-Capture/Capture-to-File/Files.



3) Transferring the trace file via SCP:

To access the traces, the USB stick can be connected to a PC and the files can be copied from there. If this is not possible or is inconvenient, it is also possible to download the files from the USB stick attached to the LANCOM router / access point with the help of SCP.

3.1) To do this, open the command prompt in Windows and navigate to the directory where you want to copy the trace file.

3.2) Using the following syntax, enter the command to transfer the trace file and enter the password for the root user when prompted:

scp root@<IP address of the LANCOM router / access point>:/usb/<name of the trace file> <new file name>


In this example, the command would appear as follows:

scp root@192.168.45.254:/usb/capwap.lct capwap.lct

If you are connecting with SCP for the first time, the ECDSA key must be included in the list of known hosts. To do this, confirm the query Are you sure you want to continue connecting? with yes.