====== Openvswitch ======
{{tag>Virtualisation Proxmox Openvswitch}}
Nous installons Openvswitch
sudo aptitude install openvswitch-switch
===== Configuration =====
Nous éditons le fichier /etc/network/interfaces et y ajoutons la configuration suivante
auto lo
iface lo inet loopback
auto vmbr0
allow-ovs vmbr0
iface vmbr0 inet manual
ovs_type OVSBridge
ovs_ports eno1 vlan10 vlan11 vlan12 vlan20
mtu 9000
allow-vmbr0 eno1
iface eno1 inet manual
ovs_type OVSPort
ovs_bridge vmbr0
ovs_options tag=10 vlan_mode=native-untagged
mtu 9000
allow-vmbr0 vlan10
iface vlan10 inet static
ovs_type OVSIntPort
ovs_bridge vmbr0
ovs_options tag=10
ovs_extra set interface ${IFACE} external-ids:iface-id=$(hostname -s)-${IFACE}-vif
address 192.168.10.2
netmask 255.255.255.0
gateway 192.168.10.254
mtu 1500
#Network vlan
allow-vmbr0 vlan11
iface vlan11 inet static
ovs_type OVSIntPort
ovs_bridge vmbr0
ovs_options tag=11
ovs_extra set interface ${IFACE} external-ids:iface-id=$(hostname -s)-${IFACE}-vif
address 192.168.11.1
netmask 255.255.255.0
gateway 192.168.11.254
mtu 1500
#Servers vlan
allow-vmbr0 vlan12
iface vlan12 inet static
ovs_type OVSIntPort
ovs_bridge vmbr0
ovs_options tag=12
ovs_extra set interface ${IFACE} external-ids:iface-id=$(hostname -s)-${IFACE}-vif
address 192.168.12.1
netmask 255.255.255.0
gateway 192.168.12.254
mtu 1500
#Containers vlan
allow-vmbr0 vlan20
iface vlan20 inet static
ovs_type OVSIntPort
ovs_bridge vmbr0
ovs_options tag=20
ovs_extra set interface ${IFACE} external-ids:iface-id=$(hostname -s)-${IFACE}-vif
address 192.168.20.1
netmask 255.255.255.0
gateway 192.168.20.254
mtu 1500
#VOIP vlan