代码仓
中
NetworkProtocol
更新时间: 2026/11/04
在AtomGit上查看源码

ResourceDefinition ​

uris ​

  • /redfish/v1/Managers/manager_id/NetworkProtocol

properties ​

名称类型是否只读取值范围/枚举值说明
@odata.contextstringtrue-BMC服务集合资源模型的OData描述信息。
@odata.idstringtrue-BMC服务集合资源的访问路径。
@odata.typestringtrue-BMC服务集合资源类型。
HTTP {objecttrue-HTTP服务配置信息
HTTP.Portnumbertrue-端口号
HTTP.ProtocolEnabledbooleantruetrue,false协议是否使能
}
Idstringtrue-指定BMC服务集合资源的ID。
IPMI {objecttrue-IPMI服务配置信息
IPMI.Portnumbertrue-端口号
IPMI.ProtocolEnabledbooleantruetrue,false协议是否使能
}
KVMIP {objecttrue-KVMIP服务配置信息
KVMIP.Portnumbertrue-端口号
KVMIP.ProtocolEnabledbooleantruetrue,false协议是否使能
}
Namestringtrue-BMC服务集合资源的名称。
HostNamestringtrue-BMC主机名。
DHCP {objecttrue-DHCP服务配置信息
DHCP.ProtocolEnabledbooleantruetrue,false协议是否使能
}
DHCPv6 {objecttrue-DHCPv6服务配置信息
DHCPv6.ProtocolEnabledbooleantruetrue,false协议是否使能
}
FQDNstringtrue-BMC的全称域名,格式为:“主机名.域名”
SNMP {objectfalse-SNMP服务配置信息
SNMP.Portnumbertrue-端口号
SNMP.ProtocolEnabledbooleantruetrue,false协议是否使能
SNMP.EnableSNMPv1booleanfalse-SNMPv1使能状态
说明
openUBMC 25.12 LTS及以上版本支持
SNMP.EnableSNMPv2cbooleanfalse-SNMPv2c使能状态
说明
openUBMC 25.12 LTS及以上版本支持
SNMP.EnableSNMPv3booleanfalse-SNMPv3使能状态
说明
openUBMC 25.12 LTS及以上版本支持
SNMP.CommunityStrings [ {arrayfalse-SNMP团体名对象集合
说明
openUBMC 25.12 LTS及以上版本支持
SNMP.CommunityStrings[].AccessModestringfalse-枚举值,SNMP团体名的访问级别:Limited:表示只读团体名Full:表示读写团体名
说明
openUBMC 25.12 LTS及以上版本支持
SNMP.CommunityStrings[].CommunityStringstringfalse-SNMP团体名信息。如果非管理员查询,或者HideCommunityStrings取值为true,则显示null。
说明
openUBMC 25.12 LTS及以上版本支持
} ]
SNMP.HideCommunityStringsbooleantrue-指示是否隐藏团体名。非管理员查询时,显示null
说明
openUBMC 25.12 LTS及以上版本支持
}
HTTPS {objecttrue-HTTPS服务配置信息
HTTPS.Portnumbertrue-端口号
HTTPS.ProtocolEnabledbooleantruetrue,false协议是否使能
HTTPS.Certificates {objecttrue-HTTPS证书集合
HTTPS.Certificates.@odata.idstringtrue-SSL证书集合资源的访问路径
}
}
Oem {objecttrue-自定义BMC服务属性
Oem.Public {objecttrue-自定义BMC服务属性
Oem.Public.NAT {objecttrue-NAT配置信息
Oem.Public.NAT.Portnumbertrue-端口号
Oem.Public.NAT.ProtocolEnabledbooleantruetrue,false协议是否使能
}
Oem.Public.VNC {objecttrue-VNC服务配置信息
Oem.Public.VNC.Portnumbertrue-端口号
Oem.Public.VNC.ProtocolEnabledbooleantruetrue,false协议是否使能
}
Oem.Public.Video {objecttrue-视频服务配置信息
Oem.Public.Video.Portnumbertrue-端口号
Oem.Public.Video.ProtocolEnabledbooleantruetrue,false协议是否使能
}
Oem.Public.IPMI {objecttrue-IPMI服务配置信息
Oem.Public.IPMI.RMCPEnabledbooleanfalse-服务的使能状态,包括:
● true
● false说明表示“RMCP”的使能状态。
Oem.Public.IPMI.RMCPPlusEnabledbooleanfalse-服务的使能状态,包括:
● true
● false说明表示“RMCP+”的使能状态。
Oem.Public.IPMI.Port1numberfalse-Port 1为主用端口,默认“623”
Oem.Public.IPMI.Port2numberfalse-Port 2为备用端口,默认“664”
}
Oem.Public.SSDP {objecttrue-SSDP服务配置信息
Oem.Public.SSDP.NotifyEnabledbooleanfalse-SSDP服务消息多播使能状态
}
Oem.Public.HttpProtocolVersionstringfalse-HTTP协议版本,取值范围:
● 1.1(默认)
● 2
}
}
SSDP {objecttrue-SSDP服务配置信息
SSDP.Portnumbertrue-端口号
SSDP.ProtocolEnabledbooleantruetrue,false协议是否使能
SSDP.NotifyMulticastIntervalSecondsnumberfalse-SSDP服务消息多播间隔时间。
SSDP.NotifyTTLnumberfalse-SSDP服务消息存活时间。
SSDP.NotifyIPv6Scopestringfalse-SSDP服务消息IPv6多播范围。
● Link:链路本地范围
● Site:站点本地范围
● Organization:机构本地范围
}
NTP {objecttrue-NTP服务配置信息
NTP.ProtocolEnabledbooleantruetrue,false协议是否使能
NTP.NTPServers[ ]arrayfalse-手动配置的NTP服务器的ip地址,包含多个服务器ip地址,以英文的逗号(',') 分割。如果当前NTP是DHCP模式则为null参数类型:
● IPv4:IPv4模式
● IPv6:IPv6模式
● 域名(非中文字符串类型)
NTP.NetworkSuppliedServersarraytrue-DHCP获取的NTP服务器的ip地址,包含多个服务器ip地址,以英文的逗号(',') 分割。如果当前NTP是手动模式则为null参数类型:
● IPv4:IPv4模式
● IPv6:IPv6模式
● 域名(非中文字符串类型)
}
RFB {objecttrue-RFB服务配置信息
RFB.Portnumbertrue-端口号
RFB.ProtocolEnabledbooleantruetrue,false协议是否使能
}
SSH {objecttrue-SSH服务配置信息
SSH.Portnumbertrue-端口号
SSH.ProtocolEnabledbooleantruetrue,false协议是否使能
}
VirtualMedia {objecttrue-虚拟媒体服务配置信息
VirtualMedia.Portnumbertrue-端口号
VirtualMedia.ProtocolEnabledbooleantruetrue,false协议是否使能
}
Statestringtrue-BMC服务集合资源使能状态
Status {objecttrue-指定BMC服务集合资源的状态
Status.Statestringtrue-BMC服务集合资源使能状态
}

supported_methods ​

  • GET
  • PATCH

HTTP methods ​

GET ​

命令功能

查询 BMC 服务信息

命令格式

URL: https://device_ip/redfish/v1/Managers/manager_id/NetworkProtocol

请求头:

text
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

请求头:

text
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
}
}
}
}
}
}
]
}
}

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
ServerType待设置的服务类型(交换板仅支持HTTPS,SSDP服务)可修改的服务类型,包括:
● HTTP
● HTTPS
● SNMP
● VirtualMedia
● IPMI
● SSH
● KVMIP
● SSDP
ProtocolEnabled服务的使能状态● true
● false
Port服务的端口号1~65535 SSDP: 1024~65536
NotifyMulticastIntervalSecondsSSDP服务消息多播间隔时间0~1800的整数,单位为秒。
NotifyTTLSSDP服务消息存活时间1~255的整数
NotifyIPv6ScopeSSDP服务消息IPv6多播范围● Link:链路本地范围
● Site:站点本地范围
● Organization:机构本地范围
NTPServers手动配置的NTP服务器的ip地址,包含多个服务器ip地址,以英文的逗号(',') 分割。参数类型:
● IPv4
● IPv6
● 域名(非中文字符串类型)
EnableSNMPv1SNMPv1使能状态true false
说明
openUBMC 25.12 LTS及以上版本支持
EnableSNMPv2cSNMPv2c使能状态true false
说明
openUBMC 25.12 LTS及以上版本支持
EnableSNMPv3SNMPv3使能状态true false
说明
openUBMC 25.12 LTS及以上版本支持
AccessMode枚举值,SNMP团体名的访问级别Limited:表示只读团体名Full:表示读写团体名
说明
openUBMC 25.12 LTS及以上版本支持
CommunityStringSNMP团体名信息。当access_mode为Limited时,修改只读团体名;当access_mode为Full时,修改读写团体名字符串,格式要求:
● 不能包含空格
● 只读团体名为空字符串时,可删除只读团体名
● 读写团体名为空字符串时,可删除读写团体名
● 长度要求:默认长度1 ~ 32字节,开启超长口令后16 ~ 32字节
● 密码复杂度校验:开启时,长度最少为8字节;至少包含两种字符的组合(小写字符、大写字符、数字、特殊字符)
● 和上一次设置的密码至少有两个字符位的差异
● 只读团体名和读写团体名互不能相同
说明
openUBMC 25.12 LTS及以上版本支持
HideCommunityStringsSNMP服务是否隐藏团体名true false
说明
openUBMC 25.12 LTS及以上版本支持
OEMServerType待设置的OEM服务类型可修改的服务类型,包括:
● VNC
● Video
● NAT
● IPMI
ProtocolEnabled布尔服务的使能状态,包括:
● true
● false
Port数字服务的端口号。1 ~ 65535
HttpProtocolVersion字符串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