informatique:systeme:matos:channel_bonding

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
informatique:systeme:matos:channel_bonding [2017/01/24 09:30] – [Channel Bonding en mode 802.3ad (redondance de lien + équilibrage de charge)] bn8informatique:systeme:matos:channel_bonding [2024/02/05 10:44] (Version actuelle) – [Changer d'interface active] bn8
Ligne 59: Ligne 59:
  
 ====== Procédures ====== ====== Procédures ======
 +
 +===== État détaillé d'un bond =====
 +
 +<code bash>ip -d -s -s link ls dev bond0</code>
 +
 +===== Création manuelle d'un bond =====
 +
 +<code>
 +# create the bonding interface with active-backup mode
 +ip link add name bond0 type bond mode active-backup
 +
 +# add the under laying interfaces
 +# the interface, that has been added first, will be active
 +ip link set master bond0 dev eth1
 +ip link set master bond0 dev eth0
 +
 +# enable the bonding interface
 +ip link set up dev bond0
 +ip address add 192.168.100.1/24 dev bond0
 +
 +# check the results: detailed info and statistics of bond0
 +ip -s -s -d link ls dev bond0
 +
 +# check the state of ALL under laying interfaces
 +# with statistics and details 
 +ip -s -s -d link ls master bond0
 +
 +# check the kernel logs
 +journalctl -kn 20
 +</code>
 +
 +Source : https://serverfault.com/a/1064428
  
 ===== Changer d'interface active ===== ===== Changer d'interface active =====
  
-  * Lister les interfaces : <code>cat /sys/devices/virtual/net/bond0/bonding/slaves</code> +  * Lister les interfaces : 
-  * Voir l'interface active : <code>cat /sys/devices/virtual/net/bond0/bonding/primary</code> +    * <code bash>cat /sys/devices/virtual/net/bond0/bonding/slaves</code> 
-  * Changer d'interface active : <code>echo eth1 > /sys/devices/virtual/net/bond0/bonding/primary</code>+    * ou : <code bash>ip link show master bond0</code> 
 +  * Voir l'interface active : <code bash>cat /sys/devices/virtual/net/bond0/bonding/primary</code> 
 +  * Changer d'interface active :  
 +    * <code bash>echo eth1 > /sys/devices/virtual/net/bond0/bonding/primary</code> 
 +    * ou : <code bash>ip link set dev bond0 type bond active_slave eth1</code> 
 + 
 +===== Supprimer/ajouter une interface slave à un bond ===== 
 + 
 +  * Sortir ''eth0'' de son bond actuel : ''ip link set nomaster dev eth0'' 
 +  * Mettre ''eth0'' dans ''bond0'' : ''ip link set master bond0 dev eth0'' 
  • informatique/systeme/matos/channel_bonding.1485250212.txt.gz
  • Dernière modification : 2017/01/24 09:30
  • de bn8