introduction to ccn-lite - sigcommconferences2.sigcomm.org/.../6-ccn-lite-overview.pdf ·...

21
Introduction to CCN-lite Christopher Scherb, Claudio Marxer, Christian Tschudin University of Basel Department for Mathematics and Computer Science Computer Networking Group ACM ICN 2017

Upload: others

Post on 29-May-2020

44 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Introduction to CCN-lite - SIGCOMMconferences2.sigcomm.org/.../6-ccn-lite-overview.pdf · Introduction to CCN-lite ChristopherScherb,ClaudioMarxer,ChristianTschudin University of

Introduction to CCN-lite

Christopher Scherb, Claudio Marxer, Christian Tschudin

University of BaselDepartment for Mathematics and Computer Science

Computer Networking Group

ACM ICN 2017

Page 2: Introduction to CCN-lite - SIGCOMMconferences2.sigcomm.org/.../6-ccn-lite-overview.pdf · Introduction to CCN-lite ChristopherScherb,ClaudioMarxer,ChristianTschudin University of

Introduction

§ CCN-lite is a lightweight ICN implementation§ permissive ISC license§ developed at University of Basel§ Multi Packet format forwarder: NDN, CCNx, etc.§ CCN-lite runs on multiple platforms

§ x86/64 on Linux, BSD and MacOS,Kernel Module for Linux

§ Android, Arduino§ ARM Cortex A-series§ RIOT (e.g. ARM Cortex M-series)

Christopher Scherb, Claudio Marxer, Christian TschudinCCN-lite 2 / 21

Page 3: Introduction to CCN-lite - SIGCOMMconferences2.sigcomm.org/.../6-ccn-lite-overview.pdf · Introduction to CCN-lite ChristopherScherb,ClaudioMarxer,ChristianTschudin University of

CCN-lite v2

§ CCN-lite was started 2011§ complete restructure of the Code (2017)§ split the code in several modules§ available as libs and source modules§ modules can be disabled at compile time§ provide packet encoding library for applications§ remove code duplications

Christopher Scherb, Claudio Marxer, Christian TschudinCCN-lite 3 / 21

Page 4: Introduction to CCN-lite - SIGCOMMconferences2.sigcomm.org/.../6-ccn-lite-overview.pdf · Introduction to CCN-lite ChristopherScherb,ClaudioMarxer,ChristianTschudin University of

Structure of CCN-lite v2

Unix

Android

RIOT

LX-Kernel

NFN

Forwarding

Core

Packet

Utils

Christopher Scherb, Claudio Marxer, Christian TschudinCCN-lite 4 / 21

Page 5: Introduction to CCN-lite - SIGCOMMconferences2.sigcomm.org/.../6-ccn-lite-overview.pdf · Introduction to CCN-lite ChristopherScherb,ClaudioMarxer,ChristianTschudin University of

CCN-lite Home structures

§ CCN-Lite Home Dir§ doc§ src

§ ccnl-core§ ccnl-fwd§ ccnl-pkt§ ccnl-unix§ ccnl-riot§ ccnl-utils§ ...

§ test§ tutorial

Christopher Scherb, Claudio Marxer, Christian TschudinCCN-lite 5 / 21

Page 6: Introduction to CCN-lite - SIGCOMMconferences2.sigcomm.org/.../6-ccn-lite-overview.pdf · Introduction to CCN-lite ChristopherScherb,ClaudioMarxer,ChristianTschudin University of

CCN-lite Usage: Build Process

§ Source Code available on Githubgithub.com/cn-uofbasel/ccn-lite

§ CMake Build System§ Dependencies: OpenSSL, CMake§ only two dependencies, fast compiling ñ easy to start§ Building CCN-Lite from CCN-Lite Home Dir:

mkdir buildcmake ../srcmake

Christopher Scherb, Claudio Marxer, Christian TschudinCCN-lite 6 / 21

Page 7: Introduction to CCN-lite - SIGCOMMconferences2.sigcomm.org/.../6-ccn-lite-overview.pdf · Introduction to CCN-lite ChristopherScherb,ClaudioMarxer,ChristianTschudin University of

CCN-lite Command Line Tools

Selection of Command Line Tools important for thistutorial

§ ccn-lite-relay Unix forwarder§ ccn-lite-ctrl Tool for configuration§ ccn-lite-ccnb2xml Print CTRL packets§ ccn-lite-mkC Tool to create data objects§ ccn-lite-mkI Tool to create interest packets§ ccn-lite-peek Tool to fetch a data object§ ccn-lite-pktdump Tool to analyze packets

Christopher Scherb, Claudio Marxer, Christian TschudinCCN-lite 7 / 21

Page 8: Introduction to CCN-lite - SIGCOMMconferences2.sigcomm.org/.../6-ccn-lite-overview.pdf · Introduction to CCN-lite ChristopherScherb,ClaudioMarxer,ChristianTschudin University of

ccn-lite-relay 1

§ Unix forwarder for ICN§ Supports Linklayer, 802.15.4, UDP, Unix-Socketcommunication

§ single binary: forwarding of different packet formats§ Supports NFN forwarding layer (Named FunctionNetworking)

Christopher Scherb, Claudio Marxer, Christian TschudinCCN-lite 8 / 21

Page 9: Introduction to CCN-lite - SIGCOMMconferences2.sigcomm.org/.../6-ccn-lite-overview.pdf · Introduction to CCN-lite ChristopherScherb,ClaudioMarxer,ChristianTschudin University of

ccn-lite-relay 2

´d d a t a b a s e d i r´e e thdev´s SUITE ( ccnb , ccnx2015 , c i s co2015 ,

io t2014 , ndn2013 )w wpandev´u udpport ( can be s p e c i f i e d tw i c e )´6 udp6port ( can be s p e c i f i e d tw i c e )´v DEBUG_LEVEL ( f a t a l , e r r o r , warning , i n f o ,

debug , ve rbose , t r a c e )´x un i xpa th

ccn-lite-relay -v debug -x /tmp/mgmt.sock -u 9000

Christopher Scherb, Claudio Marxer, Christian TschudinCCN-lite 9 / 21

Page 10: Introduction to CCN-lite - SIGCOMMconferences2.sigcomm.org/.../6-ccn-lite-overview.pdf · Introduction to CCN-lite ChristopherScherb,ClaudioMarxer,ChristianTschudin University of

ccn-lite-ctrl 1

Management system for the ccn-lite-relay

ccn´ l i t e ´c t r l[´h ] [´k r e l a y´pub l i c´key ] [´m] [´p p r i v a t e´key ][´v debug l e v e l ][´u ip´add r e s s / po r t | ´x ux_path ]

CMD

Christopher Scherb, Claudio Marxer, Christian TschudinCCN-lite 10 / 21

Page 11: Introduction to CCN-lite - SIGCOMMconferences2.sigcomm.org/.../6-ccn-lite-overview.pdf · Introduction to CCN-lite ChristopherScherb,ClaudioMarxer,ChristianTschudin University of

ccn-lite-ctrl 2: commands

newETHface MACSRC| any MACDST ETHTYPEnewUDPface IP4SRC | any IP4DST PORTnewWPANface WPAN_ADDR WPAN_PANIDnewUDP6face IP6SRC | any IP6DST PORTnewWPANface WPAN_ADDR WPAN_PANIDnewUNIXface PATHd e s t r o y f a c e FACEIDp r e f i x r e g PREFIX FACEID [ SUITE ]p r e f i x u n r e g PREFIX FACEID [ SUITE ]addContentToCache ccn´ f i l eremoveContentFromCache ccn´path

Christopher Scherb, Claudio Marxer, Christian TschudinCCN-lite 11 / 21

Page 12: Introduction to CCN-lite - SIGCOMMconferences2.sigcomm.org/.../6-ccn-lite-overview.pdf · Introduction to CCN-lite ChristopherScherb,ClaudioMarxer,ChristianTschudin University of

CCN-lite: install a face

Relay 1

Relay 2

User

install face

ccn-lite-ctrl -x /tmp/mgmt1.sock newUDPfaceany ip/port | ccn-lite-ccnb2xml

creates a new abstract interface on Relay 1 pointing toanother relay (Relay 2)

Christopher Scherb, Claudio Marxer, Christian TschudinCCN-lite 12 / 21

Page 13: Introduction to CCN-lite - SIGCOMMconferences2.sigcomm.org/.../6-ccn-lite-overview.pdf · Introduction to CCN-lite ChristopherScherb,ClaudioMarxer,ChristianTschudin University of

CCN-lite: register a prefix

Relay 1

Relay 2

User

prefixreg

ccn-lite-ctrl -x /tmp/mgmt1.sock prefixregprefix faceid | ccn-lite-ccnb2xml

creates a new entry in the FIB

Christopher Scherb, Claudio Marxer, Christian TschudinCCN-lite 13 / 21

Page 14: Introduction to CCN-lite - SIGCOMMconferences2.sigcomm.org/.../6-ccn-lite-overview.pdf · Introduction to CCN-lite ChristopherScherb,ClaudioMarxer,ChristianTschudin University of

CCN-lite Demo Scenario

Relay 1

Relay 2

User prefix

Christopher Scherb, Claudio Marxer, Christian TschudinCCN-lite 14 / 21

Page 15: Introduction to CCN-lite - SIGCOMMconferences2.sigcomm.org/.../6-ccn-lite-overview.pdf · Introduction to CCN-lite ChristopherScherb,ClaudioMarxer,ChristianTschudin University of

ccn-lite-mkC: create a data object

´ i FNAME inpu t f i l e ( i n s t e a d o f s t d i n )´k FNAME HMAC256 key ( base64 encoded )´ l LASTCHUNKNUM number o f l a s t chunk´n CHUNKNUM chunknum´o FNAME output f i l e ( i n s t e a d o f s t dou t )´p DIGEST p u b l i s h e r f i n g e r p r i n t´s SUITE ( ccnb , ccnx2015 , c i s co2015 ,

io t2014 , ndn2013 )ICN´FILE NAME

echo "Hello ACM ICN" | ccn-lite-mkC -o mydata.ndntlv

<prefix>

Christopher Scherb, Claudio Marxer, Christian TschudinCCN-lite 15 / 21

Page 16: Introduction to CCN-lite - SIGCOMMconferences2.sigcomm.org/.../6-ccn-lite-overview.pdf · Introduction to CCN-lite ChristopherScherb,ClaudioMarxer,ChristianTschudin University of

ccn-lite-ctrl: addContentToCache

Relay 1

Relay 2

User prefixaddContentToCache

ccn-lite-ctrl -x /tmp/mgmt2.sockaddContentToCache mydata.ndntlv

Christopher Scherb, Claudio Marxer, Christian TschudinCCN-lite 16 / 21

Page 17: Introduction to CCN-lite - SIGCOMMconferences2.sigcomm.org/.../6-ccn-lite-overview.pdf · Introduction to CCN-lite ChristopherScherb,ClaudioMarxer,ChristianTschudin University of

ccn-lite-peek 1

´n CHUNKNUM p o s i t i v e i n t e g e r f o rchunk i n t e r e s t

´s SUITE ( ccnb , ccnx2015 , c i s co2015 ,io t2014 , ndn2013 )

´u a . b . c . d/ po r t UDP d e s t i n a t i o n´v DEBUG_LEVEL ( f a t a l , e r r o r , warning , i n f o ,

debug , ve rbose , t r a c e )w t imeout i n s e c ( f l o a t )´x ux_path_name UNIX IPC

ICN´URI

Christopher Scherb, Claudio Marxer, Christian TschudinCCN-lite 17 / 21

Page 18: Introduction to CCN-lite - SIGCOMMconferences2.sigcomm.org/.../6-ccn-lite-overview.pdf · Introduction to CCN-lite ChristopherScherb,ClaudioMarxer,ChristianTschudin University of

ccn-lite-peek 2: fetch data

Relay 1

Relay 2

User prefix

I: <prefix>

ccn-lite-peek -u ip/port <prefix>

Christopher Scherb, Claudio Marxer, Christian TschudinCCN-lite 18 / 21

Page 19: Introduction to CCN-lite - SIGCOMMconferences2.sigcomm.org/.../6-ccn-lite-overview.pdf · Introduction to CCN-lite ChristopherScherb,ClaudioMarxer,ChristianTschudin University of

CCN-lite Development

§ using the packet library for an application§ required libraries: core, pkt§ use header files from src tree§ use libraries from bin/lib tree§ to create an interest:

§ include: "src/ccnl-pkt/ccnl-pkt-builder.h"§ link with "build/bin/lib/ccnl-core.a, ccnl-pkt.a"

Christopher Scherb, Claudio Marxer, Christian TschudinCCN-lite 19 / 21

Page 20: Introduction to CCN-lite - SIGCOMMconferences2.sigcomm.org/.../6-ccn-lite-overview.pdf · Introduction to CCN-lite ChristopherScherb,ClaudioMarxer,ChristianTschudin University of

CCN-lite Development: Create an Interest

s t r u c t c cn l_p r e f i x_s ∗ p r e f i x =ccn l_URI toP r e f i x ( cha r∗ u r i , i n t s u i t e ,cha r ∗ n fnexpr , un s i gned i n t ∗chunknum )

i n t nonce = random ( )

s t r u c t c c n l_ i n t e r e s t_ s ∗ i n t e r e s t =ccn l_mk In t e r e s tOb j e c t ( s t r u c tc cn l_p r e f i x_s ∗name , i n t ∗nonce )

Christopher Scherb, Claudio Marxer, Christian TschudinCCN-lite 20 / 21

Page 21: Introduction to CCN-lite - SIGCOMMconferences2.sigcomm.org/.../6-ccn-lite-overview.pdf · Introduction to CCN-lite ChristopherScherb,ClaudioMarxer,ChristianTschudin University of

The End

Thank your for your attention!

Christopher Scherb, Claudio Marxer, Christian TschudinCCN-lite 21 / 21