XEN networking on Slackware

assuming you went through xen from scratch already


slackpkg bridge-utils vlan

Linux Bridge

mv -i /etc/rc.d/rc.inet1 /etc/rc.d/rc.inet1.dist
chmod -x /etc/rc.d/rc.inet1.dist
vi /etc/rc.d/rc.inet1


echo rc.inet1 PATH is $PATH

if [[ $1 = stop || $1 = down ]]; then
            route delete default
            ifconfig xenbr0 down
            ifconfig eth0 down
            #ifconfig br0 down
            #ifconfig eth1 down
            ifconfig lo down
    echo -n lo...
    ifconfig lo up && echo done

    #echo -n cluster bridge...
    #brctl addbr br0
    #brctl addif br0 eth1
    #ifconfig br0 x.x.x.x/xx up && echo done
    #ifconfig eth1 up

    echo -n default bridge...
    brctl addbr xenbr0
    brctl addif xenbr0 eth0
    ifconfig xenbr0 x.x.x.x/xx up && echo done
    ifconfig eth0 up

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

    brctl show

chmod +x /etc/rc.d/rc.inet1

now if you want link aggregation - you can mix this with bonding

OpenvSwitch (and SDN)

cp -pi /etc/xen/xl.conf /etc/xen/xl.conf.dist
vi /etc/xen/xl.conf


install OVS

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

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'


linux bridge

bridge https://wiki.linuxfoundation.org/networking/bridge

Bridging Network Connections https://wiki.debian.org/BridgeNetworkConnections

Network bridge https://wiki.archlinux.org/title/Network_bridge

Troubleshooting Ethernet bridging on Linux http://www.microhowto.info/troubleshooting/troubleshooting_ethernet_bridging_on_linux.html

Bridge not working https://unix.stackexchange.com/questions/48265/bridge-not-working

  1. What Is A Bridge? https://tldp.org/HOWTO/BRIDGE-STP-HOWTO/what-is-a-bridge.html


KVM & BRCTL in Linux – bringing VLANs to the guests http://blog.davidvassallo.me/2012/05/05/kvm-brctl-in-linux-bringing-vlans-to-the-guests/


trunk + bridge


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

Copyright © 2022 Pierre-Philipp Braun