AHV-hostnetwerk

AHV-hostnetwerk

AHV-hostnetwerk

Dit artikel is een machinevertaling. Klik hier om de originele Engelse versie te bekijken.

Beschrijving

AHV Networking wordt behandeld in de documentatie die beschikbaar is op de Nutanix Support Portal.

Oplossing

Opmerking: Gebruik geen van deze opdrachten op gebruikers-VM- of CVM-interfaces (vnet-interfaces).

Behandelde onderwerpen:

Open vSwitch-configuratie

Nutanix AHV-hosts worden geleverd met vooraf geconfigureerde Open vSwitch. Met het commando 'ovs-vsctl show' wordt een overzicht afgedrukt van de Open vSwitch-configuratie:

 [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"

Er is een brug genaamd "br0" met verschillende poorten.

  • Poort "br0" is een interne interface op bridge br0. Dit is de externe beheerinterface van de AHV-host.
  • Poort "vnet0" is een virtuele interfacepoort die de CVM (Controller VM) gebruikt.
  • Poort "bond0" of poort "br0-up" is een gebonden poort die meerdere fysieke interfaces van de AHV-host bevat.

Opmerking: In AOS 5.5 werd bridge-chaining geïntroduceerd en als gevolg daarvan kun je meer bridges zien in de "ovs-vsctl show"-uitvoer.
[ Terug naar boven ]

manage_ovs hulpprogramma

Nutanix biedt een hulpprogramma genaamd 'manage_ovs', dat op elke CVM wordt geïnstalleerd en moet worden gebruikt om de Open vSwitch-configuratie op de AHV-host te beheren. Zie de uitvoer "manage_ovs --helpshort" voor details over het gebruik.

Voorbeelduitvoer van 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 of nieuwer

Het is mogelijk om de hostnetwerkconfiguratie te beheren met behulp van Prism Element of Prism Central UI. Raadpleeg het hoofdstuk Over virtuele switches voor meer informatie over virtuele switches. Raadpleeg het hoofdstuk Een virtuele switch maken of bijwerken voor informatie over het beheren van virtuele switches.
[ Terug naar boven ]

Extra informatie

Stappen om de VLAN-tag van CVM- en AHV-host toe te voegen of te verwijderen

Voer alle AHV-host- en CVM-netwerkwijzigingen uit door verbinding te maken met de host via IPMI en een externe console te openen. Het aanbrengen van VLAN-wijzigingen op fysiek switchniveau zonder de hostwijzigingen volgens deze stappen te coördineren, kan leiden tot CVM-toegangs- en connectiviteitsproblemen en mogelijk leiden tot UVM-downtime en het cluster niet toegankelijk zijn vanuit Prism Central of Prism Element totdat de VLAN-configuratie is voltooid of een eventuele mismatch wordt opgelost. Het wordt aanbevolen om dergelijke wijzigingen per host/CVM/uplink bond/switchport tegelijk uit te voeren terwijl u in de onderhoudsmodus bent, waarbij u een enkele host/CVM voltooit en deze weer online brengt voordat u naar de volgende gaat. Zie KB4639 - CVM en host in onderhoudsmodus plaatsen
Zie ook: AHV-beheerdershandleiding / Layer 2-netwerkbeheer met open vSwitch / VLAN-configuratie

Om het VLAN op de AHV-host te wijzigen, voert u de volgende opdracht uit:

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

Opmerking: Zorg ervoor dat u br0 bijwerkt en niet de br0-up- of bond0-poort. Als VLAN is toegewezen aan br0-up of bond0, kunnen CVM en host de netwerkverbinding verliezen. Als VLAN is toegewezen aan br-up of bond0, voer dan de volgende opdracht uit om het te verwijderen:

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

Gebruik de opdracht "ovs-vsctl show" om wijzigingen te verifiëren. De juiste configuratie zou er als volgt uit moeten zien:

 [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 ...

Om het VLAN op de CVM te wijzigen, voert u de volgende opdracht uit met de VLAN-tag (gemarkeerd met X) die u wilt configureren:

 nutanix@cvm$ change_cvm_vlan <vlan tag>

Opmerking: Gebruik niet de opdracht ovs-vsctl van de AHV-host om de VLAN-tag voor de CVM (op vnet0) in te stellen. Gebruik in plaats daarvan de opdracht change_cvm_vlan van CVM.

Om de VLAN-tag van de AHV-host te verwijderen, voert u de volgende opdracht uit nadat u de externe console hebt geopend:

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

Volg deze procedure om VLAN-tagging uit CVM te verwijderen:

  • Log in op de AHV-host via de externe console
  • SSH van de host naar de CVM (altijd SSH naar het 192.168.5.254-adres):
     [root@ahv ~]# ssh nutanix@192.168.5.254
  • Voer de volgende opdracht uit op de CVM:
     nutanix@cvm$ change_cvm_vlan --remove

[ Terug naar boven ]

LACP-configuratie

Volg KB-3263 Hoe u LACP in AHV kunt inschakelen, uitschakelen en verifiëren.

Hoe u het MAC-adres van een host-NIC kunt vinden

  • Voer de volgende opdracht uit op de AHV-host:
 [root@ahv ~]# ethtool -P <interface>

Voorbeelduitvoer:

 [root@ahv ~]# ethtool -P eth3 Permanent address: 00:25:90:cb:39:27
  • Voer de volgende opdracht uit op de AHV-host:
 [root@ahv ~]# ifconfig <interface>

Voorbeelduitvoer:

 [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)


[ Terug naar boven ]

Hoe u een actieve NIC selecteert in de active-backup bond-modus

Standaard selecteert AHV tijdens het opstarten willekeurig een van de NIC's in bond en maakt deze actief. Aan alle andere NIC's worden back-uprollen toegewezen en deze worden alleen geactiveerd als de actieve NIC uitvalt.
Als u wilt instellen dat een voorkeurs-NIC als primair wordt geselecteerd, kunt u de volgende opdracht gebruiken (AOS 5.15.4 en hoger):

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

Bijvoorbeeld:

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

Om te controleren welke NIC actief en/of de voorkeur heeft, maakt u verbinding met de AHV-host en voert u de volgende opdracht uit:

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

In de commando-uitvoer wordt de actieve interface gemarkeerd als een actieve slaaf . In het onderstaande voorbeeld is eth3 een actieve interface 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

Om de actieve NIC te wijzigen, maakt u verbinding met de AHV-host en voert u de volgende opdracht uit:

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

Voorbeeld:

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

Wanneer u nu de bond/show-uitvoer controleert, ziet u de eth2-interface verschijnen als actieve slaaf :

Voorbeeld:

 [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

[ Terug naar boven ]

Scheid 1G-interfaces van een verbinding met de 10G-interfaces

Raadpleeg KB 8835 voor een gedetailleerde beschrijving van de workflow.
[ Terug naar boven ]

Bruggen met één enkele uplink

Raadpleeg KB 8015 voor een gedetailleerde beschrijving van de workflow.
[ Terug naar boven ]

Bekende problemen

Symptoom: manage_ovs mislukt met de foutmelding 'ovs-vsctl: niet gevonden':

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

Oplossing: Zorg ervoor dat de onderliggende hypervisor AHV is. Als er een andere hypervisor wordt gebruikt, raadpleeg dan de documentatie van de leverancier over hoe u het netwerk vanaf de opdrachtregel kunt beheren.

Symptoom: manage_ovs mislukt met "Cluster ARP en DHCP IP niet geïnitialiseerd." fout bij het maken van een extra bridge:

 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.

Oplossing: Zorg ervoor dat het knooppunt waaraan de bridge wordt toegevoegd, deel uitmaakt van een bestaand cluster. manage_ovs biedt geen ondersteuning voor het maken van nieuwe bruggen op knooppunten die niet bij het cluster zijn aangesloten.
[ Terug naar boven ]

gerelateerde artikelen

Document-ID:HT516499
Oorspronkelijke publicatiedatum:05/17/2024
Laatste gewijzigde datum:05/30/2024