7.128. HostNic struct


表示主机 NIC.

例如,主机 NIC 的 XML 表述类似如下:

<host_nic href="/ovirt-engine/api/hosts/123/nics/456" id="456">
  <name>eth0</name>
  <boot_protocol>static</boot_protocol>
  <bridged>true</bridged>
  <custom_configuration>true</custom_configuration>
  <ip>
    <address>192.168.122.39</address>
    <gateway>192.168.122.1</gateway>
    <netmask>255.255.255.0</netmask>
    <version>v4</version>
  </ip>
  <ipv6>
    <gateway>::</gateway>
    <version>v6</version>
  </ipv6>
  <ipv6_boot_protocol>none</ipv6_boot_protocol>
  <mac>
    <address>52:54:00:0c:79:1d</address>
  </mac>
  <mtu>1500</mtu>
  <status>up</status>
</host_nic>

绑定的接口表示为含有 绑定从属 属性的 HostNic 对象。

例如,绑定主机 NIC 的 XML 表述类似如下:

<host_nic href="/ovirt-engine/api/hosts/123/nics/456" id="456">
  <name>bond0</name>
  <mac address="00:00:00:00:00:00"/>
  <ip>
    <address>192.168.122.39</address>
    <gateway>192.168.122.1</gateway>
    <netmask>255.255.255.0</netmask>
    <version>v4</version>
  </ip>
  <boot_protocol>dhcp</boot_protocol>
  <bonding>
    <options>
      <option>
        <name>mode</name>
        <value>4</value>
        <type>Dynamic link aggregation (802.3ad)</type>
      </option>
      <option>
        <name>miimon</name>
        <value>100</value>
      </option>
    </options>
    <slaves>
      <host_nic id="123"/>
      <host_nic id="456"/>
    </slaves>
  </bonding>
  <mtu>1500</mtu>
  <bridged>true</bridged>
  <custom_configuration>false</custom_configuration>
</host_nic>
Expand
表 7.174. 属性概述
名称类型概述

ad_aggregator_id

整数

bond 或 bond slave 的 ad_aggregator_id 属性,用于模式 4 中的绑定。

base_interface

字符串

NIC 的基础接口。

bonding

bonding

NIC 的绑定参数。

boot_protocol

BootProtocol

NIC 的 IPv4 引导协议配置。

bridged

布尔值

定义桥接网络状态。

check_connectivity

布尔值

 

comment

字符串

包含有关此对象的注释的免费文本。

custom_configuration

布尔值

 

description

字符串

以纯文本格式人类可读的描述。

id

字符串

唯一标识符。

ip

ip

NIC 的 IPv4 地址。

ipv6

ip

NIC 的 IPv6 地址。

ipv6_boot_protocol

BootProtocol

NIC 的 IPv6 引导协议配置。

MAC

MAC

NIC 的 MAC 地址。

mtu

整数

接口的最大传输单元。

name

字符串

纯文本中的人类可读名称。

override_configuration

布尔值

 

属性

attribute[]

 

速度

整数

 

status

NicStatus

 

virtual_functions_configuration

HostNicVirtualFunctionsConfiguration

描述物理功能 NIC 的虚拟功能配置。

vlan

VLAN

 

7.128.1. ad_aggregator_id

bond 或 bond slave 的 ad_aggregator_id 属性,用于模式 4 中的绑定。绑定模式 4 是 802.3ad 标准,也称为动态链路聚合。(请参阅维基百科与 演示以了解详细信息 )。这只适用于模式 4 中的绑定,或者对作为绑定一部分的 NIC 有效。其他模式中的绑定或模式 4 中不属于绑定的 NIC 不存在。ad_aggregator_id 属性指示哪个绑定从设备处于活动状态。活跃 slave 的 ad_aggregator_id 值与绑定的 ad_aggregator_id 属性的值相同。此参数为只读。设置它不会影响 bond/NIC。它从绑定的 /sys/class/net/bondX/bonding/ad_aggregator 文件和一个 NIC 的 /sys/class/net/ensX/bonding_slave/ad_aggregator_id 文件中检索。

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部