查询以太网接口资源信息
命令功能
查询指定主机以太网接口资源的信息。
命令格式
操作类型:GET
URL:https://device_ip/redfish/v1/Systems/EthernetInterfaces/<eth_Id>
请求头:
X-Auth-Token: auth_value
请求消息体:无
URL参数
参数名 |
是否必选 |
参数说明 |
取值 |
|---|---|---|---|
<eth_Id> |
必选 |
网口资源的ID。 |
OS侧显示的网口名,取值为GMAC0或GMAC1。 |
使用指南
为保障边缘管理系统的正常使用,避免出现卡顿或者上传、下载任务过慢的问题,网络带宽必须满足基本要求,推荐值如下:
- 边缘管理系统所在边缘设备与Web客户端之间的带宽 ≥ 20Mbit/s
- 其他网络要求:时延 < 30ms,丢包率 < 3%
使用实例
请求样例:
GET https://10.10.10.10/redfish/v1/Systems/EthernetInterfaces/GMAC0
请求头:
X-Auth-Token: auth_value
请求消息体:无
{
"@odata.context": "/redfish/v1/$metadata#Systems/Members/EthernetInterfaces/Members/$entity",
"@odata.id": "/redfish/v1/Systems/EthernetInterfaces/GMAC0",
"@odata.type": "#EthernetInterface.v1_8_0.EthernetInterface",
"Id": "GMAC0",
"Name": "eth0",
"Description": "Ethernet Interface over Wired Network Adapter",
"PermanentMACAddress": "00:18:C0:xx:xx:03",
"MACAddress": "00:18:C0:xx:xx:04",
"InterfaceEnabled": true,
"LinkStatus": "LinkUp",
"IPv4Addresses": [{
"Address": "xx.xx.xx.xx",
"SubnetMask": "255.255.0.0",
"Gateway": "xx.xx.xx.xx",
"VlanId": "null",
"AddressOrigin": "Static",
"Tag": "Mgmt"
}],
"IPv6Addresses": [{
"Address": "fe80::xxxx:xxxx:xxxx:6403",
"PrefixLength": 64,
"AddressOrigin": "LinkLocal",
"AddressState": "Preferred"",
"Gateway": null
}],
"IPv6DefaultGateway": "xxxx::xxxx",
"NameServers": [
"xxx.xxx.xxx"
],
"Oem": {
"WorkMode": "1000Mbps"
"AdapterType": "GMAC,
"LteDataSwitchOn": true,
"Connections": [],
"Statistic": {
"SendPackages": "123456",
"RecvPackages": "123456",
"ErrorPackages": "123456",
"DropPackages": "123456"
}
}
}
响应码:200
输出说明
字段 |
类型 |
说明 |
|---|---|---|
@odata.context |
字符串 |
指定网口资源模型的OData描述信息。 |
@odata.id |
字符串 |
指定网口资源节点的访问路径。 |
@odata.type |
字符串 |
指定网口资源类型。 |
Id |
字符串 |
指定网口资源的唯一标识。 GMAC+数字,有线网口 |
Name |
字符串 |
指定网口资源的名称。 |
Description |
字符串 |
指定网口的描述信息。 |
PermanentMACAddress |
字符串 |
网口的永久MAC地址。 |
MACAddress |
字符串 |
网口的当前MAC地址。 |
InterfaceEnabled |
布尔值 |
网口是否使能。 |
LinkStatus |
字符串 |
Link状态。
|
IPv4Addresses[] |
数组 |
IPv4地址表。 |
IPv4Addresses[].Address |
字符串 |
IPv4地址。 |
IPv4Addresses[].SubnetMask |
字符串 |
子网掩码。 |
IPv4Addresses[].Gateway |
字符串 |
网关。 |
IPv4Addresses[].VlanId |
字符串 |
Vlan ID。 |
IPv4Addresses[].AddressOrigin |
字符串 |
地址来源。
|
IPv4Addresses[].Tag |
字符串 |
IP地址用途标签。 |
IPv6Addresses[] |
数组 |
IPv6地址表。 |
IPv6Addresses[].Address |
字符串 |
IPv6地址。 |
IPv6Addresses[].PrefixLength |
字符串 |
IPv6前缀长度。 |
IPv6Addresses[].AddressOrigin |
字符串 |
地址来源。
|
IPv6Addresses[].AddressState |
字符串 |
地址状态。
|
IPv6Addresses[].Gateway |
字符串 |
IPv6默认网关。 |
IPv6Addresses[].Tag |
字符串 |
IP地址用途标签。 |
NameServers |
数组 |
DNS字符串。 |
Oem |
对象 |
自定义字段。 |
Oem.WorkMode |
字符串 |
网口工作模式。
|
Oem.AdapterType |
字符串 |
指定网口的类型。取值为GMAC。 |
Oem.LteDataSwitchOn |
布尔值 |
移动数据是否开关。 |
Oem.Connections[] |
数组 |
可用连接列表。 |
Oem.Statistic[].SendPackages |
字符串 |
发包。 |
Oem.Statistic[].RecvPackages |
字符串 |
收包。 |
Oem.Statistic[].ErrorPackages |
字符串 |
错包。 |
Oem.Statistic[].DropPackages |
字符串 |
丢包。 |