Rete host AHV
Rete host AHV
Rete host AHV
Descrizione
AHV Networking è trattato nella documentazione disponibile sul portale di supporto Nutanix.
- La configurazione iniziale è trattata nella Guida all'installazione sul campo:
Guida all'installazione sul campo di Foundation 4.6.x - La configurazione di base per la maggior parte dei casi d'uso è descritta di seguito:
Guida per l'amministratore AHV (versione AOS 5.18)
Guida alle migliori pratiche AVS - La configurazione avanzata per esigenze più approfondite è trattata di seguito:
Guida alle best practice per la rete AVS .
Soluzione
Nota: non utilizzare nessuno di questi comandi sulle interfacce VM utente o CVM (interfacce vnet).
Argomenti trattati:
- Apri la configurazione dello switch virtuale
- Utilità Manage_ovs
- Passaggi per aggiungere o rimuovere il tag VLAN dell'host CVM e AHV
- Configurazione LACP
- Come selezionare la NIC attiva in modalità bond backup attivo
- Separare le interfacce 1G da un legame con le interfacce 10G
- Ponti con un singolo uplink
- Problemi conosciuti
Apri la configurazione dello switch virtuale
Gli host Nutanix AHV vengono forniti con Open vSwitch preconfigurato. Il comando 'ovs-vsctl show' stamperà una panoramica della configurazione di 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"
C'è un ponte chiamato "br0" con diversi porti.
- La porta "br0" è un'interfaccia interna sul bridge br0. Questa è l'interfaccia di gestione esterna dell'host AVS.
- La porta "vnet0" è una porta di interfaccia virtuale utilizzata dal CVM (Controller VM).
- La porta "bond0" o "br0-up" è una porta collegata che contiene più interfacce fisiche dell'host AHV.
Nota: in AOS 5.5 è stato introdotto il concatenamento di bridge e, di conseguenza, è possibile vedere più bridge nell'output "ovs-vsctl show".
[ Torna in cima ]
Utilità Manage_ovs
Nutanix fornisce un'utilità chiamata "manage_ovs", che viene installata su ciascun CVM e deve essere utilizzata per gestire la configurazione Open vSwitch sull'host AHV. Vedi l'output "manage_ovs --helpshort" per i dettagli sull'utilizzo.
Output di esempio da 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 o versione successiva
È possibile gestire la configurazione della rete host utilizzando Prism Element o Prism Central UI. Fare riferimento al capitolo Informazioni sullo switch virtuale per ulteriori informazioni sugli switch virtuali. Fare riferimento al capitolo Creazione o aggiornamento di uno switch virtuale per informazioni su come gestire gli switch virtuali.
[ Torna in cima ]
Informazioni aggiuntive
Passaggi per aggiungere o rimuovere il tag VLAN dell'host CVM e AHV
Esegui tutte le modifiche all'host AHV e alla rete CVM connettendoti all'host tramite IPMI e aprendo una console remota. Apportare modifiche alla VLAN a livello di switch fisico senza coordinare le modifiche dell'host secondo questi passaggi può portare a problemi di accesso e connettività CVM e potenzialmente portare a tempi di inattività UVM e all'impossibilità di accedere al cluster da Prism Central o Prism Element fino al completamento della configurazione della VLAN o qualsiasi discrepanza viene risolta. Si consiglia di eseguire tali modifiche un host/CVM/bond uplink/switchport alla volta mentre si è in modalità di manutenzione, completando un singolo host/CVM e riportandolo online prima di passare a quello successivo. Vedere KB4639 - Come posizionare CVM e host in modalità di manutenzione
Vedi anche: Guida per l'amministratore di AHV / Gestione della rete Layer 2 con Open vSwitch / Configurazione VLAN
Per modificare la VLAN sull'host AHV, eseguire il comando seguente:
[root@ahv ~]# ovs-vsctl set port br0 tag=<vlan tag>
Nota: assicurati di aggiornare la porta br0 e non br0-up o bond0. Se la VLAN viene assegnata a br0-up o bond0, CVM e host potrebbero perdere la connettività di rete. Nel caso in cui la VLAN sia stata assegnata a br-up o bond0, eseguire il comando seguente per rimuoverla:
[root@ahv ~]# ovs-vsctl remove port br0-up tag <vlan tag>
Utilizzare il comando "ovs-vsctl show" per verificare le modifiche. La configurazione corretta dovrebbe assomigliare a questa:
[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 ...
Per modificare la VLAN sul CVM, esegui il seguente comando con il tag VLAN (contrassegnato con X) che desideri configurare:
nutanix@cvm$ change_cvm_vlan <vlan tag>
Nota: non utilizzare il comando ovs-vsctl dall'host AHV per impostare il tag VLAN per CVM (su vnet0). Utilizzare invece il comando change_cvm_vlan da CVM.
Per rimuovere il tag VLAN dall'host AHV, eseguire il comando seguente dopo aver aperto la console remota:
[root@ahv ~]# ovs-vsctl set port br0 tag=0
Per rimuovere il tagging VLAN da CVM, seguire questa procedura:
- Accedi all'host AHV tramite console remota
- SSH dall'host al CVM (sempre SSH all'indirizzo 192.168.5.254):
[root@ahv ~]# ssh nutanix@192.168.5.254
- Esegui il seguente comando sul CVM:
nutanix@cvm$ change_cvm_vlan --remove
[ Torna in cima ]
Configurazione LACP
Segui KB-3263 Come abilitare, disabilitare e verificare LACP in AHV.
Come trovare l'indirizzo MAC di una scheda NIC host
- Eseguire il comando seguente sull'host AHV:
[root@ahv ~]# ethtool -P <interface>
Output di esempio:
[root@ahv ~]# ethtool -P eth3 Permanent address: 00:25:90:cb:39:27
- Eseguire il comando seguente sull'host AHV:
[root@ahv ~]# ifconfig <interface>
Output di esempio:
[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)
[ Torna in cima ]
Come selezionare la NIC attiva in modalità bond backup attivo
Per impostazione predefinita, durante l'avvio AHV seleziona casualmente una delle NIC vincolate e la rende attiva. A tutte le altre NIC vengono assegnati ruoli di backup e verranno attivati solo in caso di guasto della NIC attiva.
Se si desidera impostare una NIC preferita da selezionare come primaria, è possibile utilizzare il seguente comando (AOS 5.15.4 e versioni successive):
ovs-vsctl set port other_config:bond-primary=
ovs-vsctl set port other_config:bond-primary=
ovs-vsctl set port other_config:bond-primary=
Per esempio:
ovs-vsctl set port br0-up other_config:bond-primary=eth2
Per verificare quale NIC è attiva e/o preferita, connettersi all'host AHV ed eseguire il comando seguente:
[root@ahv ~]# ovs-appctl bond/show
Nell'output del comando, l'interfaccia attiva verrà contrassegnata come slave attivo . Nell'esempio seguente eth3 è un'interfaccia attiva in 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
Per modificare la NIC attiva, connettersi all'host AHV ed eseguire il seguente comando:
[root@ahv ~]# ovs-appctl bond/set-active-slave <bond name> <interface name>
Esempio:
[root@ahv ~]# ovs-appctl bond/set-active-slave br0-up eth2 done
Ora, quando controlli l'output bond/show, puoi vedere che l'interfaccia eth2 appare come slave attivo :
Esempio:
[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
[ Torna in cima ]
Separare le interfacce 1G da un legame con le interfacce 10G
Controllare KB 8835 per una descrizione dettagliata del flusso di lavoro.
[ Torna in cima ]
Ponti con un singolo uplink
Controllare KB 8015 per una descrizione dettagliata del flusso di lavoro.
[ Torna in cima ]
Problemi conosciuti
Sintomo: Manage_ovs fallisce con l'errore "ovs-vsctl: non trovato":
CRITICAL manage_ovs:166 Failed to execute ovs command: list-br ... stderr: sh: ovs-vsctl: not found ...
Soluzione: assicurarsi che l'hypervisor sottostante sia AHV. Se viene utilizzato un altro hypervisor, fare riferimento alla documentazione del fornitore su come gestire la rete dalla riga di comando.
Sintomo: Manage_ovs fallisce con "Cluster ARP e IP DHCP non inizializzati". errore durante il tentativo di creare un bridge aggiuntivo:
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.
Soluzione: assicurarsi che il nodo su cui viene aggiunto il bridge faccia parte di un cluster esistente. Manage_ovs non supporta la creazione di nuovi bridge su nodi che non fanno parte del cluster.
[ Torna in cima ]
articoli Correlati
- Articolo originale nel portale Nutanix: Nutanix KB Article: 2090
- Pagina di destinazione di Nutanix