XEN networking on Slackware

assuming you went through xen from scratch already

Requirements

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

#!/bin/bash

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
else
    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
fi

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

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

Bridging

mv -i /etc/xen/xl.conf /etc/xen/xl.conf.dist
grep -vE '^#|^$' /etc/xen/xl.conf.dist > /etc/xen/xl.conf
vi /etc/xen/xl.conf

linux bridge

vif.default.script="vif-bridge"
vif.default.bridge="guestbr0"

openvswitch

vif.default.script="vif-openvswitch"

see openvswitch

Resources

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

VLANs

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/

http://ceyes.github.io/2014-07/add-vlan-tag-through-bridge/

trunk + bridge

http://net.doit.wisc.edu/~dwcarder/captivator/linux_trunking_bridging.txt


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