Veuillez noter : Ce site Web comprend un système d'accessibilité. Appuyez sur Ctrl-F11 pour adapter le site Web aux malvoyants qui utilisent un lecteur d'écran ; Appuyez sur Ctrl-F10 pour ouvrir un menu d'accessibilité.

Mise en réseau hôte AHV

Mise en réseau hôte AHV

Mise en réseau hôte AHV

Cet article a été traduit automatiquement, veuillez cliquer ici pour afficher la version originale rédigée en anglais.

Description

La mise en réseau AHV est couverte dans la documentation disponible sur le portail de support Nutanix.

Solution

Remarque : N'utilisez aucune de ces commandes sur les interfaces User VM ou CVM (interfaces vnet).

Sujets couverts:

Ouvrir la configuration du vSwitch

Les hôtes Nutanix AHV sont livrés avec Open vSwitch préconfiguré. La commande 'ovs-vsctl show' imprimera un aperçu de la configuration d'Open vSwitch :

 [root@ahv ~]#  ovs-vsctl show e0d89b99-335d-417f-9fd1-4a0cb8db711e    Bridge "br0"        Port "br0"            Interface "br0"                type: internal        Port "vnet0"            Interface "vnet0"        Port "bond0"            Interface "eth2"            Interface "eth1"            Interface "eth0"    ovs_version: "1.10.0"

Il existe un pont nommé « br0 » avec plusieurs ports.

  • Le port "br0" est une interface interne sur le pont br0. Il s'agit de l'interface de gestion externe de l'hôte AHV.
  • Le port "vnet0" est un port d'interface virtuel utilisé par le CVM (Controller VM).
  • Le port « bond0 » ou port « br0-up » est un port lié contenant plusieurs interfaces physiques de l'hôte AHV.

Remarque : dans AOS 5.5, le chaînage de ponts a été introduit et, par conséquent, vous pouvez voir plus de ponts dans la sortie « ovs-vsctl show ».
[ Retour au sommet ]

Utilitaire manage_ovs

Nutanix fournit un utilitaire appelé « manage_ovs », qui est installé sur chaque CVM et doit être utilisé pour gérer la configuration Open vSwitch sur l'hôte AHV. Voir la sortie "manage_ovs --helpshort" pour plus de détails sur l'utilisation.

Exemple de sortie d’AOS 5.10.2 :

 nutanix@cvm$ manage_ovs --helpshort USAGE: manage_ovs [flags] Where is one of the following: show_bridges: Shows a list of the uplink bridges. show_interfaces: Shows a list of host physical interfaces. show_uplinks: Shows the current uplink configuration for the OVS bridge. update_uplinks: Updates the uplink configuration for the OVS bridge. enable_bridge_chain: Enables bridge chaining on the host. disable_bridge_chain: Disables bridge chaining on the host. create_single_bridge: Adds one OVS bridge to the host. delete_single_bridge: Removes one OVS bridge from the host. The update_uplinks action requires the --interfaces flag, which indicates the desired set of uplinks for the OVS bridge. The script will remove any existing uplinks from the bridge, and replace them with the specified set of uplinks on a single bonded port. flags: /usr/local/nutanix/cluster/bin/manage_ovs: --bond_mode: Bond mode to use: active-backup, balance-slb, or balance-tcp (default: 'active-backup') --bond_name: Bond name to use --bridge_name: Openvswitch on which to operate (default: '') --[no]dry_run: Just print what would be done instead of doing it (default: 'false') --[no]enable_vlan_splinters: Enable VLAN splintering on uplink interfaces (default: 'true') --[no]force: Reconfigure the bridge even if the the set of uplinks has not changed (default: 'false') -?,--[no]help: show this help --[no]helpshort: show usage only for this module --[no]helpxml: like --help, but generates XML output --host: Host on which to operate (default: '192.168.5.1') --interfaces: Comma-delimited list of interfaces to configure as bridge uplinks, or a keyword based on the NIC speed: all, 100g, 40g, 10g, 1g, etc. --[no]json: Output in json format. (default: 'false') --lacp_fallback: If LACP negotiation fails, set the bond_mode to active-backup: true, false (default: 'true') --lacp_mode: LACP mode for the uplink bond: off, slow, or fast (default: 'off') --mtu: Maximum transmission unit (an integer) --num_arps: Number of gratuitous ARPs to send on the bridge interface after updating uplinks (default: '3') (an integer) --[no]prevent_network_loop: Enables network loop prevention when bridge chain is enabled. (default: 'false') --[no]require_link: Require that at least one uplink has link status (default: 'true') 
  nutanix@cvm$ manage_ovs --helpshort USAGE: manage_ovs [flags] Where is one of the following: show_bridges: Shows a list of the uplink bridges. show_interfaces: Shows a list of host physical interfaces. show_uplinks: Shows the current uplink configuration for the OVS bridge. update_uplinks: Updates the uplink configuration for the OVS bridge. enable_bridge_chain: Enables bridge chaining on the host. disable_bridge_chain: Disables bridge chaining on the host. create_single_bridge: Adds one OVS bridge to the host. delete_single_bridge: Removes one OVS bridge from the host. The update_uplinks action requires the --interfaces flag, which indicates the desired set of uplinks for the OVS bridge. The script will remove any existing uplinks from the bridge, and replace them with the specified set of uplinks on a single bonded port. flags: /usr/local/nutanix/cluster/bin/manage_ovs: --bond_mode: Bond mode to use: active-backup, balance-slb, or balance-tcp (default: 'active-backup') --bond_name: Bond name to use --bridge_name: Openvswitch on which to operate (default: '') --[no]dry_run: Just print what would be done instead of doing it (default: 'false') --[no]enable_vlan_splinters: Enable VLAN splintering on uplink interfaces (default: 'true') --[no]force: Reconfigure the bridge even if the the set of uplinks has not changed (default: 'false') -?,--[no]help: show this help --[no]helpshort: show usage only for this module --[no]helpxml: like --help, but generates XML output --host: Host on which to operate (default: '192.168.5.1') --interfaces: Comma-delimited list of interfaces to configure as bridge uplinks, or a keyword based on the NIC speed: all, 100g, 40g, 10g, 1g, etc. --[no]json: Output in json format. (default: 'false') --lacp_fallback: If LACP negotiation fails, set the bond_mode to active-backup: true, false (default: 'true') --lacp_mode: LACP mode for the uplink bond: off, slow, or fast (default: 'off') --mtu: Maximum transmission unit (an integer) --num_arps: Number of gratuitous ARPs to send on the bridge interface after updating uplinks (default: '3') (an integer) --[no]prevent_network_loop: Enables network loop prevention when bridge chain is enabled. (default: 'false') --[no]require_link: Require that at least one uplink has link status (default: 'true')
   
   nutanix@cvm$ manage_ovs --helpshort USAGE: manage_ovs [flags] Where is one of the following: show_bridges: Shows a list of the uplink bridges. show_interfaces: Shows a list of host physical interfaces. show_uplinks: Shows the current uplink configuration for the OVS bridge. update_uplinks: Updates the uplink configuration for the OVS bridge. enable_bridge_chain: Enables bridge chaining on the host. disable_bridge_chain: Disables bridge chaining on the host. create_single_bridge: Adds one OVS bridge to the host. delete_single_bridge: Removes one OVS bridge from the host. The update_uplinks action requires the --interfaces flag, which indicates the desired set of uplinks for the OVS bridge. The script will remove any existing uplinks from the bridge, and replace them with the specified set of uplinks on a single bonded port. flags: /usr/local/nutanix/cluster/bin/manage_ovs: --bond_mode: Bond mode to use: active-backup, balance-slb, or balance-tcp (default: 'active-backup') --bond_name: Bond name to use --bridge_name: Openvswitch on which to operate (default: '') --[no]dry_run: Just print what would be done instead of doing it (default: 'false') --[no]enable_vlan_splinters: Enable VLAN splintering on uplink interfaces (default: 'true') --[no]force: Reconfigure the bridge even if the the set of uplinks has not changed (default: 'false') -?,--[no]help: show this help --[no]helpshort: show usage only for this module --[no]helpxml: like --help, but generates XML output --host: Host on which to operate (default: '192.168.5.1') --interfaces: Comma-delimited list of interfaces to configure as bridge uplinks, or a keyword based on the NIC speed: all, 100g, 40g, 10g, 1g, etc. --[no]json: Output in json format. (default: 'false') --lacp_fallback: If LACP negotiation fails, set the bond_mode to active-backup: true, false (default: 'true') --lacp_mode: LACP mode for the uplink bond: off, slow, or fast (default: 'off') --mtu: Maximum transmission unit (an integer) --num_arps: Number of gratuitous ARPs to send on the bridge interface after updating uplinks (default: '3') (an integer) --[no]prevent_network_loop: Enables network loop prevention when bridge chain is enabled. (default: 'false') --[no]require_link: Require that at least one uplink has link status (default: 'true')
   
  nutanix@cvm$ manage_ovs --helpshort USAGE: manage_ovs [flags] Where is one of the following: show_bridges: Shows a list of the uplink bridges. show_interfaces: Shows a list of host physical interfaces. show_uplinks: Shows the current uplink configuration for the OVS bridge. update_uplinks: Updates the uplink configuration for the OVS bridge. enable_bridge_chain: Enables bridge chaining on the host. disable_bridge_chain: Disables bridge chaining on the host. create_single_bridge: Adds one OVS bridge to the host. delete_single_bridge: Removes one OVS bridge from the host. The update_uplinks action requires the --interfaces flag, which indicates the desired set of uplinks for the OVS bridge. The script will remove any existing uplinks from the bridge, and replace them with the specified set of uplinks on a single bonded port. flags: /usr/local/nutanix/cluster/bin/manage_ovs: --bond_mode: Bond mode to use: active-backup, balance-slb, or balance-tcp (default: 'active-backup') --bond_name: Bond name to use --bridge_name: Openvswitch on which to operate (default: '') --[no]dry_run: Just print what would be done instead of doing it (default: 'false') --[no]enable_vlan_splinters: Enable VLAN splintering on uplink interfaces (default: 'true') --[no]force: Reconfigure the bridge even if the the set of uplinks has not changed (default: 'false') -?,--[no]help: show this help --[no]helpshort: show usage only for this module --[no]helpxml: like --help, but generates XML output --host: Host on which to operate (default: '192.168.5.1') --interfaces: Comma-delimited list of interfaces to configure as bridge uplinks, or a keyword based on the NIC speed: all, 100g, 40g, 10g, 1g, etc. --[no]json: Output in json format. (default: 'false') --lacp_fallback: If LACP negotiation fails, set the bond_mode to active-backup: true, false (default: 'true') --lacp_mode: LACP mode for the uplink bond: off, slow, or fast (default: 'off') --mtu: Maximum transmission unit (an integer) --num_arps: Number of gratuitous ARPs to send on the bridge interface after updating uplinks (default: '3') (an integer) --[no]prevent_network_loop: Enables network loop prevention when bridge chain is enabled. (default: 'false') --[no]require_link: Require that at least one uplink has link status (default: 'true')
 

AOS 5.19 ou version ultérieure

Il est possible de gérer la configuration du réseau hôte à l'aide de Prism Element ou de Prism Central UI. Reportez-vous au chapitre À propos du commutateur virtuel pour plus d'informations sur les commutateurs virtuels. Reportez-vous au chapitre Création ou mise à jour d'un commutateur virtuel pour plus d'informations sur la façon de gérer les commutateurs virtuels.
[ Retour au sommet ]

Informations Complémentaires

Étapes pour ajouter ou supprimer la balise VLAN de l'hôte CVM et AHV

Effectuez toutes les modifications de l'hôte AHV et du réseau CVM en vous connectant à l'hôte à l'aide d'IPMI et en ouvrant une console distante. Effectuer des modifications VLAN au niveau du commutateur physique sans coordonner les modifications d'hôte selon ces étapes peut entraîner des problèmes d'accès et de connectivité CVM et potentiellement conduire à un temps d'arrêt d'UVM et au cluster non accessible depuis Prism Central ou Prism Element jusqu'à ce que la configuration VLAN soit terminée. ou toute inadéquation est résolue. Il est recommandé d'effectuer ces modifications un hôte/CVM/liaison de liaison montante/port de commutation à la fois en mode maintenance, en complétant un seul hôte/CVM et en le remettant en ligne avant de passer au suivant. Voir KB4639 - Comment placer le CVM et l'hôte en mode maintenance
Voir également : Guide d'administration AHV / Gestion du réseau de couche 2 avec Open vSwitch / Configuration VLAN

Pour modifier le VLAN sur l'hôte AHV, exécutez la commande suivante :

 [root@ahv ~]# ovs-vsctl set port br0 tag=<vlan tag>

Remarque : assurez-vous de mettre à jour le port br0 et non le port br0-up ou bond0. Si le VLAN est attribué à br0-up ou bond0, le CVM et l'hôte risquent de perdre la connectivité réseau. Si le VLAN a été attribué à br-up ou bond0, exécutez la commande suivante pour le supprimer :

 [root@ahv ~]# ovs-vsctl remove port br0-up tag <vlan tag>

Utilisez la commande "ovs-vsctl show" pour vérifier les modifications. La configuration correcte devrait ressembler à ceci :

 [root@ahv ~]# ovs-vsctl show ... Bridge "br0" ... Port "br0-up" Interface "eth2" Interface "eth3" Port "br0" tag: 1234 <<<<< Correct vlan tag location for AHV host Interface "br0" type: internal ...

Pour modifier le VLAN sur le CVM, exécutez la commande suivante avec la balise VLAN (marquée X) que vous souhaitez configurer :

 nutanix@cvm$ change_cvm_vlan <vlan tag>

Remarque : N'utilisez pas la commande ovs-vsctl de l'hôte AHV pour définir la balise VLAN pour le CVM (sur vnet0). Utilisez plutôt la commande change_cvm_vlan de CVM.

Pour supprimer la balise VLAN de l'hôte AHV, exécutez la commande suivante après avoir ouvert la console distante :

 [root@ahv ~]# ovs-vsctl set port br0 tag=0

Pour supprimer le balisage VLAN de CVM, suivez cette procédure :

  • Connectez-vous à l'hôte AHV via la console distante
  • SSH de l'hôte vers le CVM (toujours SSH à l'adresse 192.168.5.254) :
     [root@ahv ~]# ssh nutanix@192.168.5.254
  • Exécutez la commande suivante sur le CVM :
     nutanix@cvm$ change_cvm_vlan --remove

[ Retour au sommet ]

Configuration LACP

Suivez KB-3263 Comment activer, désactiver et vérifier LACP dans AHV.

Comment trouver l'adresse MAC d'une carte réseau hôte

  • Exécutez la commande suivante sur l'hôte AHV :
 [root@ahv ~]# ethtool -P <interface>

Exemple de sortie :

 [root@ahv ~]# ethtool -P eth3 Permanent address: 00:25:90:cb:39:27
  • Exécutez la commande suivante sur l'hôte AHV :
 [root@ahv ~]# ifconfig <interface>

Exemple de sortie :

 [root@ahv ~]# ifconfig eth3 eth3 Link encap:Ethernet HWaddr 00:25:90:CB:39:27 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:46857327754 errors:0 dropped:228250 overruns:0 frame:0 TX packets:49134503170 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:49893674683483 (45.3 TiB) TX bytes:54855610562476 (49.8 TiB)


[ Retour au sommet ]

Comment sélectionner une carte réseau active en mode liaison de sauvegarde active

Par défaut, pendant le démarrage, AHV sélectionne de manière aléatoire l'une des cartes réseau en liaison et la rend active. Toutes les autres cartes réseau se voient attribuer des rôles de sauvegarde et elles ne seront activées qu'en cas de panne de la carte réseau active.
Si vous souhaitez définir une carte réseau préférée comme principale, vous pouvez utiliser la commande suivante (AOS 5.15.4 et versions ultérieures) :

 ovs-vsctl set port other_config:bond-primary= 
  ovs-vsctl set port other_config:bond-primary=
   
  ovs-vsctl set port other_config:bond-primary=
 

Par exemple:

 ovs-vsctl set port br0-up other_config:bond-primary=eth2

Pour vérifier quelle carte réseau est active et/ou préférée, connectez-vous à l'hôte AHV et exécutez la commande suivante :

 [root@ahv ~]# ovs-appctl bond/show

Dans le résultat de la commande, l'interface active sera marquée comme esclave actif . Dans l'exemple ci-dessous, eth3 est une interface active dans br0-up bond :

 [root@ahv ~]# ovs-appctl bond/show ---- br0-up ---- bond_mode: active-backup active-backup primary: eth2 ... slave eth2: enabled may_enable: true slave eth3: enabled active slave may_enable: true

Pour modifier la carte réseau active, connectez-vous à l'hôte AHV et exécutez la commande suivante :

 [root@ahv ~]# ovs-appctl bond/set-active-slave <bond name> <interface name>

Exemple:

 [root@ahv ~]# ovs-appctl bond/set-active-slave br0-up eth2 done

Maintenant, lorsque vous vérifiez la sortie bond/show, vous pouvez voir l'interface eth2 apparaître comme esclave actif :

Exemple:

 [root@ahv ~]# ovs-appctl bond/show ---- br0-up ---- bond_mode: active-backup ... slave eth2: enabled        active slave        may_enable: true slave eth3: enabled        may_enable: true

[ Retour au sommet ]

Séparez les interfaces 1G d'une liaison avec les interfaces 10G

Consultez la base de connaissances 8835 pour une description détaillée du flux de travail.
[ Retour au sommet ]

Ponts avec une seule liaison montante

Consultez la base de connaissances 8015 pour une description détaillée du flux de travail.
[ Retour au sommet ]

Problèmes connus

Symptôme : manage_ovs échoue avec l'erreur « ovs-vsctl : introuvable » :

 CRITICAL manage_ovs:166 Failed to execute ovs command: list-br ... stderr: sh: ovs-vsctl: not found ...

Résolution : assurez-vous que l'hyperviseur sous-jacent est AHV. Si un autre hyperviseur est utilisé, reportez-vous à la documentation de son fournisseur pour savoir comment gérer le réseau à partir de la ligne de commande.

Symptôme : manage_ovs échoue avec "Cluster ARP et DHCP IP non initialisés". erreur en essayant de créer un pont supplémentaire :

 2019-10-24 01:55:57 ERROR manage_ovs:602 OVS error (192.168.5.1 create_single_bridge): Cluster ARP and DHCP ip not initialized.

Résolution : assurez-vous que le nœud sur lequel le pont est ajouté fait partie d'un cluster existant. manage_ovs ne prend pas en charge la création de nouveaux ponts sur des nœuds qui ne sont pas joints au cluster.
[ Retour au sommet ]

Articles Liés

ID Document:HT516499
Date de publication originale:05/17/2024
Date de dernière modification:05/30/2024
Avis