Skip to content

Instantly share code, notes, and snippets.

@mavenugo
Forked from anonymous/gistify846558.md
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mavenugo/e0c6ec0d143875815b1e to your computer and use it in GitHub Desktop.
Save mavenugo/e0c6ec0d143875815b1e to your computer and use it in GitHub Desktop.

Pre-Req

Fedora 20

Configure

sudo yum -y install openvswitch python-openvswitch
sudo service openvswitch stop

sudo ovsdb-tool create /etc/openvswitch/conf.db /usr/share/openvswitch/vswitch.ovsschema
sudo ovsdb-tool create /etc/openvswitch/vtep.db /usr/share/openvswitch/vtep.ovsschema

sudo mkdir -p /var/run/openvswitch
sudo mkdir -p /var/log/openvswitch

sudo ovsdb-server --pidfile --log-file --detach \
--remote=punix:/var/run/openvswitch/db.sock \
--remote=ptcp:6640 \
/etc/openvswitch/conf.db /etc/openvswitch/vtep.db 

sudo ovs-vswitchd --log-file --detach \
--pidfile unix:/var/run/openvswitch/db.sock


udo ovs-vsctl add-br br0
sudo ovs-vsctl add-port br0 eth0
sudo vtep-ctl add-ps br0
sudo vtep-ctl add-port br0 eth0
sudo vtep-ctl set Physical_Switch br0 tunnel_ips=192.168.0.3

sudo /usr/share/openvswitch/scripts/ovs-vtep \
--log-file=/var/log/openvswitch/ovs-vtep.log \
--pidfile=/var/run/openvswitch/ovs-vtep.pid --detach br0

sudo vtep-ctl set-manager ptcp:6640

Verify

sudo ovsdb-client dump hardware_vtep
sudo vtep-ctl list-ps
sudo vtep-ctl list-ports br0

Run the IT

02:27:13.398 [main] TRACE o.o.o.l.j.JsonRpcEndpoint - {"id":"b734b0f4-dd2e-4aaf-bc14-1fb2dd7c3fcd","method":"list_dbs","params":[]}
02:27:13.431 [nioEventLoopGroup-2-1] TRACE o.o.o.l.j.JsonRpcEndpoint - Response : {"id":"b734b0f4-dd2e-4aaf-bc14-1fb2dd7c3fcd","result":["hardware_vtep","Open_vSwitch"],"error":null}
@Mierdin
Copy link

Mierdin commented Jul 9, 2014

Hey buddy, fixed a few typos and added the mvn command.
https://gist.github.com/Mierdin/0c42b5fd06b545a8d791

Just out of curiosity, this is far simpler than getting the docker stuff set up, but obviously less flexible from an OVS version perspective. Would you recommend I get that working, now that hardware vtep is included?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment