شبكة مضيف AHV

شبكة مضيف AHV

شبكة مضيف AHV

هذه المقالة مترجمة باستخدام الترجمة الآلية، الرجاء النقر هنا لعرض الإصدار الانجليزي الأصلي.

وصف

تتم تغطية شبكات AHV في الوثائق المتوفرة على بوابة دعم Nutanix.

حل

ملاحظة: لا تستخدم أيًا من هذه الأوامر على واجهات المستخدم VM أو CVM (واجهات vnet).

المواضيع التي تمت تغطيتها:

افتح تكوين vSwitch

يأتي مضيفو Nutanix AHV مزودين بـ Open vSwitch الذي تم تكوينه مسبقًا. سيقوم الأمر "ovs-vsctl show" بطباعة نظرة عامة على تكوين 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"

يوجد جسر اسمه "br0" به عدة منافذ.

  • المنفذ "br0" هو واجهة داخلية على الجسر br0. هذه هي واجهة الإدارة الخارجية لمضيف AHV.
  • المنفذ "vnet0" هو منفذ واجهة افتراضي يستخدمه CVM (جهاز التحكم VM).
  • المنفذ "bond0" أو المنفذ "br0-up" هو منفذ مرتبط يحتوي على واجهات فعلية متعددة من مضيف AHV.

ملاحظة: في AOS 5.5، تم تقديم تسلسل الجسور ونتيجة لذلك، يمكنك رؤية المزيد من الجسور في إخراج "ovs-vsctl show".
[ العودة إلى الأعلى ]

الأداة المساعدة Manage_ovs

يوفر Nutanix أداة مساعدة تسمى "manage_ovs"، والتي يتم تثبيتها على كل CVM ويجب استخدامها لإدارة تكوين Open vSwitch على مضيف AHV. راجع إخراج "manage_ovs --helpshort" للحصول على تفاصيل حول الاستخدام.

إخراج العينة من 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 أو أحدث

من الممكن إدارة تكوين الشبكة المضيفة باستخدام Prism Element أو Prism Central UI. راجع الفصل حول المحول الظاهري للحصول على مزيد من المعلومات حول المحولات الافتراضية. راجع فصل إنشاء أو تحديث محول افتراضي للحصول على معلومات حول كيفية إدارة المحولات الافتراضية.
[ العودة إلى الأعلى ]

معلومات إضافية

خطوات إضافة أو إزالة علامة VLAN الخاصة بمضيف CVM وAHV

قم بإجراء جميع تغييرات شبكة مضيف AHV وشبكة CVM عن طريق الاتصال بالمضيف باستخدام IPMI وفتح وحدة التحكم عن بعد. يمكن أن يؤدي إجراء تغييرات VLAN على مستوى المحول الفعلي دون تنسيق تغييرات المضيف وفقًا لهذه الخطوات إلى حدوث مشكلات في الوصول إلى CVM والاتصال ومن المحتمل أن يؤدي إلى توقف UVM وعدم إمكانية الوصول إلى المجموعة من Prism Central أو Prism Element حتى اكتمال تكوين VLAN أو يتم حل أي عدم تطابق. يوصى بإجراء مثل هذه التغييرات لمضيف واحد/CVM/سند/منفذ تحويل في كل مرة أثناء وجودك في وضع الصيانة، وإكمال مضيف واحد/CVM واحد وإعادته إلى الإنترنت قبل الانتقال إلى التالي. راجع KB4639 - كيفية وضع CVM والمضيف في وضع الصيانة
راجع أيضًا: دليل مسؤول AHV / إدارة الشبكة من الطبقة الثانية مع تكوين Open vSwitch / VLAN

لتغيير شبكة VLAN على مضيف AHV، قم بتشغيل الأمر التالي:

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

ملاحظة: تأكد من تحديث منفذ br0 وليس منفذ br0-up أو Bond0. إذا تم تعيين VLAN إلى br0-up أو Bond0، فقد يفقد CVM والمضيف الاتصال بالشبكة. في حالة تعيين شبكة VLAN لـ br-up أو Bond0، قم بتشغيل الأمر التالي لإزالتها:

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

استخدم الأمر "ovs-vsctl show" للتحقق من التغييرات. يجب أن يبدو التكوين الصحيح كما يلي:

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

لتغيير شبكة VLAN على CVM، قم بتشغيل الأمر التالي باستخدام علامة VLAN (المميزة بعلامة X) التي ترغب في تكوينها:

 nutanix@cvm$ change_cvm_vlan <vlan tag>

ملاحظة: لا تستخدم الأمر ovs-vsctl من مضيف AHV لتعيين علامة VLAN لـ CVM (على vnet0). بدلاً من ذلك، استخدم الأمر Change_cvm_vlan من CVM.

لإزالة علامة VLAN من مضيف AHV، قم بتشغيل الأمر التالي بعد فتح وحدة التحكم عن بعد:

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

لإزالة علامات VLAN من CVM، اتبع هذا الإجراء:

  • قم بتسجيل الدخول إلى مضيف AHV عبر وحدة التحكم عن بعد
  • SSH من المضيف إلى CVM (دائمًا SSH إلى عنوان 192.168.5.254):
     [root@ahv ~]# ssh nutanix@192.168.5.254
  • قم بتنفيذ الأمر التالي على CVM:
     nutanix@cvm$ change_cvm_vlan --remove

[ العودة إلى الأعلى ]

تكوين LACP

اتبع KB-3263 كيفية تمكين وتعطيل والتحقق من LACP في AHV.

كيفية العثور على عنوان MAC الخاص بمضيف NIC

  • قم بتنفيذ الأمر التالي على مضيف AHV:
 [root@ahv ~]# ethtool -P <interface>

إخراج العينة:

 [root@ahv ~]# ethtool -P eth3 Permanent address: 00:25:90:cb:39:27
  • قم بتنفيذ الأمر التالي على مضيف AHV:
 [root@ahv ~]# ifconfig <interface>

إخراج العينة:

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


[ العودة إلى الأعلى ]

كيفية تحديد بطاقة NIC النشطة في وضع سند النسخ الاحتياطي النشط

افتراضيًا، أثناء وقت التمهيد، يقوم AHV باختيار إحدى بطاقات NIC المرتبطة بشكل عشوائي ويجعلها نشطة. يتم تعيين أدوار احتياطية لكافة بطاقات NIC الأخرى، ولن يتم تنشيطها إلا في حالة فشل بطاقة NIC النشطة.
إذا كنت تريد تعيين بطاقة NIC المفضلة ليتم تحديدها كبطاقة واجهة أساسية، فيمكنك استخدام الأمر التالي (AOS 5.15.4 والإصدارات الأحدث):

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

على سبيل المثال:

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

للتحقق من بطاقة NIC النشطة و/أو المفضلة، اتصل بمضيف AHV وقم بتشغيل الأمر التالي:

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

في إخراج الأمر، سيتم وضع علامة على الواجهة النشطة باعتبارها واجهة نشطة . في المثال أدناه، توجد واجهة eth3 نشطة في رابطة 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

لتغيير بطاقة NIC النشطة، يرجى الاتصال بمضيف AHV وتشغيل الأمر التالي:

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

مثال:

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

الآن، عندما تتحقق من مخرجات السند/العرض، يمكنك رؤية واجهة eth2 تظهر كعبد نشط :

مثال:

 [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

[ العودة إلى الأعلى ]

واجهات 1G منفصلة عن الوصلة مع واجهات 10G

تحقق من KB 8835 للحصول على وصف تفصيلي لسير العمل.
[ العودة إلى الأعلى ]

الجسور ذات وصلة صاعدة واحدة

تحقق من KB 8015 للحصول على وصف تفصيلي لسير العمل.
[ العودة إلى الأعلى ]

مشاكل معروفة

العرَض: فشل Manage_ovs مع ظهور الخطأ "ovs-vsctl: لم يتم العثور عليه":

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

الحل: تأكد من أن برنامج Hypervisor الأساسي هو AHV. إذا تم استخدام برنامج Hypervisor آخر، فارجع إلى وثائق البائع الخاصة به حول كيفية إدارة الشبكة من سطر الأوامر.

العرَض: فشل Manage_ovs مع "عدم تهيئة Cluster ARP وDHCP IP." خطأ عند محاولة إنشاء جسر إضافي:

 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.

الحل: تأكد من أن العقدة، حيث يتم إضافة الجسر، جزء من كتلة موجودة. لا يدعم Manage_ovs إنشاء جسور جديدة على العقد غير المرتبطة بالمجموعة.
[ العودة إلى الأعلى ]

مقالات ذات صلة

معرف المستند:HT516499
تاريخ النشر الأصلي:05/17/2024
تاريخ آخر تعديل:05/30/2024