NDN Codebase and Tools Introduction and getting started info A LEX A FANASYEV Florida International University aa@cs.fiu.edu
Starting Point: https://named-data.net/ ➠ Codebase 2 NDN Tutorial – ACM SIGCOMM 2017
NDN Codebase Overview Infrastructure Software NDN NDN Repo-ng, NFD- NDN- Control NLSR NFD μNFD Tools repo-sql android RIOT Center NDN Libraries ndn- NDN- Vector NDN- NDN- Chrono PyNDN jNDN PSync cxx CPP Sync RTC JS Sync Apps Evaluation Frameworks ndn- ChronoChat ndns ndncert ndnSIM miniNDN flow ndn- Many NdnCon ndn-fs NDN Testbed atmos others 3 NDN Tutorial – ACM SIGCOMM 2017
Where to Find Source Code for NDN Codebase • Most linked from https://named-data.net ➠ Codebase • Github organizations • https://github.com/named-data • NFD, core libraries, and other general use software • https://github.com/named-data-mobile • Android and related software • https://github.com/named-data-iot • IoT related software • https://github.com/named-data-ndnsim • ndnSIM core, example and real simulation scenarios 4 NDN Tutorial – ACM SIGCOMM 2017
Supported Platforms • Desktop Systems • Ubuntu, OSX, FreeBSD and other Linux https://redmine.named-data.net/projects/nfd/wiki distributions • Home routers • OpenWRT, DD-WRT • Mobile: • Android • iOS (library only) • IoT: • Arduino, ESP8266 • RIOT -OS • Raspberry Pi (runs NFD, available binary packages) • Web browser • NDN-JS library + microforwarder • Firefox extension to support ndn:// URLs 5 NDN Tutorial – ACM SIGCOMM 2017
NDN Forwarding Daemon (NFD) • The reference implementation of NDN forwarder • https://named-data.net/doc/NFD/current/ • Overview • Getting started • NFD Developer’s Guide • Manpages • Wiki • API documentation (doxygen) • Feedback, suggestions, and contributions are welcome. 6 NDN Tutorial – ACM SIGCOMM 2017
8/20/2017 Issue Your Own NDN Certificates Getting Started with NFD • T o enable NDN communication in Ubuntu • Next required steps Linux: • Managing Identities for mandatory data-centric security • sudo add-apt-repository ppa:named- You as an Intermediate CA data/ppa • Self-signed certificate for local trust operations (home networking) Unlike in PKI where intermediate CAs are some "big corporations" and they usually charge you money to obtain a • sudo apt-get update certificate, every NDN certificate can act as an intermediate CA and sign other certificates . This means, as • Authority-based soon as you obtain a trusted certificate on ndncert system, you can issue as many certificates as you need. You can • sudo apt-get install nfd issue a certificate for each of your end hosts, and use those certificates for Automatic Prefix Propagation. • https://yoursunny.com/t/2016/ndncert/ • Done. Now you have enabled new Let's put it to work! generation of networking on your machine I have already requested a trusted certificate from ndncert and installed it on my machine vps3 : vps3 $ ndnsec list ‐c * /ndn/edu/arizona/cs/shijunxiao +‐>* /ndn/edu/arizona/cs/shijunxiao/ksk‐1457557007329 +‐>* /ndn/edu/arizona/KEY/cs/shijunxiao/ksk‐1457557007329/ID‐CERT/%FD%00%00%01S%5D+%B3B I want to issue a certificate to my other machine, sunnyq . To do that, I first generate a certificate request on sunnyq : sunnyq $ ndnsec key‐gen ‐tr /ndn/edu/arizona/cs/shijunxiao/sunnyq > sunnyq.ndncertreq Then I copy the certificate request file to vps3 , and issue the certificate by signing it with my existing trusted certificate: vps3 $ ndnsec cert‐gen ‐N '' ‐s /ndn/edu/arizona/cs/shijunxiao ‐ < sunnyq.ndncertreq > sunnyq.ndncert 7 NDN Tutorial – ACM SIGCOMM 2017 Finally, I copy the signed certificate back to sunnyq , and install the new certificate: https://yoursunny.com/t/2016/ndncert/ 2/7
NDN-Android: NDN Stack for Android AndroidManifest.xml NDN Forwarding classes.dex Daemon lib • Embeds actual NFD, compiled using NDK x86_64 Security Tools Contents libnfd-wrapper.so • Works with all (non- libnfd-daemon.so rooted) Android libndn-cxx.so Management GUI libboost_*.so devices NDN … armeabi NDN Tools … NDN Certificate https://play.google.com/store/apps/details?id=net.named_dat Management a.nfd&hl=en https://github.com/named-data-mobile WiFi Direct Communication 8 NDN Tutorial – ACM SIGCOMM 2017
NDN-RIOT: NDN for RIOT -OS • Optimized for IoT apps • Support • Data-centric security • Stateful NDN packet forwarding NDN- Net NDN Threads IPC RIOT IPC Device app • Replaceable forwarding strategies module Driver • 802.15.4 and Ethernet • Simple application APIs Interrupt RIOT-OS Core Sched IPC Handler • Several simple examples to get started Hardware CPU Timer NIC Peripherals https://github.com/named-data-iot 9 NDN Tutorial – ACM SIGCOMM 2017
Getting Started with NDN-RIOT Examples • Downloading • mkdir riot • cd riot • git clone https://github.com/named-data-iot/RIOT • git clone https://github.com/named-data-iot/ndn-riot • git clone https://github.com/named-data-iot/ndn-riot-examples • Compiling an example • cd ndn-riot-examples/<APP> ndn-benchmark • For host architecture (for debugging) ndn-consumer • make ndn-ping • For a specific RIOT board ndn-producer • make BOARD=samr21-xpro ndn-rtt • make flash BOARD=samr21-xpro # to flash firmware • make term BOARD=samr21-xpro # to access board via serial interface ndn-template 10 NDN Tutorial – ACM SIGCOMM 2017
NDN Micro Forwarder in browsers • NDN forwarder as a Firefox/Chrome extension, WebSocket written in JavaScript Remote Forwarder • The cross-browser plugin (built Browser upon NDN.JS and the Background MicroForwarder Script WebExtensions API) provides Configuration JSON Messaging Interface PIT FIB shared connectivity to remote forwarders and enables shared Tab Tab CS Content App Content App data cache Script Code Script Code Faces • Allows browser tabs to Port Face Port Face communicate with each other through a local channel even https://github.com/named-data/ndn- when remote connectivity is lost js/tree/master/tools/micro-forwarder 11 NDN Tutorial – ACM SIGCOMM 2017
NDN Tools • ndnping, ndnpingserver • Rechability testing tools • ndncatchunks, ndnputchunks • Segmented file transfer between a consumer and producer • ndnpeek, ndnpoke • Transmit a single packet between a consumer and a producer • ndndump, dissect, wireshark-dissect • Debug NDN packet flow • repo-ng, repo-sql: NDN repositories providing managed persistent storage 12 NDN Tutorial – ACM SIGCOMM 2017
NDN Control Center (macOS, Linux) NDN Forwarding Has route to NDN hub Stack Disabled Stack Enabled Daemon (e.g., NDN testbed) (NFD off) (NFD on) Security Tools Management GUI NDN Control Center NDN Tools NDN Certificate Management https://named-data.net/codebase/applications/ndn-control-center/ An app that provides a simple way to start playing WiFi Ad Hoc with NDN apps Communication 13 NDN Tutorial – ACM SIGCOMM 2017
Libraries 14 NDN Tutorial – ACM SIGCOMM 2017
ndn-cxx: NDN C++ library with eXperimental eXtensions • C++11 • The reference library and security library implementation • Used in: NFD, NLSR, ndn-tools, ChronoChat, etc. • https://named-data.net/doc/ndn-cxx/current/ • Overview • Getting started • Trivial applications • Tutorials • Specifications • Manpages • API documentation (doxygen) • Feedback, suggestions, and contributions are welcome. 15 NDN Tutorial – ACM SIGCOMM 2017
• NDN protocol stack • NFD as NDN packet mux/demuxer • Name prefixes / interface (routing) configuration • (Discovery of local hub & prefixes) • (Local data prefixes propagation) Packet • Identity/Certificate • T o ensure data-centric security Global NDN Packet network /camera / 16 NDN Tutorial – ACM SIGCOMM 2017
Demo https://github.com/cawka/ndn-skeleton-apps/tree/master/ndn-cxx-makefile • Client • Server • ndn::Face face; • ndn::Face face; • // start async • // start async • face.expressInterest ( ndn :: • face.setInterestFilter ( “/some/name” Interest ( “/some/name” ). , onInterest, , onSuccess, onFailure ); setMustBeFresh ( true ), onData, onNack, • face.processEvents(); onTimeout ); • // async onInterest • face.processEvents(); • ndn::Data(“/some/name”); • // async onData • data.setContent(…); • // async onNack • keyChain.sign(data); • // async onTimeout • face.put(data); 17 NDN Tutorial – ACM SIGCOMM 2017
NDN Common Client Libraries (NDN-CPP, NDN-JS, jNDN, PyNDN) • C++, Java, Python, JavaScript, C#, Squirrel • Used in: NDN-RTC, NdnCon, NFD- Android, etc. • https://named- data.net/codebase/platform/ndn-ccl/ • NDN Common Client Libraries API • NDN-CPP API • PyNDN API • NDN-JS API • jNDN API 18 NDN Tutorial – ACM SIGCOMM 2017
Recommend
More recommend