EthernetInterfaces
更新时间: 2026/06/26
在Gitcode上查看源码ResourceDefinition
uris
/redfish/v1/Systems/system_id/EthernetInterfaces/ethernetinterface_id
properties
| 名称 | 类型 | 是否只读 | 取值范围/枚举值 | 说明 |
|---|---|---|---|---|
| @odata.context | string | true | - | 指定网口资源模型的OData描述信息 |
| @odata.id | string | true | - | 指定网口资源节点的访问路径 |
| @odata.type | string | true | - | 指定网口资源类型 |
| Id | string | true | - | 指定网口资源的唯一标识 |
| Name | string | true | - | 指定网口资源的名称 |
| PermanentMACAddress | string | true | - | 网口的永久MAC地址 |
| MACAddress | string | true | - | 网口的当前MAC地址 (未安装IBMA2.0时,默认与永久地址一致) |
| LinkStatus | string | false | - | 网口的逻辑连接状态 ● LinkUp ● NoLink ● LinkDown |
| EthernetInterfaceType | string | true | - | 接口类型 |
| Ports | array | true | - | 提供此以太网接口的端口的链接 |
| VLANEnable | boolean | true | - | 指示此VLAN是否已启用用于此VLAN网络接口 |
| VLANId | int | true | - | 此VLAN的ID |
| VLANPriority | int | true | - | 此VLAN的优先级 |
| MTUSize | int | true | - | 接口当前配置的最大传输单元 |
| SpeedMbps | number | true | - | 网口速率 |
| AutoNeg | boolean | true | - | 指定网口是否自动协商 |
| FullDuplex | boolean | true | - | 指定网口是否全双工 |
| Address | string | true | - | IPv4地址 |
| SubnetMask | string | true | - | 子网掩码 |
| Gateway | string | true | - | 网关 |
| AddressOrigin | string | true | - | 地址来源 ● Static ● DHCP |
| Address | string | true | - | IPv6地址 |
| PrefixLength | number | true | - | IPv6前缀长度 |
| AddressOrigin | string | true | - | 地址来源 ● Static ● DHCPv6 ● LinkLocal ● SLAAC |
| AddressState | string | true | - | 地址状态 ● Preferred ● Deprecated ● Tentative ● Failed |
| Gateway | array | true | - | IPv6网关 |
| IPv6DefaultGateway | string | true | - | IPv6默认网关 |
| VLANs | object | true | - | VLANs资源节点的访问路径 |
| InterfaceType | string | true | - | 网口类型 ● Physical ● Virtual |
| BandwidthUsage | number | true | - | 带宽占用率 说明 已屏蔽该属性值频繁变化导致的事件上报 |
| BDF | string | true | - | BDF值 |
| NetworkAdapterName | string | true | - | 指定端口从属的网络适配器的名称 |
| RelatedPort | object | true | - | 关联的Chassis资源下的网口资源节点的访问路径 |
| IsOnBoot | boolean | false | - | 开机是否自动启用网络连接 |
| AlignmentErrors | string | true | - | 一个数据帧尾没有形成一个完整的Byte,即帧长非整数(不能被8bit整除),网管上计为接收 (发送)对齐错误 |
| Up2cos | array | true | - | DCB信息中的Up2cos |
| Pgid | array | true | - | DCB信息中的Pgid |
| PGPCT | array | true | - | DCB信息中的PGPCT |
| PgStrict | array | true | - | DCB信息中的PgStrict |
| Pfcup | number | true | - | DCB信息中的Pfcup |
| TotalBytesReceived | string | true | - | 接收总字节数 说明 已屏蔽该属性值频繁变化导致的事件上报 |
| TotalBytesTransmitted | string | true | - | 发送总字节数 说明 已屏蔽该属性值频繁变化导致的事件上报 |
| UnicastPacketsReceived | string | true | - | 接收到的单播数据包总数 说明 已屏蔽该属性值频繁变化导致的事件上报 |
| MulticastPacketsReceived | string | true | - | 接收到的多播数据包总数 说明 已屏蔽该属性值频繁变化导致的事件上报 |
| BroadcastPacketsReceived | string | true | - | 接收到的广播数据包总数 说明 已屏蔽该属性值频繁变化导致的事件上报 |
| UnicastPacketsTransmitted | string | true | - | 发送的单播数据包总数 说明 已屏蔽该属性值频繁变化导致的事件上报 |
| MulticastPacketsTransmitted | string | true | - | 发送到的多播数据包总数 说明 已屏蔽该属性值频繁变化导致的事件上报 |
| BroadcastPacketsTransmitted | string | true | - | 发送的广播数据包总数 说明 已屏蔽该属性值频繁变化导致的事件上报 |
| FcsReceiveErrors | string | true | - | 接收到的Frame Check Sequence错误数量 |
| RuntPacketsReceived | string | true | - | 接收到的超小帧数量 |
| JabberPacketsReceived | string | true | - | 接收到的巨型帧(大于1518字节)数量 |
| SingleCollisionTransmitFrames | string | true | - | 发送的单碰撞帧数量 |
| MultipleCollisionTransmitFrames | string | true | - | 发送的多碰撞帧数量 |
| LateCollisionFrames | string | true | - | 发送的late碰撞帧数量 |
| ExcessiveCollisionFrames | string | true | - | 发送的Excessive碰撞帧数量 |
| SwitchName | string | true | - | 交换机名称 |
| SwitchConnectionID | string | true | - | 交换机连接ID |
| SwitchConnectionPortID | string | true | - | 交换机连接端口ID |
| SwitchPortVlanID | number | true | - | 交换机端口VLAN ID |
| EthernetInterface.Configure | object | true | - | 配置指定主机以太网信息操作 |
| target | string | true | - | 配置操作的访问路径 |
| Redfish.ActionInfo | string | true | - | 操作信息查询路径 |
supported_methods
- GET
- POST
HTTP methods
GET
命令功能
查询指定主机以太网接口资源信息
命令格式
URL: https://device_ip/redfish/v1/Systems/system_id/EthernetInterfaces/ethernetinterface_id
请求头:
X-Auth-Token: 123456789***********************请求消息体: 无
参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| device_ip | 登录设备的IP地址 | IPv4或IPv6地址 |
| system_id | 系统资源的ID | 参见源文件参数说明 |
| auth_value | 请求消息的鉴权参数 | 可通过/redfish/v1/SessionService/Sessions创建会话时获得 |
使用指南
无
使用实例
请求样例:
http
GET https://device_ip/redfish/v1/Systems/system_id/EthernetInterfaces/ethernetinterface_idX-Auth-Token: 123456789***********************
请求消息体:无
响应样例:
json
{
"@odata.context": "/redfish/v1/$metadata#Systems/Members/1/EthernetInterfaces/Members/$entity",
"@odata.id": "/redfish/v1/Systems/1/EthernetInterfaces/mainboardNIC1Port1",
"@odata.type": "#EthernetInterface.v1_2_0.EthernetInterface",
"Id": "mainboardNIC1Port1",
"Name": "eth0",
"PermanentMACAddress": null,
"MACAddress": null,
"LinkStatus": "LinkUp",
"EthernetInterfaceType": "Physical",
"Links": {
"Ports": [
{
"@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/chassisNIC1(SF221Q)/NetworkPorts/2"
}
]
},
"VLAN": {
"VLANEnable": false,
"VLANId": 100,
"VLANPriority": 0
},
"MTUSize": 1500,
"SpeedMbps": 10000,
"AutoNeg": false,
"FullDuplex": false,
"IPv4Addresses": [
{
"Address": "192.168.100.3",
"SubnetMask": "255.255.0.0",
"Gateway": "192.168.100.100",
"AddressOrigin": "Static"
}
],
"IPv6Addresses": [
{
"Address": "fd00::2488",
"PrefixLength": 64,
"AddressOrigin": "Static",
"AddressState": "Preferred",
"Oem": {
"Public": {
"Gateway": [
"fd00::1"
]
}
}
},
{
"Address": "fe80::218:c0ff:fea8:6403",
"PrefixLength": 64,
"AddressOrigin": "LinkLocal",
"AddressState": "Preferred",
"Oem": {
"Public": {
"Gateway": []
}
}
}
],
"IPv6DefaultGateway": "fd00::2586",
"VLANs": {
"@odata.id": "/redfish/v1/Systems/1/EthernetInterfaces/mainboardNIC1Port1/VLANs"
},
"Oem": {
"Public": {
"InterfaceType": "Physical",
"BandwidthUsage": 10,
"BDF": "0000:02:00.0",
"NetworkAdapterName": "SM380",
"RelatedPort": {
"@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/mainboardNIC1/NetworkPorts/1"
},
"IsOnBoot": true,
"AlignmentErrors": "0",
"Up2cos": [],
"Pgid": [],
"PGPCT": [],
"PgStrict": [],
"Pfcup": 0,
"TotalBytesReceived": "0",
"TotalBytesTransmitted": "0",
"UnicastPacketsReceived": "0",
"MulticastPacketsReceived": "0",
"BroadcastPacketsReceived": "0",
"UnicastPacketsTransmitted": "0",
"MulticastPacketsTransmitted": "0",
"BroadcastPacketsTransmitted": "0",
"FcsReceiveErrors": "0",
"RuntPacketsReceived": "0",
"JabberPacketsReceived": "0",
"SingleCollisionTransmitFrames": "0",
"MultipleCollisionTransmitFrames": "0",
"LateCollisionFrames": "0",
"ExcessiveCollisionFrames": "0",
"SwitchName": "0",
"SwitchConnectionID": "0",
"SwitchConnectionPortID": "0",
"SwitchPortVlanID": "0"
}
},
"Actions": {
"Oem": {
"Public": {
"#EthernetInterface.Configure": {
"target": "/redfish/v1/Systems/1/EthernetInterfaces/mainboardNIC1Port1/Actions/Oem/Public/EthernetInterface.Configure",
"@Redfish.ActionInfo": "/redfish/v1/Systems/1/EthernetInterfaces/mainboardNIC1Port1/ConfigureActionInfo"
}
}
}
}
}响应码:200
POST (ACTION)
Configure
命令功能
配置以太网
命令格式
URL: https://device_ip/redfish/v1/Systems/system_id/EthernetInterfaces/ethernetinterface_id/Actions/Oem/Public/EthernetInterface.Configure
请求头:
X-Auth-Token: 123456789***********************
Content-Type: header_type请求消息体:
json
{
"IPv4Addresses": [
ipv4_value
],
"LinkStatus": status_value,
"IsOnBoot": boot_value
}请求头参数说明
参见 请求头参数说明
请求体参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| system_id | 系统资源的ID | ● 针对机架服务器,取值 为1 ● 针对高密服务器,取值 为BladeN(N表示节点 槽位号),例如 “Blade1” ● 针对刀片服务器,取值 可以为BladeN(N表示 计算节点槽位号)或 SwiN(N表示交换模块 槽位号),例如 “Swi1” ● 针对X6800 V5,X6000 V5,G5500,XA320 V2服务器,取值还可以 为Enc,表示计算节点 所在的机框资源 ● 针对设备U位信息,取 值可以为UN(N表示设 备U位号),例如"U1" ● 针对机柜资源,取值为 Rack |
| ethernetinterface_id | 网口资源的ID | ● 对于BMC管理的物理网 口为Location +DeviceName+Port+ silknum(丝印号) ● 其他的为OS侧显示的 网口名 |
| ipv4_value | IPv4地址信息,可选参数 格式为: { "Address":"Address", "SubnetMask":"SubnetM ask", "AddressOrigin":"Address Origin", "Gateway":"Gateway" } | ● Address:IPv4地址 ● SubnetMask:IPv4地 址的子网掩码 ● AddressOrigin:IPv4 地址获取模式,可设置 为“Static”或 “DHCP” ● Gateway:IPv4网关地 址 |
| status_value | Link状态取值,可选参数 | ● LinkUp ● LinkDown |
| boot_value | 是否开机激活网口取值, 可选参数 | 布尔类型 |
使用指南
仅支持Atlas系列产品,且需配合iBMA使用,iBMA版本号需大于或等于1.50.831。X86系统是EulerOS且内核版本是3.10.0-327或3.10.0-514。
使用实例
请求样例:
http
POST https://device_ip/redfish/v1/Systems/system_id/EthernetInterfaces/ethernetinterface_id/Actions/Oem/Public/EthernetInterface.ConfigureX-Auth-Token: 123456789*********************** Content-Type: header_type
请求消息体:
json
{
"IPv4Addresses": [
ipv4_value
],
"LinkStatus": status_value,
"IsOnBoot": boot_value
}响应样例:
json
{
"@odata.context": "/redfish/v1/$metadata#TaskService/Tasks/Members/$entity",
"@odata.type": "#Task.v1_0_2.Task",
"@odata.id": "/redfish/v1/TaskService/Tasks/1",
"Id": "1",
"Name": "Set mainboardNIC1Port1 IPv4",
"Description": "",
"TaskState": "Running",
"TaskStatus": "OK",
"StartTime": "2018-05-23T01:53:51+00:00",
"Messages": [],
"PercentComplete": null,
"Oem": {
"Public": {
"TaskPercentage": null
}
}
}响应码:202