Jaringan host AHV

Jaringan host AHV

Jaringan host AHV

Ini merupakan artikel terjemahan mesin, silakan klik disini untuk melihat versi asli Inggris.

Keterangan

Jaringan AHV tercakup dalam dokumentasi yang tersedia di Portal Dukungan Nutanix.

Larutan

Catatan: Jangan gunakan perintah apa pun pada antarmuka VM Pengguna atau CVM (antarmuka vnet).

Topik yang Dicakup:

Buka Konfigurasi vSwitch

Host Nutanix AHV hadir dengan Open vSwitch yang telah dikonfigurasi sebelumnya. Perintah 'ovs-vsctl show' akan mencetak ikhtisar konfigurasi 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"

Ada Bridge bernama "br0" dengan beberapa Port.

  • Port "br0" adalah antarmuka internal pada jembatan br0. Ini adalah antarmuka manajemen eksternal host AHV.
  • Port "vnet0" adalah port antarmuka virtual yang digunakan CVM (Controller VM).
  • Port "bond0" atau port "br0-up" adalah port terikat yang berisi beberapa antarmuka fisik dari host AHV.

Catatan: Di AOS 5.5, rangkaian jembatan diperkenalkan dan sebagai hasilnya, Anda dapat melihat lebih banyak jembatan di keluaran "ovs-vsctl show".
[ Kembali ke atas ]

kelola_ovs Utilitas

Nutanix menyediakan utilitas bernama 'manage_ovs', yang diinstal pada setiap CVM dan harus digunakan untuk mengelola konfigurasi Open vSwitch pada host AHV. Lihat keluaran "manage_ovs --helpshort" untuk detail penggunaan.

Contoh keluaran dari 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 atau lebih baru

Konfigurasi jaringan host dapat dikelola menggunakan Prism Element atau Prism Central UI. Lihat bab Tentang sakelar virtual untuk informasi lebih lanjut tentang sakelar Virtual. Lihat bab Membuat atau memperbarui sakelar virtual untuk informasi tentang cara mengelola sakelar Virtual.
[ Kembali ke atas ]

informasi tambahan

Langkah-langkah untuk menambah atau menghapus tag VLAN dari host CVM dan AHV

Lakukan semua perubahan jaringan host AHV dan CVM dengan menghubungkan ke host menggunakan IPMI dan membuka konsol jarak jauh. Membuat perubahan VLAN pada tingkat sakelar fisik tanpa mengoordinasikan perubahan host sesuai langkah-langkah ini dapat menyebabkan masalah akses dan konektivitas CVM dan berpotensi menyebabkan waktu henti UVM dan klaster tidak dapat diakses dari Prism Central atau Prism Element hingga konfigurasi VLAN selesai atau ketidakcocokan apa pun teratasi. Direkomendasikan untuk melakukan perubahan tersebut pada satu host/CVM/uplink bond/switchport pada satu waktu saat berada dalam mode pemeliharaan, menyelesaikan satu host/CVM dan membawanya kembali online sebelum berpindah ke yang berikutnya. Lihat KB4639 - Cara menempatkan CVM dan host dalam mode pemeliharaan
Lihat juga: Panduan Admin AHV / Manajemen Jaringan Lapisan 2 dengan Konfigurasi Open vSwitch / VLAN

Untuk mengubah VLAN pada host AHV, jalankan perintah berikut:

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

Catatan: Pastikan Anda memperbarui port br0 dan bukan port br0-up atau bond0. Jika VLAN ditetapkan ke br0-up atau bond0, maka CVM dan host mungkin kehilangan konektivitas jaringan. Jika VLAN ditugaskan ke br-up atau bond0, jalankan perintah berikut untuk menghapusnya:

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

Gunakan perintah "ovs-vsctl show" untuk memverifikasi perubahan. Konfigurasi yang benar akan terlihat seperti ini:

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

Untuk mengubah VLAN pada CVM, jalankan perintah berikut dengan tag VLAN (bertanda X) yang ingin Anda konfigurasi:

 nutanix@cvm$ change_cvm_vlan <vlan tag>

Catatan: Jangan gunakan perintah ovs-vsctl dari host AHV untuk menyetel tag VLAN untuk CVM (di vnet0). Sebagai gantinya, gunakan perintah change_cvm_vlan dari CVM.

Untuk menghapus tag VLAN dari host AHV, jalankan perintah berikut setelah membuka konsol jarak jauh:

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

Untuk menghapus penandaan VLAN dari CVM, ikuti prosedur ini:

  • Masuk ke host AHV melalui konsol jarak jauh
  • SSH dari host ke CVM (selalu SSH ke alamat 192.168.5.254):
     [root@ahv ~]# ssh nutanix@192.168.5.254
  • Jalankan perintah berikut di CVM:
     nutanix@cvm$ change_cvm_vlan --remove

[ Kembali ke atas ]

Konfigurasi LACP

Ikuti KB-3263 Cara Mengaktifkan, Menonaktifkan, dan Memverifikasi LACP di AHV.

Cara menemukan alamat MAC dari host NIC

  • Jalankan perintah berikut pada host AHV:
 [root@ahv ~]# ethtool -P <interface>

Contoh keluaran:

 [root@ahv ~]# ethtool -P eth3 Permanent address: 00:25:90:cb:39:27
  • Jalankan perintah berikut pada host AHV:
 [root@ahv ~]# ifconfig <interface>

Contoh keluaran:

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


[ Kembali ke atas ]

Cara memilih NIC aktif dalam mode ikatan cadangan aktif

Secara default, selama waktu booting, AHV secara acak memilih salah satu NIC yang terikat dan mengaktifkannya. Semua NIC lainnya diberi peran cadangan dan hanya akan diaktifkan jika NIC aktif gagal.
Jika Anda ingin mengatur NIC pilihan untuk dipilih sebagai NIC utama, Anda dapat menggunakan perintah berikut (AOS 5.15.4 dan yang lebih baru):

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

Misalnya:

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

Untuk memeriksa NIC mana yang aktif dan/atau disukai, sambungkan ke host AHV dan jalankan perintah berikut:

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

Pada keluaran perintah, antarmuka aktif akan ditandai sebagai budak aktif . Pada contoh di bawah ini eth3 adalah antarmuka aktif dalam ikatan br0-up:

 [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

Untuk mengubah NIC yang aktif silakan sambungkan ke host AHV dan jalankan perintah berikut:

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

Contoh:

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

Sekarang, ketika Anda memeriksa keluaran bond/show, Anda dapat melihat antarmuka eth2 muncul sebagai budak aktif :

Contoh:

 [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

[ Kembali ke atas ]

Pisahkan antarmuka 1G dari ikatan dengan antarmuka 10G

Periksa KB 8835 untuk penjelasan rinci tentang alur kerja.
[ Kembali ke atas ]

Jembatan dengan satu uplink

Periksa KB 8015 untuk penjelasan rinci tentang alur kerja.
[ Kembali ke atas ]

Masalah Dikenal

Gejala: Manage_ovs gagal dengan kesalahan "ovs-vsctl: tidak ditemukan":

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

Resolusi: Pastikan hypervisor yang mendasarinya adalah AHV. Jika hypervisor lain digunakan, lihat dokumentasi vendornya tentang cara mengelola jaringan dari baris perintah.

Gejala: Manage_ovs gagal dengan "Cluster ARP dan DHCP IP tidak diinisialisasi." kesalahan saat mencoba membuat jembatan tambahan:

 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.

Resolusi: Pastikan node tempat jembatan ditambahkan merupakan bagian dari cluster yang sudah ada. manage_ovs tidak mendukung pembuatan jembatan baru pada node yang tidak bergabung ke cluster.
[ Kembali ke atas ]

Artikel Terkait

Dokumen ID:HT516499
Tanggal Penerbitan Asli:05/17/2024
Last Modified Date:05/30/2024