Get started with ndncon quickly

Peter Gusev edited this page Nov 3, 2015 · 3 revisions

To run ndncon on your Mac, you need to install ndn-cxx, NFD and other prerequisites first. There are two ways to install these: building from source and installing from binaries. The followings are brief steps and detailed information is here: Getting started with ndn-cxx, Getting Started with NFD and NFD FAQ. Read the rest of this wiki for advanced usage.

This wiki page focuses on getting started quickly with ndncon by installing the binary version (and using NFD installed via MacPorts).

Quick start for ndncon on MacOS X

Install NFD

(If you don't already have it another way.)

  1. Open Mac App Store, search for Xcode and install it. After installation, open Xcode and agree its terms and conditions.

  2. Install MacPorts and add NDN MacPorts repository:

    If you are not using MacPorts yet, go to the MacPorts website and install the MacPorts package.

There are two options to install NFD - use MacPorts or build from sources. One can choose either way.

  • NFD and related ports are not part of the official MacPorts repository. In order to use these ports, you will need to add the NDN MacPorts repository to your local configuration.

You will need to modify the list of source URLs for MacPorts. Add the following line to /opt/local/etc/macports/sources.conf before or after the default port repository:

  • After this step, you can use sudo port selfupdate to fetch updated port definitions. The following command will install NFD and all prerequisites using MacPorts:
 sudo port install nfd
  • One advantage of using MacPorts is that you can easily upgrade NFD and other packages to the latest version. The following commands will do this job:
 sudo port selfupdate
 sudo port upgrade nfd
NFD from sources
  • Install NFD dependencies:
sudo port install pkgconfig boost sqlite3 libcryptopp
  • Open terminal on Mac, and download ndn-cxx and NFD source code from Github:
## Download ndn-cxx
git clone
## Download NFD
git clone --recursive
  • To install ndn-cxx, change directory to the ndn-cxx root. Enter:
cd _path/to/ndn-cxx_
./waf configure
sudo ./waf install
  • To install NFD, change directory to the NFD root. Enter:
cd _path/to/nfd_
./waf configure
sudo ./waf install

Configure NFD:

  1. Open terminal and enter:
sudo cp /usr/local/etc/ndn/nfd.conf.sample /usr/local/etc/ndn/nfd.conf
  1. Configure NFD security: Open terminal and enter:
ndnsec-keygen /`whoami` | ndnsec-install-cert -
sudo mkdir -p /usr/local/etc/ndn/keys
ndnsec-cert-dump -i /`whoami` > default.ndncert
sudo mv default.ndncert /usr/local/etc/ndn/keys/default.ndncert

Register a route

(If this is not done in another way in your own configuration.)

  1. Start NFD and connect to NDN testbed hub:

Then your Mac will ask your permission to unlock Keychain for NFD, choose "always allow".

Connect to your home hub: find a hub geographically nearby to you on NDN testbed, zoom in and click the hub node icon on the map.

From the hub NFD status webpage, copy the url or ip address from your browser url bar. For example, click REMAP hub, copy the url, and get url like "". Remove "http", "/" and ":" and get "", and then enter:

nfdc register / udp://_hubaddress_(e.g._aleph.ndn.ucla.edu_)

This should output something like this:

Successful in name registration: ControlParameters(Name: /ndn, FaceId: 260, Origin: 255, Cost: 0, Flags: 1, )

Download and Configure ndncon

  1. Download ndncon:

    ndncon download link:

  2. Configure ndncon: Double click ndncon app to open it. Then your Mac will ask your permission to unlock Keychain for ndncon, choose "always allow".

  • Open ndncon Preferences window (click setting button, the one with a gear icon, or hotkey “⌘+,”)

    ndncon Preferences window and setting button

  • Set up prefix and ndncon username; open “General” tab:

    • Fill in a username (avoid using slashes - this will be your ndncon username, the one that other people will see in “Active users” window)

    • Fill in your NDN home hub prefix, which must for now be a prefix routable by your hub. For example, if you connect to REMAP hub, the prefix should be /ndn/edu/ucla/remap (make sure that this prefix corresponds to your home hub’s prefix, otherwise you won’t be discoverable for other ndncon users) You can find all NDN testbed hub prefix here.

Fetch a stream

  • Fetch media stream from active user. Some demo streams should be always available for fetching and should appear when you start ndncon (let us know if can't see any active users!).