Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Get started with ndncon quickly
Clone this wiki locally
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
(If you don't already have it another way.)
Open Mac App Store, search for Xcode and install it. After installation, open Xcode and agree its terms and conditions.
Install MacPorts and add NDN MacPorts repository:
If you are not using MacPorts yet, go to the MacPorts website and install the MacPorts package.
- 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 selfupdateto 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 https://github.com/named-data/ndn-cxx ## Download NFD git clone --recursive https://github.com/named-data/NFD
- To install ndn-cxx, change directory to the ndn-cxx root. Enter:
cd _path/to/ndn-cxx_ ./waf configure ./waf sudo ./waf install
- To install NFD, change directory to the NFD root. Enter:
cd _path/to/nfd_ ./waf configure ./waf sudo ./waf install
- Open terminal and enter:
sudo cp /usr/local/etc/ndn/nfd.conf.sample /usr/local/etc/ndn/nfd.conf
- 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.)
- 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 "http://aleph.ndn.ucla.edu/". Remove "http", "/" and ":" and get "aleph.ndn.ucla.edu", 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
ndncon download link: https://github.com/remap/ndncon/releases
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 “⌘+,”)
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.