跳到主要内容

GET – BMC 以太网属性

使用 GET 方法检索 BMC 的以太网接口资源中的属性。

请求 URL

GET https://<BMC_IPADDR>/redfish/v1/Managers/1/EthernetInterfaces/{NIC,ToHost,NIC2}

请求正文

响应正文

字段类型描述

FQDN

字符串

此 XCC2 接口的完整完全限定域名。在 ToHost 中为空字符串。

EthernetInterfaceType

字符串

“Physical”。

IPv6DefaultGateway

字符串

此 XCC2 接口上使用的当前 IPv6 默认网关地址。此属性在 ToHost 中不可用。

Id

字符串

在 BMC 以太网接口的资源中,此值为“NIC”或“NIC2”。

在 BMC Ethernet over USB 接口中,此值为“ToHost”。

IPv6StaticAddresses

数组

用于表示此 XCC2 接口的 IPv6 静态连接特征的对象数组。此属性在 ToHost 中不可用。

 

IPv6StaticAddresses[N]

对象

数组元素

  

PrefixLength

数字

此 IPv6 地址的前缀长度

  

Address

字符串

有效的 IPv6 地址

AutoNeg

布尔

指示是否在此 XCC2 接口上自动协商和配置速度和双工:

  • True。启用速度和双工自动协商。

  • False。禁用速度和双工自动协商。

IPv6AddressPolicyTable

数组

用于表示地址选择策略表(定义见 RFC 6724)的对象数组

 

IPv6AddressPolicyTable[N]

对象

数组元素

  

Prefix

字符串

IPv6 地址的前缀。

  

Precedence

数字

IPv6 优先顺序(定义见 RFC6724 第 2.1 节)。

  

Label

数字

IPv6 地址的标签。

SpeedMbps

字符串

此 XCC2 接口的当前速度(单位:Mbps,即 Mbit/s)。当“AutoNeg”为 true 时,此值为 null。

Status

对象

已展开。

 

State

字符串

如果启用了此以太网接口,则为“Enabled”。

 

Health

字符串

null

HostName

字符串

此 XCC2 接口的主机名,不含任何域信息。在 ToHost 中为空字符串。

IPv6Addresses

数组

用于表示此 XCC2 接口的 IPv6 连接特征的对象数组

 

IPv6Address

对象

数组元素

  

Address

字符串

IPv6 地址

  

PrefixLength

数字

IPv6 地址前缀长度

  

AddressOrigin

字符串

此 XCC2 接口的 IPv6 地址来源的类型:

  • Static。用户配置的静态地址。

  • DHCPv6。地址由 DHCPv6 服务提供。

  • LinkLocal。地址仅对此网段(链路)有效。

  • SLAAC。地址由无状态地址自动配置(SLAAC)服务提供。

  

AddressState

字符串

此地址的当前状态(定义见 RFC 4862):

  • Preferred。此地址当前处于 RFC 4862 中定义的有效生存期和首选生存期内。

  • Deprecated。此地址当前在其有效生存期内,但现在超出了 RFC 4862 中定义的首选生存期。

  • Tentative。此地址当前正在接受 RFC 4862 第 5.4 节中定义的重复地址检测测试。

  • Failed。此地址未通过 RFC 4862 第 5.4 节中定义的重复地址检测测试,当前未使用。

FullDuplex

布尔

此 XCC2 接口上以太网连接的双工状态。当“AutoNeg”为 true 时,此值为 null。

IPv4StaticAddresses

数组

用于表示此 XCC2 接口的 IPv4 连接特征的对象数组。

 

IPv4StaticAddress

对象

数组元素

  

Address

字符串

IPv4 地址

  

SubnetMask

字符串

IPv4 子网掩码。

  

AddressOrigin

字符串

Static。

  

Gateway

字符串

此地址的 IPv4 网关

IPv4Address

数组

用于表示此 XCC2 接口的 IPv4 连接特征的对象数组。

 

IPv4Address

对象

数组元素

  

Address

字符串

IPv4 地址

  

SubnetMask

字符串

IPv4 子网掩码。

  

AddressOrigin

字符串

指示地址是如何确定的:

  • Static。用户配置的静态地址。

  • DHCP。地址由 DHCPv4 服务提供。

  • BOOTP。地址由 BOOTP 服务提供。

  • IPv4LinkLocal。地址仅对此网段(链路)有效。

  

Gateway

字符串

此地址的 IPv4 网关

NameServers

数组

此 XCC2 接口上当前使用的 DNS 名称服务器(IPv4 第 1 个、第 2 个、第 3 个 IP 地址,IPv6 第 1 个、第 2 个、第 3 个 IP 地址)。在 ToHost 中为空数组。

InterfaceEnabled

布尔

指示是否启用此接口的布尔值

LinkStatus

字符串

此属性的值表示链路的当前状态。

有效值:

LinkUp、NoLink、LinkDown。

LinkUp 的描述是“此链路可用于此接口上的通信”。

NoLink 的描述是“在此接口上未检测到任何链路或连接”。

LinkDown 的描述是“此接口上没有链路,但接口已连接”。

Links

对象

已展开。

 

Chassis

链接

此属性的值应是对 Chassis 类型的资源的引用(此资源表示与此以太网接口关联的物理容器)。

 

HostInterface

链接

此属性的值应是对 HostInterface 类型的资源的引用(此资源表示主机用于与管理器通信的接口)。仅在 ToHost 中才有此属性。

MACAddress

字符串

(逻辑端口)接口当前配置的 MAC 地址。

PermanentMACAddress

字符串

分配给此接口(端口)的永久 MAC 地址。

Name

字符串

资源的名称

MTUSize

数字

此 XCC2 接口上当前配置的最大传输单元(MTU)(以字节为单位)

VLAN

链接

此属性的值应是此接口的 VLAN。如果此接口支持多个 VLAN,则不应存在 VLAN 属性,而应存在 VLANS 集合链接。此属性在 ToHost 中不可用。

 

VLANEnable

布尔

VLAN 的属性是否为启用。

 

VLANId

数字

VLAN 的 ID。

MaxIPv6StaticAddresses

数字

IPv6 静态地址的最大数量。在 ToHost 中为固定值“0”。

DHCPv4

对象

已展开。

 

UseDNSServers

布尔

是否使用 DNS 服务器。

 

UseDomainName

布尔

是否使用域名。

 

DHCPEnabled

布尔

是否启用 DHCP。

 

UseNTPServers

布尔

未使用,始终为 null。

 

UseGateway

布尔

未使用,始终为 null。

 

UseStaticRoutes

布尔

未使用,始终为 null。

 

FallbackAddress

字符串

此接口的 DHCPv4 回退地址方法。

有效值:None、Static

DHCPv6

对象

已展开

 

UseDNSServers

布尔

是否使用 DNS 服务器。

 

UseDomainName

布尔

是否使用域名。

 

OperatingMode

字符串

运行模式为“Enabled”或“Disabled”。

 

UseNTPServers

布尔

未使用,始终为 null。

 

UseRapidCommit

布尔

未使用,始终为 null。

IPv6StaticDefaultGateways

数组

用于表示此 XCC2 接口的 IPv6 静态默认网关的对象数组。

 

Address

字符串

静态 IPv6 默认网关地址

 

PrefixLength

整数

固定值“0”

StaticNameServers

数组

静态定义的一组 DNS 服务器 IPv4 和 IPv6 地址。

项:字符串

项数:6

StatelessAddressAutoConfig

对象

已展开

 

IPv4AutoConfigEnabled

布尔

未使用,始终为 null。

 

IPv6AutoConfigEnabled

布尔

是否启用 IPv6 自动配置。

Description

字符串

固定字符串“Manager Ethernet Interface”

状态代码

HTTP 状态代码错误消息 ID
500InternalError

示例

返回以下示例 JSON 响应:

{
"IPv4StaticAddresses": [
{
"SubnetMask": "255.255.255.0",
"AddressOrigin": "Static",
"Gateway": "0.0.0.0",
"Address": "192.168.70.125"
}
],
"StaticNameServers": [
"0.0.0.0",
"0.0.0.0",
"0.0.0.0",
"::",
"::",
"::"
],
"IPv6StaticDefaultGateways": [
{
"PrefixLength": 0,
"Address": "::"
}
],
"SpeedMbps": null,
"IPv4Addresses": [
{
"SubnetMask": "255.255.254.0",
"AddressOrigin": "DHCP",
"Gateway": "10.240.218.1",
"Address": "10.240.218.133"
}
],
"IPv6Addresses": [
{
"PrefixLength": 64,
"AddressOrigin": "LinkLocal",
"AddressState": "Preferred",
"Address": "fe80::922e:16ff:fe06:e44e"
}
],
"InterfaceEnabled": true,
"AutoNeg": true,
"NameServers": [
"10.240.0.10",
"0.0.0.0",
"0.0.0.0",
"::",
"::",
"::"
],
"@odata.etag": "\"11618d5429c7230e8ce358\"",
"HostName": "XCC-7D75-1234567890",
"MTUSize": 1500,
"FullDuplex": null,
"@odata.type": "#EthernetInterface.v1_8_0.EthernetInterface",
"@odata.id": "/redfish/v1/Managers/1/EthernetInterfaces/NIC",
"Status": {
"Health": "OK",
"State": "Enabled"
},
"DHCPv4": {
"UseNTPServers": null,
"UseStaticRoutes": null,
"DHCPEnabled": true,
"UseDNSServers": true,
"UseDomainName": true,
"FallbackAddress": "Static",
"UseGateway": null
},
"MaxIPv6StaticAddresses": 1,
"MACAddress": "90:2e:16:06:e4:4e",
"Links": {
"Chassis": {
"@odata.id": "/redfish/v1/Chassis/1"
}
},
"VLAN": {
"VLANId": 1,
"VLANEnable": false
},
"LinkStatus": "LinkUp",
"PermanentMACAddress": "90:2e:16:06:e4:4e",
"FQDN": "XCC-7D75-1234567890.lenovo.com",
"IPv6DefaultGateway": "::",
"StatelessAddressAutoConfig": {
"IPv6AutoConfigEnabled": true,
"IPv4AutoConfigEnabled": null
},
"DHCPv6": {
"UseNTPServers": null,
"OperatingMode": "Enabled",
"UseDomainName": true,
"UseRapidCommit": null,
"UseDNSServers": true
},
"Id": "NIC",
"IPv6AddressPolicyTable": [
{
"Precedence": 50,
"Prefix": "::1/128",
"Label": 0
},
{
"Precedence": 11,
"Prefix": "::/96",
"Label": 3
},
{
"Precedence": 35,
"Prefix": "::ffff:0.0.0.0/96",
"Label": 4
},
{
"Precedence": 10,
"Prefix": "2001::/32",
"Label": 6
},
{
"Precedence": 10,
"Prefix": "2001:10::/28",
"Label": 7
},
{
"Precedence": 1,
"Prefix": "3ffe::/16",
"Label": 12
},
{
"Precedence": 30,
"Prefix": "2002::/16",
"Label": 2
},
{
"Precedence": 1,
"Prefix": "fec0::/10",
"Label": 11
},
{
"Precedence": 5,
"Prefix": "fc00::/7",
"Label": 5
},
{
"Precedence": 40,
"Prefix": "::/0",
"Label": 1
}
],
"@odata.context": "/redfish/v1/$metadata#EthernetInterface.EthernetInterface",
"IPv6StaticAddresses": [
{
"PrefixLength": 64,
"Address": "::"
}
],
"Name": "Manager Ethernet Interface",
"EthernetInterfaceType": "Physical",
"Description": "Manager Ethernet Interface",
"Oem": {

}
}