AHV ana bilgisayar ağı
AHV ana bilgisayar ağı
AHV ana bilgisayar ağı
Tanım
AHV Networking, Nutanix Destek Portalında bulunan belgelerde yer almaktadır.
- İlk kurulum Saha Kurulum Kılavuzu'nda ele alınmaktadır:
Foundation 4.6.x Saha Kurulum Kılavuzu - Çoğu kullanım durumu için temel yapılandırma aşağıda ele alınmaktadır:
AHV Yönetici Kılavuzu (AOS 5.18 sürümü)
AHV En İyi Uygulamalar Kılavuzu - Daha ayrıntılı ihtiyaçlara yönelik gelişmiş yapılandırma aşağıda ele alınmaktadır:
AHV Ağ İletişimi En İyi Uygulamalar Kılavuzu .
Çözüm
Not: Bu komutlardan hiçbirini Kullanıcı VM'si veya CVM arayüzlerinde (vnet arayüzleri) kullanmayın.
İşlenmiş konular:
- vSwitch Yapılandırmasını Aç
- Manage_ovs Yardımcı Programı
- CVM ve AHV ana bilgisayarının VLAN etiketini ekleme veya kaldırma adımları
- LACP Yapılandırması
- Aktif yedekleme bağ modunda aktif NIC nasıl seçilir
- 1G arayüzlerini 10G arayüzleriyle olan bağdan ayırın
- Tek uplinkli köprüler
- Bilinen Sorunlar
vSwitch Yapılandırmasını açın
Nutanix AHV sunucuları Open vSwitch önceden yapılandırılmış olarak gelir. 'ovs-vsctl show' komutu Open vSwitch yapılandırmasına genel bir bakış yazdıracaktır:
[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"
Birkaç Bağlantı Noktasına sahip "br0" adında bir Köprü var.
- Bağlantı noktası "br0", br0 köprüsündeki dahili bir arayüzdür. Bu, AHV ana bilgisayarının harici yönetim arayüzüdür.
- Bağlantı noktası "vnet0", CVM'nin (Denetleyici VM) kullandığı sanal bir arayüz bağlantı noktasıdır.
- Bağlantı noktası "bond0" veya bağlantı noktası "br0-up", AHV ana bilgisayarından birden fazla fiziksel arayüz içeren bağlı bir bağlantı noktasıdır.
Not: AOS 5.5'te köprü zincirleme tanıtıldı ve bunun sonucunda "ovs-vsctl show" çıktısında daha fazla köprü görebilirsiniz.
[ Başa dönüş ]
Manage_ovs Yardımcı Programı
Nutanix, her CVM'ye yüklenen ve AHV ana bilgisayarındaki Open vSwitch yapılandırmasını yönetmek için kullanılması gereken 'manage_ovs' adlı bir yardımcı program sağlar. Kullanımla ilgili ayrıntılar için "manage_ovs --helpshort" çıktısına bakın.
AOS 5.10.2'den örnek çıktı:
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 veya daha yenisi
Ana bilgisayar ağ yapılandırmasını Prism Element veya Prism Central UI kullanarak yönetmek mümkündür. Sanal anahtarlar hakkında daha fazla bilgi için Sanal anahtar hakkında bölümüne bakın. Sanal anahtarların nasıl yönetileceği hakkında bilgi için Sanal anahtar oluşturma veya güncelleme bölümüne bakın.
[ Başa dönüş ]
Ek Bilgiler
CVM ve AHV ana bilgisayarının VLAN etiketini ekleme veya kaldırma adımları
Tüm AHV ana bilgisayar ve CVM ağ değişikliklerini, IPMI kullanarak ana bilgisayara bağlanarak ve uzak bir konsol açarak gerçekleştirin. Ana bilgisayar değişikliklerini bu adımlara göre koordine etmeden fiziksel anahtar düzeyinde VLAN değişiklikleri yapmak, CVM erişimi ve bağlantı sorunlarına yol açabilir ve potansiyel olarak UVM kesintisine ve VLAN yapılandırması tamamlanana kadar kümenin Prism Central veya Prism Element'ten erişilememesine yol açabilir. veya herhangi bir uyumsuzluk giderilir. Bu tür değişikliklerin, bakım modundayken her defasında bir ana bilgisayar/CVM/uplink bağı/anahtar bağlantı noktası olacak şekilde gerçekleştirilmesi, tek bir ana bilgisayar/CVM'nin tamamlanması ve bir sonrakine geçmeden önce tekrar çevrimiçi hale getirilmesi önerilir. KB4639'a bakın - CVM ve ana makine bakım moduna nasıl geçirilir
Ayrıca bakınız: AHV Yönetici Kılavuzu / Açık vSwitch / VLAN Yapılandırması ile Katman 2 Ağ Yönetimi
AHV ana bilgisayarındaki VLAN'ı değiştirmek için aşağıdaki komutu çalıştırın:
[root@ahv ~]# ovs-vsctl set port br0 tag=<vlan tag>
Not: br0-up veya bond0 bağlantı noktasını değil, br0'ı güncellediğinizden emin olun. VLAN br0-up veya bond0'a atanırsa CVM ve ana bilgisayar ağ bağlantısını kaybedebilir. VLAN'ın br-up veya bond0'a atanması durumunda, onu kaldırmak için aşağıdaki komutu çalıştırın:
[root@ahv ~]# ovs-vsctl remove port br0-up tag <vlan tag>
Değişiklikleri doğrulamak için "ovs-vsctl show" komutunu kullanın. Doğru konfigürasyon şöyle görünmelidir:
[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 ...
CVM'deki VLAN'ı değiştirmek için, yapılandırmak istediğiniz VLAN etiketiyle (X işaretli) aşağıdaki komutu çalıştırın:
nutanix@cvm$ change_cvm_vlan <vlan tag>
Not: CVM için VLAN etiketini (vnet0'da) ayarlamak için AHV ana bilgisayarındaki ovs-vsctl komutunu kullanmayın. Bunun yerine CVM'deki change_cvm_vlan komutunu kullanın.
VLAN etiketini AHV ana bilgisayarından kaldırmak için uzak konsolu açtıktan sonra aşağıdaki komutu çalıştırın:
[root@ahv ~]# ovs-vsctl set port br0 tag=0
VLAN etiketlemesini CVM'den kaldırmak için şu prosedürü izleyin:
- Uzak konsol aracılığıyla AHV ana bilgisayarında oturum açın
- Ana bilgisayardan CVM'ye SSH (her zaman 192.168.5.254 adresine SSH):
[root@ahv ~]# ssh nutanix@192.168.5.254
- CVM'de aşağıdaki komutu yürütün:
nutanix@cvm$ change_cvm_vlan --remove
[ Başa dönüş ]
LACP Yapılandırması
KB-3263'ü izleyin: AHV'de LACP Nasıl Etkinleştirilir, Devre Dışı Bırakılır ve Doğrulanır?
Bir ana bilgisayar NIC'sinin MAC adresi nasıl bulunur?
- AHV ana bilgisayarında aşağıdaki komutu yürütün:
[root@ahv ~]# ethtool -P <interface>
Örnek çıktı:
[root@ahv ~]# ethtool -P eth3 Permanent address: 00:25:90:cb:39:27
- AHV ana bilgisayarında aşağıdaki komutu yürütün:
[root@ahv ~]# ifconfig <interface>
Örnek çıktı:
[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)
[ Başa dönüş ]
Aktif yedekleme bağ modunda aktif NIC nasıl seçilir
Varsayılan olarak, önyükleme sırasında AHV bağlı NIC'lerden birini rastgele seçer ve onu etkinleştirir. Diğer tüm NIC'lere yedekleme rolleri atanır ve bunlar yalnızca etkin NIC'in başarısız olması durumunda etkinleştirilir.
Tercih edilen bir NIC'nin birincil olarak seçilmesini istiyorsanız aşağıdaki komutu kullanabilirsiniz (AOS 5.15.4 ve üzeri):
ovs-vsctl set port other_config:bond-primary=
ovs-vsctl set port other_config:bond-primary=
ovs-vsctl set port other_config:bond-primary=
Örneğin:
ovs-vsctl set port br0-up other_config:bond-primary=eth2
Hangi NIC'nin etkin olduğunu ve/veya tercih edildiğini kontrol etmek için AHV ana bilgisayarına bağlanın ve aşağıdaki komutu çalıştırın:
[root@ahv ~]# ovs-appctl bond/show
Komut çıkışında aktif arayüz aktif bir köle olarak işaretlenecektir. Aşağıdaki örnekte eth3, br0-up bağındaki aktif bir arayüzdür:
[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
Etkin NIC'yi değiştirmek için lütfen AHV ana bilgisayarına bağlanın ve aşağıdaki komutu çalıştırın:
[root@ahv ~]# ovs-appctl bond/set-active-slave <bond name> <interface name>
Örnek:
[root@ahv ~]# ovs-appctl bond/set-active-slave br0-up eth2 done
Artık bond/show çıktısını kontrol ettiğinizde eth2 arayüzünün aktif köle olarak göründüğünü görebilirsiniz:
Örnek:
[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
[ Başa dönüş ]
1G arayüzlerini 10G arayüzleriyle olan bağdan ayırın
İş akışının ayrıntılı bir açıklaması için KB 8835'i kontrol edin.
[ Başa dönüş ]
Tek uplinkli köprüler
İş akışının ayrıntılı bir açıklaması için KB 8015'i kontrol edin.
[ Başa dönüş ]
Bilinen Sorunlar
Belirti: Manage_ovs, "ovs-vsctl: bulunamadı" hatasıyla başarısız oluyor:
CRITICAL manage_ovs:166 Failed to execute ovs command: list-br ... stderr: sh: ovs-vsctl: not found ...
Çözüm: Temel hipervizörün AHV olduğundan emin olun. Başka bir hiper yönetici kullanılıyorsa, ağın komut satırından nasıl yönetileceğine ilişkin satıcının belgelerine bakın.
Belirti: Manage_ovs, "Küme ARP ve DHCP IP'si başlatılmadı" ile başarısız oluyor. ek bir köprü oluşturmaya çalışırken hata oluştu:
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.
Çözüm: Köprünün eklendiği düğümün mevcut bir kümenin parçası olduğundan emin olun. Manage_ovs, kümeye katılmayan düğümlerde yeni köprüler oluşturulmasını desteklemez.
[ Başa dönüş ]
İlgili Makaleler
- Nutanix Portalındaki orijinal makale: Nutanix KB Makalesi: 2090
- Nutanix açılış sayfası