您可以使用 GetNetworkInterface 方法获取有关某个节点上的网络接口的信息。
此方法具有以下输入参数:
名称 | 说明 | 类型 | 默认值 | 必需 |
---|---|---|---|---|
interface | 每个节点上要获取其相关信息的接口名称。可能值:
|
字符串 | 无 | 否 |
force | 将此参数设置为 true,可在集群中的所有节点上运行。 | 布尔型 | false | 否 |
此方法具有以下返回值:
名称 | 说明 | 类型 |
---|---|---|
nodes | 一个对象数组,用于说明存储集群中每个存储节点上的接口。此数组中的每个对象都包含以下项:
|
JSON 对象数组 |
此方法的请求类似于以下示例:
{ "method": "GetNetworkInterface", "params": { "interface": "Bond1G", "force": true }, "id": 1 }
此方法返回类似于以下示例的响应:
{ "id": 1, "result": { "nodes": [ { "nodeID": 1, "result": { "interface": { "address": "10.117.64.32", "addressV6": "::", "broadcast": "10.117.79.255", "macAddress": "90:b1:1c:42:e0:1e", "mtu": 1500, "name": "Bond1G", "namespace": false, "netmask": "255.255.240.0", "status": "UpAndRunning", "type": "BondMaster", "virtualNetworkTag": 0 } } }, { "nodeID": 2, "result": { "interface": { "address": "10.117.64.35", "addressV6": "::", "broadcast": "10.117.79.255", "macAddress": "d4:ae:52:7a:ae:23", "mtu": 1500, "name": "Bond1G", "namespace": false, "netmask": "255.255.240.0", "status": "UpAndRunning", "type": "BondMaster", "virtualNetworkTag": 0 } } }, { "nodeID": 3, "result": { "interface": { "address": "10.117.64.39", "addressV6": "::", "broadcast": "10.117.79.255", "macAddress": "c8:1f:66:f0:9d:17", "mtu": 1500, "name": "Bond1G", "namespace": false, "netmask": "255.255.240.0", "status": "UpAndRunning", "type": "BondMaster", "virtualNetworkTag": 0 } } }, { "nodeID": 4, "result": { "interface": { "address": "10.117.64.107", "addressV6": "::", "broadcast": "10.117.79.255", "macAddress": "b8:ca:3a:f5:24:f8", "mtu": 1500, "name": "Bond1G", "namespace": false, "netmask": "255.255.240.0", "status": "UpAndRunning", "type": "BondMaster", "virtualNetworkTag": 0 } } } ] } }
9.6