Difference between revisions of "Cicn-plugin"
(Created page with "= FD.IO CICN project: VPP plugin = The CICN forwarder. == Quick Start == <pre>Pull the code from fd.io $ git clone https://gerrit.fd.io/r/cicn --branch cicn-plugin/master $...") |
m (→Configure VPP) |
||
(17 intermediate revisions by 4 users not shown) | |||
Line 5: | Line 5: | ||
== Quick Start == | == Quick Start == | ||
+ | === Install the dependencies === | ||
+ | For the CICN plugin, you need VPP 17.07. For that do the following: | ||
+ | |||
+ | ==== Ubuntu ==== | ||
+ | Add the repositories for VPP 17.07 and for the fd.io master branch. Edit the /etc/apt/sources.list.d/99fd.io.list file by running the following commands in a shell: | ||
+ | $ echo "deb [trusted=yes] https://nexus.fd.io/content/repositories/fd.io.stable.1707.ubuntu.$(lsb_release -sc).main/ ./" \ | ||
+ | | sudo tee -a /etc/apt/sources.list.d/99fd.io.list | ||
+ | $ echo "deb [trusted=yes] https://nexus.fd.io/content/repositories/fd.io.master.ubuntu.$(lsb_release -sc).main/ ./" \ | ||
+ | | sudo tee -a /etc/apt/sources.list.d/99fd.io.list | ||
+ | |||
+ | |||
+ | Set 17.04 as the priority version for CICN: edit the /etc/apt/preferences.d/99fd.io.pref file with your favorite editor and write the following: | ||
+ | Package: vpp* | ||
+ | Pin: version 17.07.01-release | ||
+ | Pin-Priority: 1001 | ||
+ | |||
+ | Package: vpp-dpdk* | ||
+ | Pin: version 17.05-vpp6 | ||
+ | Pin-Priority: 1001 | ||
+ | |||
+ | Then update your repositories: | ||
+ | $ sudo apt-get update | ||
+ | |||
+ | |||
+ | You now have two possibilities for installing the CICN plugin: from the packages or from source. | ||
+ | |||
+ | === Install from repositories === | ||
+ | $ sudo apt-get install cicn-plugin | ||
+ | |||
+ | |||
+ | === Compile the plugin from source === | ||
<pre>Pull the code from fd.io | <pre>Pull the code from fd.io | ||
− | $ git clone https://gerrit.fd.io/r/cicn | + | $ git clone -b cicn-plugin/master https://gerrit.fd.io/r/cicn cicn-plugin |
− | $ cd cicn | + | $ cd cicn-plugin |
Using automake | Using automake | ||
Line 14: | Line 45: | ||
$ mkdir -p build | $ mkdir -p build | ||
$ cd build | $ cd build | ||
− | $ ../configure | + | $ ../configure |
OR, to omit UT code | OR, to omit UT code | ||
− | $ ../configure | + | $ ../configure --without-cicn-test |
$ make | $ make | ||
$ sudo make install | $ sudo make install | ||
Line 29: | Line 60: | ||
$ make | $ make | ||
$ sudo make install</pre> | $ sudo make install</pre> | ||
+ | |||
== Introduction == | == Introduction == | ||
Line 55: | Line 87: | ||
Build dependencies: | Build dependencies: | ||
− | * VPP 17. | + | * VPP 17.07 |
Hardware dependencies: | Hardware dependencies: | ||
Line 91: | Line 123: | ||
<pre class="shell">unix { | <pre class="shell">unix { | ||
nodaemon | nodaemon | ||
− | log / | + | log /var/log/vpp/vpp.log |
full-coredump | full-coredump | ||
} | } | ||
Line 124: | Line 156: | ||
===== Configure VPP interfaces ===== | ===== Configure VPP interfaces ===== | ||
− | ICN communications run on top of IP and | + | ICN communications run on top of IP and UDP (encap), therefore we need to assign an IP address to the DPDK interface that enables IP connectivity through that interface: |
<pre class="shell">Set an IP address on the DPDK interface | <pre class="shell">Set an IP address on the DPDK interface | ||
Line 131: | Line 163: | ||
Bring the interface up | Bring the interface up | ||
$ sudo vppctl set int state GigabitEthernet0/8/0 up</pre> | $ sudo vppctl set int state GigabitEthernet0/8/0 up</pre> | ||
− | <code>GigabitEthernet0/8/0</code> is the name that VPP assigned to the DPDK interface. It must be replaced with the actual name of the DPDK interface ([https://docs.fd.io/vpp/17. | + | <code>GigabitEthernet0/8/0</code> is the name that VPP assigned to the DPDK interface. It must be replaced with the actual name of the DPDK interface ([https://docs.fd.io/vpp/17.04/clicmd_vnet_vnet.html#clicmd_show_interfaces <code>sudo vppctl show interfaces</code>] shows the available interfaces in VPP). |
===== Configure and start CICN ===== | ===== Configure and start CICN ===== | ||
Line 138: | Line 170: | ||
<pre class="shell">Start CICN plugin | <pre class="shell">Start CICN plugin | ||
− | $ sudo vppctl cicn | + | $ sudo vppctl cicn control start |
Create a face for the DPDK interface | Create a face for the DPDK interface | ||
Line 146: | Line 178: | ||
Add a FIB entry | Add a FIB entry | ||
$ sudo vppctl cicn cfg fib add prefix /cicn face 1</pre> | $ sudo vppctl cicn cfg fib add prefix /cicn face 1</pre> | ||
− | * <code>10.0.0.1:33302</code> must be replaced with the IP address assigned to the DPDK interface in the previous step. The | + | * <code>10.0.0.1:33302</code> must be replaced with the IP address assigned to the DPDK interface in the previous step. The UDP port can be chosen as desired. |
* <code>10.0.0.2:33302</code> must be replaced with the IP address assigned to the remote host we want to connect to. | * <code>10.0.0.2:33302</code> must be replaced with the IP address assigned to the remote host we want to connect to. | ||
* <code>/cicn</code> must be replaced with the ICN prefix to forward through face 1. | * <code>/cicn</code> must be replaced with the ICN prefix to forward through face 1. | ||
Line 178: | Line 210: | ||
Changes on PIT, FIB and CS can be made only before starting CICN. | Changes on PIT, FIB and CS can be made only before starting CICN. | ||
+ | |||
+ | == Older Versions == | ||
+ | |||
+ | The following versions are no longer supported. Improvements and bugfixes will be available only on the latest cicn-plugin version. | ||
+ | |||
+ | * [[Cicn-plugin_17.04.02]] | ||
== License == | == License == |
Latest revision as of 14:24, 31 January 2018
Contents
FD.IO CICN project: VPP plugin
The CICN forwarder.
Quick Start
Install the dependencies
For the CICN plugin, you need VPP 17.07. For that do the following:
Ubuntu
Add the repositories for VPP 17.07 and for the fd.io master branch. Edit the /etc/apt/sources.list.d/99fd.io.list file by running the following commands in a shell:
$ echo "deb [trusted=yes] https://nexus.fd.io/content/repositories/fd.io.stable.1707.ubuntu.$(lsb_release -sc).main/ ./" \ | sudo tee -a /etc/apt/sources.list.d/99fd.io.list $ echo "deb [trusted=yes] https://nexus.fd.io/content/repositories/fd.io.master.ubuntu.$(lsb_release -sc).main/ ./" \ | sudo tee -a /etc/apt/sources.list.d/99fd.io.list
Set 17.04 as the priority version for CICN: edit the /etc/apt/preferences.d/99fd.io.pref file with your favorite editor and write the following:
Package: vpp* Pin: version 17.07.01-release Pin-Priority: 1001
Package: vpp-dpdk* Pin: version 17.05-vpp6 Pin-Priority: 1001
Then update your repositories:
$ sudo apt-get update
You now have two possibilities for installing the CICN plugin: from the packages or from source.
Install from repositories
$ sudo apt-get install cicn-plugin
Compile the plugin from source
Pull the code from fd.io $ git clone -b cicn-plugin/master https://gerrit.fd.io/r/cicn cicn-plugin $ cd cicn-plugin Using automake $ cd cicn-plugin $ autoreconf -i -f $ mkdir -p build $ cd build $ ../configure OR, to omit UT code $ ../configure --without-cicn-test $ make $ sudo make install Using cmake $ cd cicn-plugin $ mkdir -p build $ cd build $ cmake .. Or, to omit UT code $ cmake .. -DNO_UNIT_TEST=TRUE $ make $ sudo make install
Introduction
The high-performance CCNx ICN forwarder as a plugin to VPP.
The plugin provides the following functionalities:
- Fast packet processing
- Interest aggregation
- Content caching
Using CICN plugin
Platforms
CICN has been tested in:
- Ubuntu 16.04 LTS (x86_64)
- Ubuntu 14.04 LTS (x86_64)
- Debian Stable/Testing (2017-03-01)
- Red Hat Enterprise Linux 7
- CentOS 7
Dependencies
Build dependencies:
- VPP 17.07
Hardware dependencies:
- DPDK compatible nic
Getting started
In order to start, the CICN plugin requires a running instance of VPP and at least one DPDK compatible nic. The steps required to successfully start CICN are:
- Setup the host to run VPP
- Configure VPP to use DPDK compatible nics
- Start VPP
- Configure VPP interfaces
- Configure and start CICN
Detailed information for configuring VPP can be found at https://wiki.fd.io/view/VPP.
Setup the host for VPP
VPP requires the uio
and igb_uio
modules to be loaded in the kernel:
$ sudo modprobe uio $ sudo modprobe igb_uio
Hugepages must be enabled in the system:
$ sudo sysctl -w vm.nr_hugepages=1024
If the DPDK interface we want to assign to VPP is up, we must bring it down:
$ sudo ifconfig <interface_name> down
Configure VPP
The file /etc/vpp/startup.conf contains a set of parameters to setup VPP at startup. The following example sets up VPP to use a DPDK interfaces:
unix { nodaemon log /var/log/vpp/vpp.log full-coredump } api-trace { on } api-segment { gid vpp } dpdk { socket-mem 1024 dev 0000:08:00.0 }
Where 0000:08:00.0
must be replaced with the actual PCI address of the DPDK interface.
Start VPP
VPP can be started as a process or a service:
Start VPP as a service in Ubuntu 16.04 $ sudo systemctl start vpp Start VPP as a service in Ubuntu 14.04 $ sudo service vpp start Start VPP as a process in both 16.04 and 14.04 $ sudo vpp -c /etc/vpp/startup.conf
Configure VPP interfaces
ICN communications run on top of IP and UDP (encap), therefore we need to assign an IP address to the DPDK interface that enables IP connectivity through that interface:
Set an IP address on the DPDK interface $ sudo vppctl set int ip address GigabitEthernet0/8/0 10.0.0.1/24 Bring the interface up $ sudo vppctl set int state GigabitEthernet0/8/0 up
GigabitEthernet0/8/0
is the name that VPP assigned to the DPDK interface. It must be replaced with the actual name of the DPDK interface (sudo vppctl show interfaces
shows the available interfaces in VPP).
Configure and start CICN
The following three commands enable CICN, set a face pointing to a remote host and add an entry in the FIB:
Start CICN plugin $ sudo vppctl cicn control start Create a face for the DPDK interface $ sudo vppctl cicn cfg face add local 10.0.0.1:33302 remote 10.0.0.2:33302 Face ID: 1 Add a FIB entry $ sudo vppctl cicn cfg fib add prefix /cicn face 1
-
10.0.0.1:33302
must be replaced with the IP address assigned to the DPDK interface in the previous step. The UDP port can be chosen as desired. -
10.0.0.2:33302
must be replaced with the IP address assigned to the remote host we want to connect to. -
/cicn
must be replaced with the ICN prefix to forward through face 1.
CICN commands
A full list of the available commands for CICN is available through:
-
sudo vppctl cicn help
If help
is passed as a paramenter to a CICN command, the output will display information about the syntax of the command.
CICN statistics
A fine grained set of statistic for the ongoing communication is available through:
-
sudo vppctl cicn show
Setting PIT, FIB and CS parameters
If needed, it is possible to change the default values for the three CICN internal structures. The customizable parameters and the corresponding commands are:
- PIT size:
-
sudo vppctl cicn control param pit size <# of entries>
-
- PIT entry lifetime (default, min and max):
-
sudo vppctl cicn control param pit {dfltlife | minlife | maxlife} <seconds>
-
- FIB size:
-
sudo vppctl cicn control param fib size <# of entries>
-
- CS size:
-
sudo vppctl cicn control param cs size <# of entries>
-
Changes on PIT, FIB and CS can be made only before starting CICN.
Older Versions
The following versions are no longer supported. Improvements and bugfixes will be available only on the latest cicn-plugin version.
License
This software is distributed under the following license:
/* * Copyright (c) 2017 Cisco and/or its affiliates. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */