Skip to content

Instantly share code, notes, and snippets.

@pichuang
Last active August 26, 2021 16:39
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save pichuang/9b362f802f40913c4b8f to your computer and use it in GitHub Desktop.
Save pichuang/9b362f802f40913c4b8f to your computer and use it in GitHub Desktop.
Installing new version of Open vSwitch 2.3.0 use Mininet
#!/bin/sh -ev
# Reference: https://github.com/mininet/mininet/wiki/Installing-new-version-of-Open-vSwitch
# How to test: ovs-vsctl -V
# Check permission
test $(id -u) -ne 0 && echo "This script must be run as root" && exit 0
#Remove old version ovs
aptitude remove openvswitch-common openvswitch-datapath-dkms openvswitch-controller openvswitch-pki openvswitch-switch -y
#Install new version ovs
cd /tmp
wget http://openvswitch.org/releases/openvswitch-2.3.0.tar.gz
tar zxvf openvswitch-2.3.0.tar.gz
cd openvswitch-2.3.0
./configure --prefix=/usr --with-linux=/lib/modules/`uname -r`/build
make
make install
make modules_install
rmmod openvswitch
depmod -a
# Say goodbye to openvswitch-controller
/etc/init.d/openvswitch-controller stop
update-rc.d openvswitch-controller disable
#Start new version ovs
/etc/init.d/openvswitch-switch start
#Clean ovs
rm -rf /tmp/openvswitch-2.3.0*
@AlPazinou
Copy link

Hello , thanks for this script
I was using ovs 1.0 , and ping between hosts was working fine
after I upgraded ovs using this script , ping didn't work
I didn't know where's the problem ?

@fr6nco
Copy link

fr6nco commented Oct 19, 2017

worked like a charm for 2.8.1, thank you :)

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