Toolpack Debug Application:Tbsigtrace

From TBwiki
(Difference between revisions)
Jump to: navigation, search
(Major update on structure of page!)
Line 1: Line 1:
Tbsigtrace is a debug tool that is use to collect signalling protocol messages. It can trace SS7, ISDN, SIP, Sigtran and CAS messages and put it in a [http://www.wireshark.org wireshark] format.<br>
+
'''tbsigtrace''' is a debug tool that is use to collect signalling protocol messages. It can trace SS7, ISDN, SIP, Sigtran and H.248 messages and put it in a [http://www.wireshark.org wireshark] format. It can also capture CAS traces in a text format<br>
 
+
 
<br>  
 
<br>  
  
== Version history <br> ==
+
== How to use it ==
This documentation relates to Tbsigtrace of version 2.3 and higher. Note that the Tbsigtrace signalling tracing tool that is distributed with version 2.0 to 2.2 is based on an older capturing tools that does not provide wireshark pcap format.
+
Connect [[Accessing_Device|SSH]] to the unit and type
 +
tbsigtrace
 +
This will capture all protocols available on the units. It will create one pcap file per protocol. To stop the application, type 'q'.<br>
 +
The output files are located here: '''/lib/tb/toolpack/setup/12358/[major version]/apps/tbsigtrace''' and can be retrieved with a sFTP tool.
  
== Application Location<br> ==
+
To capture live signaling traces to wireshark see: [[Live_signalling_capture_by_tbsigtrace|Live Signaling capture]]
  
The binary is located in the [InstallDir]/[PackageVersion]/bin/release/[Platform]/
+
=== More details on using the '''tbsigtrace''' application ===
 
+
Example:
+
 
+
Version 2.5.55, TMG unit (PPC 32bits)
+
 
+
/lib/tb/toolpack/pkg/2.5.55/bin/release/ppc-linux/tbsigtrace
+
 
+
Version 2.5.55, CentOS 64 bits system
+
 
+
/lib/tb/toolpack/pkg/2.5.55/bin/release/x86_64-linux64/tbsigtrace
+
 
+
Version 2.5.55, Windows system
+
 
+
C:\TelcoBridges\toolpack\pkg\2.5.55\bin\release\i586-win32\tbsigtrace.exe
+
 
+
== How to use it  ==
+
 
+
=== Command line  ===
+
  
 
Options available:  
 
Options available:  
Line 50: Line 34:
  
 
==== Examples  ====
 
==== Examples  ====
Starting with releases 2.4.59, 2.5.116 and 2.6, "-adapter all -regroup -cap" options are included automatically when launching tbsigtrace. 
 
<br> To avoid regrouping entities, you need to use "-single".
 
<br> To have the text format, you need to use "-format".
 
<br> The output files will be located in:
 
/lib/tb/toolpack/setup/12358/[major version]/apps/tbsigtrace
 
 
 
This will gather all ss7 links from one blade and put this in a single cap file  
 
This will gather all ss7 links from one blade and put this in a single cap file  
 +
tbsigtrace -ss7
  
tbsigtrace -gw 12358 -adapter TB000544 -ss7
+
This will gather all isdn links and put them in on files  
 
+
  tbsigtrace -isdn
This will gather all isdn links from one blade and put them in several files  
+
This will gather all isdn links with lapd layer and put them in separate text files
 
+
tbsigtrace -isdn -old -format
  tbsigtrace -gw 12358 -adapter TB000544 -isdn
+
tbsigtrace -gw 12358 -adapter TB000544 -isdn -old      (for lapd layer analysis)
+
 
+
This will gather all sip traces and put them in a single cap file
+
  
 +
This will gather all sip traces from the default gateway port and specific unit and put them in a single cap file
 
  tbsigtrace -gw 12358 -adapter TB000544 -ip
 
  tbsigtrace -gw 12358 -adapter TB000544 -ip
 
This will gather traces on the CA001734_63 stack only
 
tbsigtrace -L CA001734_63
 
 
Specify the adapter name along with the entity name
 
tbsigtrace -L TB001734:CA001734_63
 
 
Specify many entities at once (all lines have the same effect)
 
tbsigtrace -L CA001734_63,CA001734_62,CA001734_61
 
tbsigtrace -L CA001734_63;CA001734_62;CA001734_61
 
tbsigtrace -L "CA001734_63,CA001734_62,CA001734_61"
 
tbsigtrace -L "CA001734_63 CA001734_62 CA001734_61"
 
 
<br> In release 2.4 This will gather all sip and sigtran traces and put them in a single cap file for all adapters in the system
 
 
tbsigtrace -gw 12358 -ip
 
 
  
 
This will gather all h248 messages on the system and put this in a single cap file  
 
This will gather all h248 messages on the system and put this in a single cap file  
 
+
  tbsigtrace -h248
  tbsigtrace -gw 12358 -h248
+
 
+
  
 
This will gather all IUA (ip and tdm sides) messages on the system and put this in a single cap file  
 
This will gather all IUA (ip and tdm sides) messages on the system and put this in a single cap file  
 
+
  tbsigtrace -ip -lapd
  tbsigtrace -gw 12358 -adapter TB000544 -ip -lapd
+
 
+
=== Configuration file (optional)  ===
+
 
+
The configuration file will allow to get several blades in the same file
+
 
+
Example MTP2_LINK_0,MTP2_LINK_1 are on the same blade and MTP2_LINK_10,MTP2_LINK_11 are on an other blade
+
 
+
  &lt;signaling&gt;
+
 
+
  &lt;sysmgr name = "MTP2_LINK_0" grpname="LS1" capfile="true" /&gt;
+
  &lt;sysmgr name = "MTP2_LINK_1" grpname="LS1" capfile="true" /&gt;
+
  &lt;sysmgr name = "MTP2_LINK_10" grpname="LS1" capfile="true" /&gt;
+
  &lt;sysmgr name = "MTP2_LINK_11" grpname="LS1" capfile="true" /&gt;
+
 
+
  &lt;/signaling&gt;
+
 
+
=== Web<br>  ===
+
 
+
You can start/stop tbsigtrace via web.<br>
+
 
+
Create a new application configuration:
+
<pre>Name                  -&gt; oamsigtrace
+
Application Type      -&gt; User Specific
+
Bin Path              -&gt; @{PKG_BIN}/tbsigtrace
+
Working Path          -&gt; ../tbsigtrace
+
Command-line arguments -&gt; -adapter all -ss7 -cap
+
 
+
</pre>
+
Create a new application instance:<br>
+
<pre>Name                  -&gt; oamsigtrace
+
Host                  -&gt; (put required host)
+
Application Config    -&gt; oamsigtrace
+
 
+
</pre>
+
You can control the application "oamsigtrace" with the application status page OR<br>you can use the option 'o' in tboamapp (page=Application launch manager) and change the state of oamsigtrace application<br>state (0=stop 1-mgmt 2-run).<br>
+
  
 
=== How to interpret the data  ===
 
=== How to interpret the data  ===
  
When using wireshark (http://www.wireshark.org/) to analyze the captured data (in pcap format), you can apply multiple filters to scope your analysis around relevant data.  For example, in the following picture, you can see that the 'q931' filter was applied to show only ISDN-related packets.   
+
When using wireshark (http://www.wireshark.org/) to analyze the captured data (in pcap format), you can apply multiple filters to scope your analysis around relevant data.  For example, in the following picture, you can see that the 'q931' filter was applied to show only ISDN-related packets.  Other userful keywords are here:
 +
* SIP: '''sip || rtp'''
 +
* ISDN: '''q921 || q931'''
 +
* SS7: '''mtp2 || mtp3 || isup'''
 +
* SCTP: '''sctp'''
 +
* Sigtran IUA: '''iua'''
 +
* Sigtran M2UA: '''m2ua'''
 +
* Sigtran M2PA: '''m2pa'''
 +
* Sigtran M3UA: '''m3ua'''
 +
* H.248: '''megaco'''
  
 
Be aware however that the pcap format is usually a container for "packet" data.  So, when TDM protocol such as ISDN or SS7 (non-sigtran) traffic is captured, tbsigtrace wraps the protocol around fake protocols layers (i.e. Ethernet/IP/SCTP) for wireshark to be able to open it and analyze it.  Again, in the picture below, you can see these fake layers that were inserted since the capture was made from a TDM link (T1) with the regular Q.921 (HDLC) transport protocol.  These layers have been stripped and replaced by Ethernet/IP/SCTP.
 
Be aware however that the pcap format is usually a container for "packet" data.  So, when TDM protocol such as ISDN or SS7 (non-sigtran) traffic is captured, tbsigtrace wraps the protocol around fake protocols layers (i.e. Ethernet/IP/SCTP) for wireshark to be able to open it and analyze it.  Again, in the picture below, you can see these fake layers that were inserted since the capture was made from a TDM link (T1) with the regular Q.921 (HDLC) transport protocol.  These layers have been stripped and replaced by Ethernet/IP/SCTP.
Line 141: Line 71:
  
 
[[Image:Tbsigtrace_pcap.png]]
 
[[Image:Tbsigtrace_pcap.png]]
 
  
 
'''WARNING: tbsigtrace application should not be used all the time, otherwise it will reduce performance and fill completely your hard drive'''.
 
'''WARNING: tbsigtrace application should not be used all the time, otherwise it will reduce performance and fill completely your hard drive'''.

Revision as of 15:34, 9 August 2016

tbsigtrace is a debug tool that is use to collect signalling protocol messages. It can trace SS7, ISDN, SIP, Sigtran and H.248 messages and put it in a wireshark format. It can also capture CAS traces in a text format

Contents

How to use it

Connect SSH to the unit and type

tbsigtrace

This will capture all protocols available on the units. It will create one pcap file per protocol. To stop the application, type 'q'.
The output files are located here: /lib/tb/toolpack/setup/12358/[major version]/apps/tbsigtrace and can be retrieved with a sFTP tool.

To capture live signaling traces to wireshark see: Live Signaling capture

More details on using the tbsigtrace application

Options available:

-d Daemon mode
-name XYZ Application name
-db Not used
-c XYZ Configuration file to load
-gw XYZ SystemId (i.e. 12358)
-adapter TBXYZ Adapter name to connect or "all" to connect to all adapter in the system
-ss7 Default ss7 trace activation
-isdn Default isdn trace activation
-old Isdn trace in cap file with lapd layer
-ip Default ip trace activation (sip, sigtran and iua)
-h248 Default h248 trace activation
-lapd Default lapd trace activation
-cas Default cas trace activation
-cap CAP format enabled
-format TXT format enabled
-single Create one file by signaling entity
-regroup Regroup identical signaling entity types in one file
-L link Specify which the link to be captured

Examples

This will gather all ss7 links from one blade and put this in a single cap file

tbsigtrace -ss7

This will gather all isdn links and put them in on files

tbsigtrace -isdn

This will gather all isdn links with lapd layer and put them in separate text files

tbsigtrace -isdn -old -format

This will gather all sip traces from the default gateway port and specific unit and put them in a single cap file

tbsigtrace -gw 12358 -adapter TB000544 -ip

This will gather all h248 messages on the system and put this in a single cap file

tbsigtrace -h248

This will gather all IUA (ip and tdm sides) messages on the system and put this in a single cap file

tbsigtrace -ip -lapd

How to interpret the data

When using wireshark (http://www.wireshark.org/) to analyze the captured data (in pcap format), you can apply multiple filters to scope your analysis around relevant data. For example, in the following picture, you can see that the 'q931' filter was applied to show only ISDN-related packets. Other userful keywords are here:

  • SIP: sip || rtp
  • ISDN: q921 || q931
  • SS7: mtp2 || mtp3 || isup
  • SCTP: sctp
  • Sigtran IUA: iua
  • Sigtran M2UA: m2ua
  • Sigtran M2PA: m2pa
  • Sigtran M3UA: m3ua
  • H.248: megaco

Be aware however that the pcap format is usually a container for "packet" data. So, when TDM protocol such as ISDN or SS7 (non-sigtran) traffic is captured, tbsigtrace wraps the protocol around fake protocols layers (i.e. Ethernet/IP/SCTP) for wireshark to be able to open it and analyze it. Again, in the picture below, you can see these fake layers that were inserted since the capture was made from a TDM link (T1) with the regular Q.921 (HDLC) transport protocol. These layers have been stripped and replaced by Ethernet/IP/SCTP.

Beside being able to use wireshark for analysis, these fake layers may also carry useful information. For example, when looking at an ISDN capture, the fake-SCTP layer will contain the network-variant (e.g. DMS, NET5, etc) from which the capture was made. Another useful information is contained in the fake-IP source and destination addresses:

  • when (Src=w.x.y.z and Dst=0.0.0.0) it means an egress (outgoing) message.
  • when (Src=0.0.0.0 and Dst=w.x.y.z) it means an ingress (incoming) message.

Tbsigtrace pcap.png

WARNING: tbsigtrace application should not be used all the time, otherwise it will reduce performance and fill completely your hard drive.

Personal tools