playing around with OVS

tested on slackware

install

    sbopkg -i openvswitch-utils
    #less /usr/doc/openvswitch-utils-2.5.0/README.SLACKWARE
    chmod +x /etc/rc.d/rc.openvswitch

setup

to start it for the first time (not sure we should clean the db at starting… this is not totally rc.inet1 start ready),

    #self verbose
    #/etc/rc.d/rc.openvswitch start
    #/etc/rc.d/rc.openvswitch stop
    /etc/rc.d/rc.openvswitch clean-database
    /etc/rc.d/rc.openvswitch start-clean

    echo -n ovs bridge xenbr0...
    ovs-vsctl add-br xenbr0
    ovs-vsctl add-port xenbr0 eth0
    ip addr flush dev eth0
    ip addr add x.x.x.x/xx dev xenbr0
    ip link set xenbr0 up
    ip link set eth0 up && echo done
    #ovs-vsctl set-controller xenbr0 tcp:x.x.x.x:6633

    echo -n ovs bridge pubbr0...
    ovs-vsctl add-br pubbr0
    ovs-vsctl add-port pubbr0 eth1
    ip addr flush dev eth1
    ip link set pubbr0 up
    ip link set eth1 up && echo done
    ovs-vsctl set-controller pubbr0 tcp:x.x.x.x:6633

    echo ''
    ovs-vsctl show
    echo ''

    echo -n default route...
    route add default gw x.x.x.x && echo done

and to shut it down maybe simply (rc.inet1 stop),

    ifconfig eth0 down
    ifconfig xenbr0 down
    ifconfig eth1 down
    ifconfig pubbr0 down
    #self verbose
    /etc/rc.d/rc.openvswitch stop

Enabling LACP,

    ovs-vsctl add-bond xenbr0 bond0 eth0 eth2 eth3 lacp=active
    #ovs-vsctl set port bond0 lacp=active

eventually add this to your env,

    alias ovs='ovs-vsctl'

resources

Link Aggregation and LACP with Open vSwitch https://blog.scottlowe.org/2012/10/19/link-aggregation-and-lacp-with-open-vswitch/


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun