[dns-operations] CBOR DNS Stream Format

Jerry Lundström jerry at dns-oarc.net
Mon Nov 14 20:33:38 UTC 2016

Hi all,

I have been fiddling around with CBOR while reading the C-DNS draft and
there have been a couple of concerns that I wanted to solve such as:
- representing broken DNS
- being able to stream the format
- data degradation/quality
- support non-DNS information

And what better way to do it then to code it, so here it is!

There is workable code in the develop branch of dnscap [1], you need
tinycbor as describe in the README [2] and then you can specify the CDS

  dnscap [-i interface | -r pcap.file] -F cds -w /tmp/whatever

I have included a decoder written in Python [3], it will need cbor2
library that you can install with pip:

  sudo pip3 install cbor2
  contrib/cdsdump.py <file>

It it not complete yet, there is still a lot of deduplication that can
be made.  For example the code is not doing the index thing as C-DNS
does yet so there is still bits to be saved, but here are some numbers
of the current work.

Uncompressed | PCAP       | CDS       | Factor
client       | 458373     | 133640    | 0,2915
zonalizer    | 51769844   | 9450475   | 0,1825
large ditl   | 1003931674 | 298167709 | 0,2970
small ditl   | 1651252    | 603314    | 0,3653

There are more numbers in the CDS readme [4].

So you might wonder what the goal is and for now I can say is that I
don't have any intentions to write a draft or be competitive with C-DNS,
a lot of this work has been things we needed to tackle anyway.

Hope this is helpful!


[1] https://github.com/DNS-OARC/dnscap
[2] https://github.com/DNS-OARC/dnscap/blob/develop/README.md#cbor
[3] https://github.com/DNS-OARC/dnscap/blob/develop/contrib/cdsdump.py
[4] https://github.com/DNS-OARC/dnscap/blob/develop/CBOR_DNS_STREAM.md

More information about the dns-operations mailing list