OVS
Jump to navigation
Jump to search
Openvswitch
https://wiki.alpinelinux.org/wiki/OpenVSwitch
alpine linux 3.13 changed to use ifupdown-ng by default, mainly replacing netmask by the cidr notation
before
address 10.11.12.0 netmask 255.255.255.0
after
address 10.11.12.0/24
Contents of /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 10.0.12.5
netmask 255.255.255.0
gateway 10.0.12.1
hostname alpine
auto lan eth1 eth2 eth3 eth4
iface eth1 inet manual
up ifconfig eth1 0.0.0.0 up
down ifconfig eth1 down
iface eth2 inet manual
up ifconfig eth2 0.0.0.0 up
down ifconfig eth2 down
iface eth3 inet manual
up ifconfig eth3 0.0.0.0 up
down ifconfig eth3 down
iface eth4 inet manual
up ifconfig eth4 0.0.0.0 up
down ifconfig eth4 down
iface lan inet manual
up ifconfig lan 192.168.1.5 up
down ifconfig lan down
auto wan eth5
iface eth5 inet manual
up ifconfig eth5 0.0.0.0 up
down ifconfig eth5 down
iface wan inet dhcp
iface6 wan inet auto
rc-update show -v rc-update del ovs-modules default rc-update del ovs-vswitchd default rc-update del ovsdb-server default rc-update add ovs-modules boot rc-update add ovs-vswitchd boot rc-update add ovsdb-server boot
ip link set dev eth2 up
ovs-vsctl add-br lan ovs-vsctl add-br wan ovs-vsctl list-br
ovs-vsctl add-port lan eth1 ovs-vsctl add-port lan eth2 ovs-vsctl add-port lan eth3 ovs-vsctl del-port lan eth3 ovs-vsctl list-ports lan
ovs-vsctl add-port lan eth0 ovs-vsctl list-ports wan
ovs-appctl fdb/show voip ovs-appctl fdb/show lan
Contents of /etc/xen/xl.conf
vif.default.script="vif-openvswitch"
vif.default.bridge="lan"