Skip to content

Instantly share code, notes, and snippets.

Created June 24, 2014 01:31
Show Gist options
  • Save anonymous/a03d3d00945cb60d9879 to your computer and use it in GitHub Desktop.
Save anonymous/a03d3d00945cb60d9879 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/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}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment