diff --git a/HowtoDebian/Reseau.md b/HowtoDebian/Reseau.md index 738eba60..64d45bf9 100644 --- a/HowtoDebian/Reseau.md +++ b/HowtoDebian/Reseau.md @@ -306,6 +306,57 @@ iface bond0 inet static bond-updelay 200 ~~~ +#### Configuration pour un KVM + +Pour une configuration KVM, où l'on souhaiterait avoir plusieurs bridges selon les VLANs, il faut en premier configurer l'interface bond0, puis une interface bond0.XX par VLAN, et un bridge par bond0.XX. L'IP du KVM doit être attribuée au bridge qui supporte le VLAN correspondant. Par exemple, avec un KVM dont l'IP est dans le VLAN 3, et des VMs devant être dans les VLANs 2, 3 et 4 : + +~~~ +# Bond +auto bond0 +iface bond0 inet manual + bond-mode 802.3ad + bond-slaves eno1 eno2 + bond-miimon 100 + bond-downdelay 200 + bond-updelay 200 + +# VLAN2 +## Bond +auto bond0.2 +iface bond0.2 inet manual + +## Bridge +auto bridge_vlan2 +iface bridge_vlan2 inet static + address 192.0.2.1/24 + gateway 192.0.2.254 + bridge_ports bond0.2 + +# VLAN 3 +## Bond +auto bond0.3 +iface bond0.3 inet manual + +## Bridge +auto bridge_vlan3 +iface bridge_vlan3 inet manual + bridge_ports bond0.3 + +# VLAN 4 +## Bond +auto bond0.4 +iface bond0.4 inet manual + +## Bridge +auto bridge_vlan4 +iface bridge_vlan4 inet manual + bridge_ports bond0.4 +~~~ + +L'IP du KVM est 192.0.2.1 dans le VLAN2. Ensuite, le bridge correspondant au VLAN souhaité sera attribué à la VM. + +> Note : Attention à la configuration du bonding selon la version Debian, voir au-dessus. + L'état peut se vérifier dans `/proc/net/bonding/bond0`. ## Ajouter une IPv6