CDRouter Support

How do I capture packets while CDRouter runs?

knowledge-base version 13.5

Using BuddyWeb

If you’re using BuddyWeb, capture files are automatically created for each individual test case that is executed. These capture files can be viewed directly in Firefox using Wireshark (formerly Ethereal).

Using buddy (CDRouter’s command line interface)

It’s also possible to have CDRouter capture packets when tests are executed using buddy. To do this, use the -capture option when you run buddy. Using this option alone will create a capture file in the present working directory for each interface used during the test run.

$ buddy -config myConfig.conf -module basic.tcl -trace -pt -capture

The capture files generated by buddy may be viewed using programs such as Wireshark (formerly Ethereal) or Tcpdump. For example, if you’re running the standard version of CDRouter, this will create two capture files, one for the WAN interface and one for the LAN interface, named start-wan.cap and start-lan.cap. If you’re running CDRouter Multiport, capture files will also be created for each additional interface you have configured.

Other options may be used in conjunction with -capture to produce more customized results. By using the -logdir option, a directory will be created containing capture files for each individual test run and test rather than a single capture file containing packets captured from all tests during a test run. This may be taken a step further by also using the -report-html option. This will create an HTML report for your test run which includes links to the capture files generated during the test run.

$ buddy -config myConfig.conf -module basic.tcl -trace -pt -logdir /home/foo/bar -report-html /home/foo/bar/report

When using the -logdir option, you must specify a different directory for each test run. Alternatively you can use the -force option to delete/overwrite the existing log directory. In addition, test comments can be added to the log files and HTML reports. For more information see this Knowledge Base article How can I add comments to the log file and HTML report?

The -trace and -pt options are also commonly used when running CDRouter tests with buddy. The -trace option enables protocol trace messages, and the -pt option enables a one line summary of sent and received packets. For more information on other buddy options, please see the CDRouter User’s Guide.

Contents

×

About CDRouter

QA Cafe CDRouter is a comprehensive and powerful test automation solution focused on feature, security, and performance testing for broadband and enterprise edge gateways, Wi-Fi and mesh systems, and other CPE.

Get in touch via our Contact page or by following us on your favorite service: