NetworkProtocol
更新时间: 2026/07/01
在Gitcode上查看源码ResourceDefinition
uris
/redfish/v1/Managers/manager_id/NetworkProtocol
properties
| 名称 | 类型 | 是否只读 | 取值范围/枚举值 | 说明 |
|---|---|---|---|---|
| @odata.context | string | true | BMC服务集合资源模型的OData描述信息。 | |
| @odata.id | string | true | BMC服务集合资源的访问路径。 | |
| @odata.type | string | true | BMC服务集合资源类型。 | |
| Id | string | true | 指定BMC服务集合资源的ID。 | |
| Name | string | true | BMC服务集合资源的名称。 | |
| HostName | string | true | BMC主机名。 | |
| FQDN | string | true | BMC的全称域名,格式为:“主机名.域名” | |
| ProtocolEnabled | boolean | false | 服务的使能状态,包括: ● true ● false说明 “IPMI”的 “ProtocolEnabled”,表示 “RMCP+”的使能状态。 | |
| Port | number | false | 服务的端口号。 说明此端口号为IPMI服务的第一个端口号。 | |
| EnableSNMPv1 | boolean | false | SNMPv1使能状态说明BMC300 5.12.0.1及以上版本支持 | |
| EnableSNMPv2c | boolean | false | SNMPv2c使能状态说明BMC300 5.12.0.1及以上版本支持 | |
| EnableSNMPv3 | boolean | false | SNMPv3使能状态说明BMC300 5.12.0.1及以上版本支持 | |
| CommunityStrings | array | false | SNMP团体名对象集合说明BMC300 5.12.0.1及以上版本支持 | |
| AccessMode | string | false | 枚举值,SNMP团体名的访问级别:Limited:表示只读团体名Full:表示读写团体名说明BMC300 5.12.0.1及以上版本支持 | |
| CommunityString | string | false | SNMP团体名信息。如果非管理员查询,或者HideCommunityStrings取值为true,则显示null。 说明BMC300 5.12.0.1及以上版本支持 | |
| HideCommunityStrings | boolean | true | 指示是否隐藏团体名。非管理员查询时,显示null说明BMC300 5.12.0.1及以上版本支持 | |
| Certificates | object | true | HTTPS证书集合 | |
| Certificates.@odata.id | string | true | SSL证书集合资源的访问路径 | |
| RMCPEnabled | boolean | false | 服务的使能状态,包括: ● true ● false说明表示“RMCP”的使能状态。 | |
| RMCPPlusEnabled | boolean | false | 服务的使能状态,包括: ● true ● false说明表示“RMCP+”的使能状态。 | |
| Port1 | number | false | Port 1为主用端口,默认 “623” | |
| Port2 | number | false | Port 2为备用端口,默认 “664” | |
| NotifyMulticastIntervalSeconds | number | false | SSDP服务消息多播间隔时间。 | |
| NotifyTTL | number | false | SSDP服务消息存活时间。 | |
| NotifyIPv6Scope | string | false | SSDP服务消息IPv6多播范围。 ● Link:链路本地范围 ● Site:站点本地范围 ● Organization:机构本地范围 | |
| NotifyEnabled | boolean | false | SSDP服务消息多播使能状态 | |
| HttpProtocolVersion | string | false | HTTP协议版本,取值范围: ● 1.1(默认) ● 2 | |
| NTPServers | array | false | 手动配置的NTP服务器的ip地址,包含多个服务器ip地址,以英文的逗号(',') 分割。如果当前NTP是DHCP模式则为null参数类型: ● IPv4 ● IPv6 ● 域名(非中文字符串类型) | |
| NetworkSuppliedServers | array | true | DHCP获取的NTP服务器的ip地址,包含多个服务器ip地址,以英文的逗号(',') 分割。如果当前NTP是手动模式则为null参数类型: ● IPv4 ● IPv6 ● 域名(非中文字符串类型) |
supported_methods
- GET
- PATCH
HTTP methods
GET
命令功能
查询 BMC 服务信息
命令格式
URL: https://device_ip/redfish/v1/Managers/manager_id/NetworkProtocol
请求头:
X-Auth-Token: auth_value请求消息体: 无
参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| device_ip | 登录设备的IP地址 | IPv4或IPv6地址 |
| auth_value | 请求消息的鉴权参数 | 可通过/redfish/v1/SessionService/Sessions创建会话时获得 |
使用指南
无
使用实例
请求样例: GET https://device_ip/redfish/v1/Managers/manager_id/NetworkProtocol
X-Auth-Token: auth_value 请求消息体:无
响应样例:
json
{
"@odata.context": "/redfish/v1/$metadata#Managers/Members/1/NetworkProtocol/$entity",
"@odata.id": "/redfish/v1/Managers/1/NetworkProtocol",
"@odata.type": "#ManagerNetworkProtocol.v1_0_2.ManagerNetworkProtocol",
"Id": "NetworkProtocol",
"Name": "Manager Network Protocol",
"HostName": "iBMC",
"FQDN": "iBMC",
"HTTP": {
"ProtocolEnabled": true,
"Port": 80
},
"HTTPS": {
"ProtocolEnabled": true,
"Port": 443,
"Certificates": {
"@odata.id": "/redfish/v1/Managers/1/NetworkProtocol/HTTPS/Certificates"
}
},
"SNMP": {
"ProtocolEnabled": true,
"Port": 161,
"EnableSNMPv1": true,
"EnableSNMPv2c": true,
"EnableSNMPv3": true,
"CommunityStrings": [
{
"AccessMode": "Limited",
"CommunityString": "Rotest@community1"
},
{
"AccessMode": "Full",
"CommunityString": "Rwtest@community1"
}
],
"HideCommunityStrings": false
},
"VirtualMedia": {
"ProtocolEnabled": true,
"Port": 8208
},
"IPMI": {
"ProtocolEnabled": true,
"Port": 623
},
"SSH": {
"ProtocolEnabled": true,
"Port": 22
},
"KVMIP": {
"ProtocolEnabled": true,
"Port": 2198
},
"SSDP": {
"ProtocolEnabled": false,
"Port": 1900,
"NotifyMulticastIntervalSeconds": 600,
"NotifyTTL": 2,
"NotifyIPv6Scope": "Site"
},
"DHCP": {
"ProtocolEnabled": false
},
"DHCPv6": {
"ProtocolEnabled": false
},
"NTP": {
"ProtocolEnabled": true,
"NTPServers": [
"71.41.33.30"
],
"NetworkSuppliedServers": null
},
"RFB": {
"ProtocolEnabled": true,
"Port": 5900
},
"Oem": {
"Public": {
"VNC": {
"ProtocolEnabled": true,
"Port": 5900
},
"Video": {
"ProtocolEnabled": true,
"Port": 2199
},
"NAT": {
"ProtocolEnabled": true,
"Port": 22
},
"IPMI": {
"RMCPEnabled": false,
"RMCPPlusEnabled": true,
"Port1": 623,
"Port2": 664
},
"SSDP": {
"NotifyEnabled": false
},
"HttpProtocolVersion": "1.1"
}
}
}响应码:200
PATCH
命令功能
修改 BMC 服务信息
命令格式
URL: https://device_ip/redfish/v1/Managers/manager_id/NetworkProtocol
请求头:
X-Auth-Token: auth_value
Content-Type: header_type
If-Match: ifmatch_value请求消息体:
json
{
"ServerType": {
"ProtocolEnabled": state,
"Port": portid,
"NotifyMulticastIntervalSeconds": time,
"NotifyTTL": ttl,
"NotifyIPv6Scope": scope,
"NTPServers": ntp_servers,
"EnableSNMPv1": snmpv1_enable,
"EnableSNMPv2c": snmpv2c_enable,
"EnableSNMPv3": snmpv3_enable,
"CommunityStrings": [
{
"AccessMode": access_mode,
"CommunityString": community_string,
"HideCommunityStrings": is_hide_community,
"Oem": {
"Public": {
"OEMServerType": {
"ProtocolEnabled": state,
"Port": portid,
"IPMI": {
"RMCPEnabled": state,
"RMCPPlusEnabled": state,
"Port1": portid,
"Port2": portid,
"SSDP": {
"NotifyEnabled": state,
"HttpProtocolVersion": version
}
}
}
}
}
}
]
}
}请求头参数说明
参见 请求头参数说明
请求体参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| ifmatch_value | 请求消息的匹配参数 | 可通过对相应资源发起GET操作,从响应头中获取(对应于“ETag”参数) |
| ServerType | 待设置的服务类型(交换板仅支持HTTPS,SSDP服务) | 可修改的服务类型,包括: ● HTTP ● HTTPS ● SNMP ● VirtualMedia ● IPMI ● SSH ● KVMIP ● SSDP |
| state | 服务的使能状态 | ● true ● false |
| portid | 服务的端口号 | 1~65535 SSDP: 1024~65536 |
| time | SSDP服务消息多播间隔时间 | 0~1800的整数,单位为秒。 |
| ttl | SSDP服务消息存活时间 | 1~255的整数 |
| scope | SSDP服务消息IPv6多播范围 | ● Link:链路本地范围 ● Site:站点本地范围 ● Organization:机构本地范围 |
| ntp_servers | 手动配置的NTP服务器的ip地址,包含多个服务器ip地址,以英文的逗号(',') 分割。 | 参数类型: ● IPv4 ● IPv6 ● 域名(非中文字符串类型) |
| snmpv1_enable | SNMPv1使能状态 | true false说明BMC300 5.12.0.1及以上版本支持 |
| snmpv2c_enable | SNMPv2c使能状态 | true false说明BMC300 5.12.0.1及以上版本支持 |
| snmpv3_enable | SNMPv3使能状态 | true false说明BMC300 5.12.0.1及以上版本支持 |
| access_mode | 枚举值,SNMP团体名的访问级别 | Limited:表示只读团体名Full:表示读写团体名说明BMC300 5.12.0.1及以上版本支持 |
| community_string | SNMP团体名信息。 当access_mode为Limited时,修改只读团体名; 当access_mode为Full时, 修改读写团体名 | 字符串,格式要求: ● 不能包含空格 ● 只读团体名为空字符串时,可删除只读团体名 ● 读写团体名为空字符串时,可删除读写团体名 ● 长度要求: 默认长度1 ~ 32字节,开启超长口令后16 ~ 32字节 ● 密码复杂度校验: 开启时,长度最少为8字节;至少包含两种字符的组合(小写字符、大写字符、数字、特殊字符) ● 和上一次设置的密码至少有两个字符位的差异 ● 只读团体名和读写团体名互不能相同说明BMC300 5.12.0.1及以上版本支持 |
| is_hide_community | SNMP服务是否隐藏团体名 | true false说明BMC300 5.12.0.1及以上版本支持 |
| OEMServerType | 待设置的OEM服务类型 | 可修改的服务类型,包括: ● VNC ● Video ● NAT ● IPMI |
| state | 布尔 | 服务的使能状态,包括: ● true ● false |
| portid | 数字 | 服务的端口号。1 ~ 65535 |
| version | 字符串 | HTTP协议版本,取值范围: ● 1.1(默认) ● 2说明设置该属性后,系统会自动复位nginx来生效变更。 |
使用指南
可同时设置多个服务的参数。
使用实例
请求样例: PATCH https://device_ip/redfish/v1/Managers/manager_id/NetworkProtocol
X-Auth-Token: auth_value Content-Type: header_type If-Match: ifmatch_value 请求消息体:
json
{
"ServerType": {
"ProtocolEnabled": state,
"Port": portid,
"NotifyMulticastIntervalSeconds": time,
"NotifyTTL": ttl,
"NotifyIPv6Scope": scope,
"NTPServers": ntp_servers,
"EnableSNMPv1": snmpv1_enable,
"EnableSNMPv2c": snmpv2c_enable,
"EnableSNMPv3": snmpv3_enable,
"CommunityStrings": [
{
"AccessMode": access_mode,
"CommunityString": community_string,
"HideCommunityStrings": is_hide_community,
"Oem": {
"Public": {
"OEMServerType": {
"ProtocolEnabled": state,
"Port": portid,
"IPMI": {
"RMCPEnabled": state,
"RMCPPlusEnabled": state,
"Port1": portid,
"Port2": portid,
"SSDP": {
"NotifyEnabled": state,
"HttpProtocolVersion": version
}
}
}
}
}
}
]
}
}响应样例:
json
{
"@odata.context": "/redfish/v1/$metadata#Managers/Members/1/NetworkProtocol/$entity",
"@odata.id": "/redfish/v1/Managers/1/NetworkProtocol",
"@odata.type": "#ManagerNetworkProtocol.v1_0_2.ManagerNetworkProtocol",
"Id": "NetworkProtocol",
"Name": "Manager Network Protocol",
"HostName": "iBMC",
"FQDN": "iBMC",
"HTTP": {
"ProtocolEnabled": true,
"Port": 80
},
"HTTPS": {
"ProtocolEnabled": true,
"Port": 443
},
"SNMP": {
"ProtocolEnabled": true,
"Port": 65100,
"EnableSNMPv1": true,
"EnableSNMPv2c": true,
"EnableSNMPv3": true,
"CommunityStrings": [
{
"AccessMode": "Limited",
"CommunityString": "Rotest@community1"
},
{
"AccessMode": "Full",
"CommunityString": "Rwtest@community1"
}
],
"HideCommunityStrings": false
},
"VirtualMedia": {
"ProtocolEnabled": true,
"Port": 8208
},
"IPMI": {
"ProtocolEnabled": true,
"Port": 65120
},
"SSH": {
"ProtocolEnabled": false,
"Port": 1022
},
"KVMIP": {
"ProtocolEnabled": true,
"Port": 219
},
"SSDP": {
"ProtocolEnabled": false,
"Port": 1900,
"NotifyMulticastIntervalSeconds": 600,
"NotifyTTL": 2,
"NotifyIPv6Scope": "Site"
},
"DHCP": {
"ProtocolEnabled": false
},
"DHCPv6": {
"ProtocolEnabled": false
},
"NTP": {
"ProtocolEnabled": true,
"NTPServers": [
"71.41.33.30"
],
"NetworkSuppliedServers": null
},
"RFB": {
"ProtocolEnabled": true,
"Port": 5900
},
"Oem": {
"Public": {
"VNC": {
"ProtocolEnabled": true,
"Port": 5900
},
"Video": {
"ProtocolEnabled": true,
"Port": 2599
},
"NAT": {
"ProtocolEnabled": true,
"Port": 22
},
"IPMI": {
"RMCPEnabled": false,
"RMCPPlusEnabled": true,
"Port1": 625,
"Port2": 664
},
"SSDP": {
"NotifyEnabled": false
},
"HttpProtocolVersion": "1.1"
}
}
}响应码:200