← Back to team overview

rohc team mailing list archive

Re: [Question #245813]: Size of compressed packets in ROHC tunnel

 

Question #245813 on rohc changed:
https://answers.launchpad.net/rohc/+question/245813

    Status: Open => Answered

Didier Barvaux proposed the following answer:
Hello,

> I'm working on some experiments with the ROHC library
> and i'm little confused about the utilization of ROHC tunnel.
> I tried to send some icmp (ping) packets from host A to
> host B, using ROHC tunnel. The pings worked fine and I get
> the responses but looking for my captures in wireshark on
> my switch (between hosts A and B), I noticed that the ROHC
> frames were bigger than the originals icmp packets. I think
> that's because ROHC tunnel uses a UDP encapsulation, isn't it?

Yes, it is.

> Only for information, the originals icmp packets have 98 bytes
> lenght and the packets in ROHC tunnel have 109 bytes (the
> majority malformed packets).

If ICMP packets are 98-byte length, then they one 20-byte IPv4 payload and one 78-byte payload (ICMP header is not compressed by ROHC, so I count it as payload).
The 20-byte IPv4 header may be compressed at best to 1 byte. So, we have a 79-byte ROHC packet.
Then we have to add tunnel overhead: the 20-byte IPv4 header, the 8-byte UDP header and a 2-byte packet counter, ie. 79+20+8+2 = 109 bytes.

> Doing a similiar experiment with voip packets (udp/rtp) in a ROHC tunnel.
> Will I see bigger packets too?

RTP packets are much more compressed: the 20-byte IPv4 header, the
8-byte UDP header and the 12-byte RTP header may be compressed up to 1
byte. We thus saves 39 bytes per packets. The tunnel adds 20+8+2=30
bytes of overhead. So, you should see smaller packets.

On a side note: you seem to expect some performance gain from the ROHC
tunnel, but you shouldn't. The ROHC over UDP tunnel was not created for
that purpose. It was created for testing purpose: send ROHC-compressed
traffic from one machine to another and watch how the compression
behaves. The UDP encapsulation is not designed for efficiency but for
ease of use. You might consume more bandwidth with the ROHC over UDP
tunnel than without. If you seek efficiency, have a look at the [IP/ROHC
tunnel](http://rohc-lib.org/wiki/doku.php#ip_rohc_tunnel).

Regards,
Didier

-- 
You received this question notification because you are a member of ROHC
Team, which is an answer contact for rohc.