Difference between revisions of "VPP/Pure L3 Container Networking"

From fd.io
< VPP
Jump to: navigation, search
Line 11: Line 11:
 
On each host:
 
On each host:
  
sudo docker create -e MICROSERVICE_LABEL=vpp -it --privileged -v "/tmp/vpp_socket:/tmp" -p 5001:5002 -p 9191:9191 --name vpp --network=host contivvpp/vswitch
+
<code>sudo docker create -e MICROSERVICE_LABEL=vpp -it --privileged -v "/tmp/vpp_socket:/tmp" -p 5001:5002 -p 9191:9191 --name vpp --network=host contivvpp/vswitch</code>
 
   
 
   
 
create file vpp.conf as follows:
 
create file vpp.conf as follows:
  
 +
<code>
 
unix {
 
unix {
nodaemon
+
:nodaemon
cli-listen 0.0.0.0:5002
+
:cli-listen 0.0.0.0:5002
cli-no-pager
+
:cli-no-pager
 
}
 
}
 
dpdk {
 
dpdk {
dev 0000:09:00.0 # replace this with an Ethernet interface on your host
+
:dev 0000:09:00.0 # replace this with an Ethernet interface on your host
uio-driver igb_uio
+
:uio-driver igb_uio
 
}
 
}
+
</code>
sudo docker cp vpp.conf vpp:/etc/vpp/vpp.conf
+
  
 +
then:
 +
 +
<code>
 +
sudo docker cp vpp.conf vpp:/etc/vpp/vpp.conf
 +
<br />
 
sudo docker create -it --name client ubuntu  
 
sudo docker create -it --name client ubuntu  
 +
</code>
  
 
(for the server host change the name to "server")
 
(for the server host change the name to "server")

Revision as of 15:29, 25 October 2017

This example shows how to configure VPP as an IPv4 router interconnecting containers across multiple hosts.

VPP itself runs in the root namespace, with a separate namespace for each container.

File:Vpp-container.pdf

Setup

The 2 hosts are interconnected by a router. The router has /24 routes for the client subnets - pointed at the appropriate vSwitch interfaces.

On each host:

sudo docker create -e MICROSERVICE_LABEL=vpp -it --privileged -v "/tmp/vpp_socket:/tmp" -p 5001:5002 -p 9191:9191 --name vpp --network=host contivvpp/vswitch

create file vpp.conf as follows:

unix {

nodaemon
cli-listen 0.0.0.0:5002
cli-no-pager

} dpdk {

dev 0000:09:00.0 # replace this with an Ethernet interface on your host
uio-driver igb_uio

}

then:

sudo docker cp vpp.conf vpp:/etc/vpp/vpp.conf
sudo docker create -it --name client ubuntu

(for the server host change the name to "server")