NetworkProtocol
更新时间: 2026/07/01
在Gitcode上查看源码

ResourceDefinition

uris

  • /redfish/v1/Managers/manager_id/NetworkProtocol

properties

名称类型是否只读取值范围/枚举值说明
@odata.contextstringtrueBMC服务集合资源模型的OData描述信息。
@odata.idstringtrueBMC服务集合资源的访问路径。
@odata.typestringtrueBMC服务集合资源类型。
Idstringtrue指定BMC服务集合资源的ID。
NamestringtrueBMC服务集合资源的名称。
HostNamestringtrueBMC主机名。
FQDNstringtrueBMC的全称域名,格式为:“主机名.域名”
ProtocolEnabledbooleanfalse服务的使能状态,包括:
● true
● false说明 “IPMI”的 “ProtocolEnabled”,表示 “RMCP+”的使能状态。
Portnumberfalse服务的端口号。 说明此端口号为IPMI服务的第一个端口号。
EnableSNMPv1booleanfalseSNMPv1使能状态说明BMC300 5.12.0.1及以上版本支持
EnableSNMPv2cbooleanfalseSNMPv2c使能状态说明BMC300 5.12.0.1及以上版本支持
EnableSNMPv3booleanfalseSNMPv3使能状态说明BMC300 5.12.0.1及以上版本支持
CommunityStringsarrayfalseSNMP团体名对象集合说明BMC300 5.12.0.1及以上版本支持
AccessModestringfalse枚举值,SNMP团体名的访问级别:Limited:表示只读团体名Full:表示读写团体名说明BMC300 5.12.0.1及以上版本支持
CommunityStringstringfalseSNMP团体名信息。如果非管理员查询,或者HideCommunityStrings取值为true,则显示null。 说明BMC300 5.12.0.1及以上版本支持
HideCommunityStringsbooleantrue指示是否隐藏团体名。非管理员查询时,显示null说明BMC300 5.12.0.1及以上版本支持
CertificatesobjecttrueHTTPS证书集合
Certificates.@odata.idstringtrueSSL证书集合资源的访问路径
RMCPEnabledbooleanfalse服务的使能状态,包括:
● true
● false说明表示“RMCP”的使能状态。
RMCPPlusEnabledbooleanfalse服务的使能状态,包括:
● true
● false说明表示“RMCP+”的使能状态。
Port1numberfalsePort 1为主用端口,默认 “623”
Port2numberfalsePort 2为备用端口,默认 “664”
NotifyMulticastIntervalSecondsnumberfalseSSDP服务消息多播间隔时间。
NotifyTTLnumberfalseSSDP服务消息存活时间。
NotifyIPv6ScopestringfalseSSDP服务消息IPv6多播范围。
● Link:链路本地范围
● Site:站点本地范围
● Organization:机构本地范围
NotifyEnabledbooleanfalseSSDP服务消息多播使能状态
HttpProtocolVersionstringfalseHTTP协议版本,取值范围:
● 1.1(默认)
● 2
NTPServersarrayfalse手动配置的NTP服务器的ip地址,包含多个服务器ip地址,以英文的逗号(',') 分割。如果当前NTP是DHCP模式则为null参数类型:
● IPv4
● IPv6
● 域名(非中文字符串类型)
NetworkSuppliedServersarraytrueDHCP获取的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
timeSSDP服务消息多播间隔时间0~1800的整数,单位为秒。
ttlSSDP服务消息存活时间1~255的整数
scopeSSDP服务消息IPv6多播范围● Link:链路本地范围
● Site:站点本地范围
● Organization:机构本地范围
ntp_servers手动配置的NTP服务器的ip地址,包含多个服务器ip地址,以英文的逗号(',') 分割。参数类型:
● IPv4
● IPv6
● 域名(非中文字符串类型)
snmpv1_enableSNMPv1使能状态true false说明BMC300 5.12.0.1及以上版本支持
snmpv2c_enableSNMPv2c使能状态true false说明BMC300 5.12.0.1及以上版本支持
snmpv3_enableSNMPv3使能状态true false说明BMC300 5.12.0.1及以上版本支持
access_mode枚举值,SNMP团体名的访问级别Limited:表示只读团体名Full:表示读写团体名说明BMC300 5.12.0.1及以上版本支持
community_stringSNMP团体名信息。 当access_mode为Limited时,修改只读团体名; 当access_mode为Full时, 修改读写团体名字符串,格式要求:
● 不能包含空格
● 只读团体名为空字符串时,可删除只读团体名
● 读写团体名为空字符串时,可删除读写团体名
● 长度要求: 默认长度1 ~ 32字节,开启超长口令后16 ~ 32字节
● 密码复杂度校验: 开启时,长度最少为8字节;至少包含两种字符的组合(小写字符、大写字符、数字、特殊字符)
● 和上一次设置的密码至少有两个字符位的差异
● 只读团体名和读写团体名互不能相同说明BMC300 5.12.0.1及以上版本支持
is_hide_communitySNMP服务是否隐藏团体名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