====== Openvswitch ======
{{tag>virtualisation libvirt openvswitch}}
===== Installation =====
Nous installons les paquets
aptitude install openvswitch-switch
===== Configuration =====
Nous adaptons le fichier /etc/network/interfaces pour qu'il ressemble à ceci
auto lo
iface lo inet loopback
auto vmbr0
allow-ovs ovsbr0
iface vmbr0 inet manual
ovs_type OVSBridge
ovs_ports eth0 vlan40 vlan41
mtu 9000
allow-ovsbr0 eth0
iface eth0 inet manual
ovs_type OVSPort
ovs_bridge ovsbr0
ovs_options tag=40 vlan_mode=native-untagged
mtu 9000
allow-ovsbr0 vlan40
iface vlan40 inet static
ovs_type OVSIntPort
ovs_bridge ovsbr0
ovs_options tag=40
ovs_extra set interface ${IFACE} external-ids:iface-id=$(hostname -s)-${IFACE}-vif
address 192.168.40.241
netmask 255.255.255.0
gateway 192.168.40.1
mtu 1500
allow-ovsbr0 vlan41
iface vlan41 inet static
ovs_type OVSIntPort
ovs_bridge ovsbr0
ovs_options tag=41
ovs_extra set interface ${IFACE} external-ids:iface-id=$(hostname -s)-${IFACE}-vif
address 192.168.41.241
netmask 255.255.255.0
gateway 192.168.41.1
mtu 1500
Pour contrôler la configuration
sudo ovs-vsctl show