Project

General

Profile

OSmux » History » Version 3

pespin, 06/02/2017 11:29 AM

1 1 pespin
h1. OSmux
2
3
OSmux is a multiplex protocol that proxies voice (RTP-AMR) and signalling traffic in order to reduce the bandwidth consumption, which can be specially important in satellite based GSM back-haul systems. Development of the protocol has been so far mainly accomplished by "sysmocom GmbH":http://sysmocom.de/ and funded by "On-Waves ehf":http://on-waves.com/.
4
5
The latest version of the reference specification can be found in the nightly build of osmo-gsm-manuals: "osmux-reference.pdf":http://ftp.osmocom.org/docs/latest/osmux-reference.pdf
6
7
Reference implementation can be found in libosmo-netif: "osmuxh.h":http://git.osmocom.org/libosmo-netif/tree/include/osmocom/netif/osmux.h "osmux.c":http://git.osmocom.org/libosmo-netif/tree/src/osmux.c
8
9
So far, main use of OSmux has been connecting several project:osmobsc with a [[bsc_nat]] through a satellite link to multiplex and batch calls together. Both use the implementation in libosmo-netif to gain OSmux support. Use of OSmux protocol in those projects can be configured using the VTY configuration interface.
10
11
h2. Wireshark
12
13
Wireshark gained initial support to dissect Osmux packets in mid July 2016 ("fdbf443d27":https://github.com/wireshark/wireshark/commit/fdbf443d27130628918ac247c682d32bcb314b49, after release 2.3.0rc0).
14
15
The packet dissector can be found in "packet-gsm_osmux.c":https://github.com/wireshark/wireshark/blob/master/epan/dissectors/packet-gsm_osmux.c
16
17
Support for Osmux was later improved during May-June 2017. Some of the new features include:
18
* Support dissecting more than one OSmux frame per UDP packet.
19
* Display each AMR payload separately instead of showing all of them together.
20
* Display the RTP M bit in the packet tree.
21
* Add menu "Telephony->Osmux" to run the "Packet counter" stats tree, both for wireshark-gtk and wireshark-qt.
22
* Support and display correctly both old Dummy packets (see below) and official dummy packets.
23
* Add support to identify different OSmux streams, assigning an ID to each of them. This ID is showed in the packet tree for each packet, and can be used as a filter ("osmux.stream_id == 123").
24
25
26
h3. How-To use the OSmux Wireshark dissector
27
28
First, load a pcap file or start recording on an interface with an OSmux connection ongoing.
29
30
If the Osmux connection is not detected and it only shows up as a regular UDP flow, then select any of the UDP packet flows and right click to open the menu, then select "Decode As...". A window with a list of protocol will show up. Select "GSM Osmux" and press "Apply". At this point, the dissector should be displaying all OSmux information for packets on that UDP flow. See screenshot section below to have an idea how it should look like.
31
32
On the info column, for each UDP packet you should see a summary of what does that packet contain from OSmux point of view. It will show the OSmux frame type. If there is more than one OSmux frame per packet, then all will be shown separated by commas.
33
34
Packets displayed as "Old Dummy" are specifically crafted packets from early specs/implementation days of Osmux. Support to dissect them is left for backward compatibility and to be able to dissect correctly old pcap traces. They can be identified because its Osmux frame length is 2 bytes containing only the control byte (1st byte) and the CID (2nd byte). In this kind of packets, the control bytes has the value 0x23
35
36
You can select any packet and you will see all the bits decoded in the packet tree.
37
38
Every OSmux frame will contain an "Osmux Stream ID". That's a value calculated by Wireshark which identifies uniquely every tuple [ip-src, port-src, ip-dst, port-dst, cid], which means for each call between A<->B, you will have 2 streams, one for each flow direction. You can right click on the "Osmux Stream ID" field on the packet tree and use it as a filter ("Apply As Filter"->"Selected") to filter and list packets for a specific stream.
39
40 3 pespin
*Limitation*: If you record for long enough or the same tuple (IPs, ports and CID) is reused fast enough to set up a new call, the code in the Osmux dissector won't be able to differentiate between the old call and the new call, and thus both will be assigned the same "Osmux Stream ID", which is bad specifically if you want to calculate the statistics using the stats tree, as then the calculated values will probably be wrong. The advise here is to manually review and make sure this doesn't happen, by knowing context of the trace or following some heuristics like "this stream didn't receive packets for a long time and after that packets start flowing again, probably starting with a few Dummy packets". If it's the case, identify manually the different streams and split them into a different capture to have good results from the OSmux tree.
41 1 pespin
42
h3. How-To use the OSmux Wireshark stats tree
43
44
The stats tree is a built-in graphical interface from Wireshark to display a few variables and counters over a set of packets.
45
46 2 pespin
OSmux uses this interface to display some statistics for each stream ID identified. To open the stats tree GUI for OSMux streams, use the following menu: "Telephony->Osmux->Packet Counter". A new small window will appear which let's you apply a filter to calculate statistics for only a subset of the packets already detected as OSmux by the dissector. For instance, if you want to calculate statistics only for a certain stream with ID 123, you can pass osmux.stream_id == 123", then press "Create Stat".
47
48
The stats tree GUI will appear, listing the streams according to the applied filter. See screenshot section below to have an idea how it should look like. Each stream is shown in the following format:
49 1 pespin
<pre>
50
STREAM_ID ([IP_SRC:PORT_SRC->IP_DST:PORT_DST]:CID)
51
</pre>
52
On the _Count_ column you will find the number of packets which are part of that stream.
53
 
54
For each stream, the following fields are displayed:
55 3 pespin
* *Count: AMR frames*: In the _Count_ column, number of packets for that stream which are of type _AMR Codec (1)_.
56 1 pespin
* *Count: Osmux Packets*: In the _Count_ column, number of packets for that stream.
57 3 pespin
* *Field: FT AMR*: In the _Count_ column, number of packets for that stream which are of type _AMR Codec (1)_ and are not _Old Dummy_ packets.
58
* *Field: Old Dummy*: In the _Count_ column, number of packets for that stream which are of type _AMR Codec (1)_ and are _Old Dummy_ packets.
59
* *Field: RTP Marker (M)*: In the _Count_ column, number of packets for that stream which are of type _AMR Codec (1)_ and have the RTP Marker (M) bit set, as explained in the OSmux specification.
60 1 pespin
* *Jitter Analysis: Relative Transmit Time [ms]*:
61
** column _Count_, number of packets used to calculate the value (should be the same as the one in _Field: FT AMR_).
62
** column _Average_, average value of Relative Transit Time for the stream as specified in "RFC3550 section 6.4.1":https://tools.ietf.org/html/rfc3550#section-6.4.1 field "interarrival jitter", calculated in milliseconds.
63
** column _Min val_, the minimum value registered (Take into account the value is signed but Wireshark shows it as an unsigned value, so you may need to convert manually).
64
** column _Max val_, the minimum value registered.
65
* *Jitter Analysis: Relative Transmit Time (abs) [ms]*:
66
** column _Count_, number of packets used to calculate the value (should be the same as the one in _Field: FT AMR_).
67
** column _Average_, last value of Relative Transit Time for the stream as specified in "RFC3550 section 6.4.1":https://tools.ietf.org/html/rfc3550#section-6.4.1 field "interarrival jitter", absolute value calculated in milliseconds.
68
** column _Min val_, the minimum value registered.
69
** column _Max val_, the minimum value registered.
70
* *Jitter Analysis: Jitter [ms]*:
71
** column _Count_ column, number of packets used to calculate the value (should be the same as the one in _Field: FT AMR_).
72
** column _Average_, last value of Jitter for the stream as specified in "RFC3550 appendix a.8":https://tools.ietf.org/html/rfc3550#appendix-A.8, calculated in milliseconds.
73
** column _Min val_, the minimum value registered.
74
** column _Max val_, the minimum value registered.
75 2 pespin
* *SeqNum Analysis: Consecutive Repeated*: Number of times that a packet has the same OSmux Seq field as the previous one, i.e. number of duplicated packets.
76
* *SeqNum Analysis: Lost*: Estimation of packets lost based on Osmux seq field values jumping forward increasing more than 1 since last packet received (+ some heursitics to check for wrap).
77
* *SeqNum Analysis: In Order*: Regular situation in which Osmux seq field value N+1 comes after N (+ some heursitics to check for wrap).
78
* *SeqNum Analysis: Out of Order*: Estimation of packets received in a later timer with a Osmux seq field value smaller than the higher one we received previosuly (+ some heursitics to check for wrap).
79 1 pespin
80
Fields which have no packets matching are not shown and their values can be usually understood to be zero or similar logical value.
81 2 pespin
82 1 pespin
83
h3. Screenshot
84
85
Screenshot summarizing current features:
86
87
!osmux-stats.png!
Add picture from clipboard (Maximum size: 48.8 MB)