-
响应示例 返回状态码为200:AP接口配置结果,结构体参见CloudInterfaceConfigResponsesDto。 {
"errcode": "0",
"errmsg": "",
"data": [
{
"name": "MultiGE0/0/0",
"interfaceStatus": true,
"description": "111",
"lldpStatus": false,
"sence": "accessStrict",
"defaultVlanId": 1,
"bindingCheck": false,
"macMaxNumber": null,
"trunkVlan": null,
"upLimit": "null",
"transmitMode": "bridge",
"aclId": null
},
{
"name": "GigabitEthernet0/0/0",
"interfaceStatus": true,
"description": null,
"lldpStatus": true,
"sence": "uppoint",
"defaultVlanId": 1,
"bindingCheck": null,
"macMaxNumber": null,
"trunkVlan": "2",
"upLimit": "null",
"transmitMode": null,
"aclId": null
}
]
} 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
-
请求示例 HTTP的示例 GET /controller/campus/api/v1/networkconfig/cloudapinterface/fbde1c5d-5b94-49e3-a912-48641015e45c HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-AC
CES S-TOKEN: x-yyyyyy
-
响应参数 返回状态码为200:AP接口配置结果,结构体参见CloudInterfaceConfigResponsesDto。 表2 CloudInterfaceConfigResponsesDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~256个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "" data ARRAY_REFERENCE 0-65535个列表项,详细请参见表3。 接口配置信息,结构体参见CloudApInterfaceConfig。 - 表3 CloudApInterfaceConfig对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 name string 0~256个字符。 - 接口名称。 "GigabitEthernet0/0/1" interfaceStatus boolean true false - 接口管理状态。 true description string 0~256个字符。 - 描述。 "描述信息" lldpStatus boolean true false - LLDP开关。 true sence string 0~256个字符。 - 场景。取值root(WAN)、uppoint(上行直连交换机)、endpoint(下行直连交换机)、accessStrict(下行直连PC) "endpoint" defaultVlanId int32 [0-65535] - 缺省VLAN。 "1" bindingCheck boolean true false - 是否启用该网口的动态ARP检测功能、IP报文检查功能和DHCP Snooping功能。 true macMaxNumber int32 [0-65535] - 最大MAC数。 1 trunkVlan string 0~256个字符。 - 允许通过的VLAN。范围:1~4094,如:1,1-5,最多支持10段,每个设备最多可配置64个VLAN。 "1" upLimit string 0~256个字符。 - 终端上行限速(Mbit/s),取值范围 0.1~10000Mbps。 "1" transmitMode string 0~256个字符。 - 转发模式,取值nat,bridge。 "nat" aclId string 36个字符。 - acl Id。通过接口获取。在接口层面基于目的IP地址、协议和端口控制允许或禁止访问指定资源。 "fbde1c5d-5b94-49e3-a912-48641015e45c" macLimit boolean true false - mac配置使能。 true upLimitEnable boolean true false - 终端流量上行限速使能。 true tcpAdjustMss int32 [128-2048] - TCP Adjust MSS。 128 userSeparation boolean true false - 是否用户隔离。当userSeparation为true时,开启二三层用户隔离。 false separationOption string 0~256个字符。 - 用户隔离状态。取值范围:all---开启二三层隔离,l2---开启二层隔离,disable---不隔离。当userSeparation为true时,separationOption只允许为all 或 l2,默认为all;当userSeparation为false时,separationOption只允许为disable。V200R022C10版本以及之后的设备版本,separationOption生效。 "disable" insertOption82Enable boolean true false false 是否插入Option82选项。默认值为false。 false option82 REFERENCE 详细请参见表4。 当insertOption82Enable为true时,该字段必填;为false时,该字段不生效,结构体参见Option82Dto。 - ndSnoopingTrustEnable boolean true false false 启用或禁用nd信任接口。 false 表4 Option82Dto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 circuitId REFERENCE 详细请参见表5。 链路代理ID,结构体参见OptionParamDto。 - remoteId REFERENCE 详细请参见表5。 远程代理ID,结构体参见OptionParamDto。 - 表5 OptionParamDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 connectorPattern string colon semicolon colon 选项不同类型内容间的连接符。可取值为:colon、semicolon。默认值为colon。 "colon" contentType string ap-mac ap-mac-ifname ap-location ap-location-ifname ap-name ap-name-ifname user-defined ap-mac 选项内容类型。可取值为:ap-mac、ap-mac-ifname、ap-location、ap-location-ifname、ap-name、ap-name-ifname、user-defined。默认值为ap-mac。 "ap-mac" format string ascii normal compact hex colon ascii 选项内容格式。可取值为:ascii、normal、compact、hex、colon。当contentType为ap-mac时,所有选项均可选择;当contentType为ap-mac-ifname,hex不可选择。默认值为ascii。 "ascii" userDefinedText string 0~255个字符。 - 自定义内容,当contentType为user-defined时,此字段为必填字段。 "xxx" 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。
-
请求示例 HTTP的示例 PUT /controller/campus/api/v1/networkconfig/cloudapinterface/fbde1c5d-5b94-49e3-a912-48641015e45c HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-yyyyyy
{
"interfaceConfigs" : [
{
"name" : "GigabitEthernet0/0/1",
"interfaceStatus" : true,
"description" : "描述信息",
"lldpStatus" : true,
"sence" : "endpoint",
"defaultVlanId" : "1",
"bindingCheck" : true,
"macMaxNumber" : 1,
"trunkVlan" : "1",
"upLimit" : "1",
"transmitMode" : "nat",
"aclId" : "fbde1c5d-5b94-49e3-a912-48641015e45c",
"macLimit" : true,
"upLimitEnable" : true,
"tcpAdjustMss" : 128,
"userSeparation" : false,
"separationOption" : "disable",
"insertOption82Enable" : false,
"option82" : {
"circuitId" : {
"connectorPattern" : "colon",
"contentType" : "ap-mac",
"format" : "ascii",
"userDefinedText" : "xxx"
},
"remoteId" : {
"connectorPattern" : "colon",
"contentType" : "ap-mac",
"format" : "ascii",
"userDefinedText" : "xxx"
}
},
"ndSnoopingTrustEnable" : false
}
]
}
-
响应示例 返回状态码为200:Cloud AP接口配置结果,返回结构体参见CloudInterfaceConfigResponsesDto。 {
"errcode": "0",
"errmsg": "",
"data": [
{
"name": "MultiGE0/0/0",
"defaultVlanId": "1",
"description": "",
"interfaceStatus": true,
"lldpStatus": true,
"sence": "uppoint",
"trunkVlan": "2"
},
{
"name": "GigabitEthernet0/0/0",
"defaultVlanId": "1",
"description": "",
"interfaceStatus": true,
"lldpStatus": true,
"sence": "uppoint",
"trunkVlan": "2"
}
]
} 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
-
请求参数 表2 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 interfaceConfigApiDto 是 REFERENCE 详细请参见表3。 Cloud AP接口配置入参,结构体参见CloudApInterfaceConfigDto。 - 表3 CloudApInterfaceConfigDto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 interfaceConfigs 否 ARRAY_REFERENCE 1-200个列表项,详细请参见表4。 云AP接口配置配置列表,结构体参见CloudApInterfaceConfig。 - 表4 CloudApInterfaceConfig对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 name 否 string 0~256个字符。 - 接口名称。 "GigabitEthernet0/0/1" interfaceStatus 否 boolean true false - 接口管理状态。 true description 否 string 0~256个字符。 - 描述。 "描述信息" lldpStatus 否 boolean true false - LLDP开关。 true sence 否 string 0~256个字符。 - 场景。取值root(WAN)、uppoint(上行直连交换机)、endpoint(下行直连交换机)、accessStrict(下行直连PC) "endpoint" defaultVlanId 否 int32 [0-65535] - 缺省VLAN。 "1" bindingCheck 否 boolean true false - 是否启用该网口的动态ARP检测功能、IP报文检查功能和DHCP Snooping功能。 true macMaxNumber 否 int32 [0-65535] - 最大MAC数。 1 trunkVlan 否 string 0~256个字符。 - 允许通过的VLAN。范围:1~4094,如:1,1-5,最多支持10段,每个设备最多可配置64个VLAN。 "1" upLimit 否 string 0~256个字符。 - 终端上行限速(Mbit/s),取值范围 0.1~10000Mbps。 "1" transmitMode 否 string 0~256个字符。 - 转发模式,取值nat,bridge。 "nat" aclId 否 string 36个字符。 - acl Id。通过接口获取。在接口层面基于目的IP地址、协议和端口控制允许或禁止访问指定资源。 "fbde1c5d-5b94-49e3-a912-48641015e45c" macLimit 否 boolean true false - mac配置使能。 true upLimitEnable 否 boolean true false - 终端流量上行限速使能。 true tcpAdjustMss 否 int32 [128-2048] - TCP Adjust MSS。 128 userSeparation 否 boolean true false - 是否用户隔离。当userSeparation为true时,开启二三层用户隔离。 false separationOption 否 string 0~256个字符。 - 用户隔离状态。取值范围:all---开启二三层隔离,l2---开启二层隔离,disable---不隔离。当userSeparation为true时,separationOption只允许为all 或 l2,默认为all;当userSeparation为false时,separationOption只允许为disable。V200R022C10版本以及之后的设备版本,separationOption生效。 "disable" insertOption82Enable 否 boolean true false false 是否插入Option82选项。默认值为false。 false option82 否 REFERENCE 详细请参见表5。 当insertOption82Enable为true时,该字段必填;为false时,该字段不生效,结构体参见Option82Dto。 - ndSnoopingTrustEnable 否 boolean true false false 启用或禁用nd信任接口。 false 表5 Option82Dto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 circuitId 是 REFERENCE 详细请参见表6。 链路代理ID,结构体参见OptionParamDto。 - remoteId 是 REFERENCE 详细请参见表6。 远程代理ID,结构体参见OptionParamDto。 - 表6 OptionParamDto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 connectorPattern 是 string colon semicolon colon 选项不同类型内容间的连接符。可取值为:colon、semicolon。默认值为colon。 "colon" contentType 是 string ap-mac ap-mac-ifname ap-location ap-location-ifname ap-name ap-name-ifname user-defined ap-mac 选项内容类型。可取值为:ap-mac、ap-mac-ifname、ap-location、ap-location-ifname、ap-name、ap-name-ifname、user-defined。默认值为ap-mac。 "ap-mac" format 否 string ascii normal compact hex colon ascii 选项内容格式。可取值为:ascii、normal、compact、hex、colon。当contentType为ap-mac时,所有选项均可选择;当contentType为ap-mac-ifname,hex不可选择。默认值为ascii。 "ascii" userDefinedText 否 string 0~255个字符。 - 自定义内容,当contentType为user-defined时,此字段为必填字段。 "xxx"