Skip to content

接口描述 ​

提交汇聚相关的信息

注:仅提交接口 dialType 参数为 staticNetCouple(固定公网多 IP)或 dhcpNetCouple(DHCP 多 IP)的节点可进行汇聚信息提交

请求路径 ​

POST /v1/ant/<nodeID>/dialconverge/submit

请求参数 ​

名称类型位置必须描述
Authorizationstringheader是鉴权 token
Content-Typestringheader是数据类型 application/json
nodeIDstringpath是节点 ID
managerNetDevNamestringbody否管理口物理网卡名,managerNetDevName 和 convergeInfos 至少有一个传入
convergeInfos[]ConvergeInfobody否网卡和汇聚详细列表

ConvergeInfo ​

名称类型位置必须描述
netDevNamestringbody是物理网卡名
ipv6Dhcpboolbody否是否开启 IPv6 DHCP(网卡级别,默认 false)
vlanInfos[]VlanInfobody是拨号账号列表

VlanInfo ​

名称类型位置必须描述
ipstringbody否静态 IP,staticNetCouple 必填;dhcpNetCouple(DHCP 多 IP)不填
gatewaystringbody否网关,staticNetCouple 时随 ip 一起填写
ipv6stringbody否静态 IP(IPV6)
ipv6Gatewaystringbody否网关(IPV6)
maskstringbody否子网掩码,staticNetCouple 时随 ip 一起填写
vlanIdintbody是vlanId,DHCP 多 IP 线路填 0
macstringbody否MAC 地址

返回值 ​

名称类型描述

请求示例 ​

staticNetCouple(固定公网多 IP):

json
{
  "managerNetDevName": "eth0",
  "convergeInfos": [
    {
      "netDevName": "eth1",
      "vlanInfos": [
        {
          "ip": "127.0.0.1",
          "gateway": "172.0.0.1",
          "ipv6": "::1",
          "ipv6Gateway": "2001::1",
          "mask": "255.255.255.0",
          "vlanId": 10,
          "mac": "ff:ee:cc:dd:aa:bb"
        }
      ]
    }
  ]
}

dhcpNetCouple(DHCP 多 IP):不填 ip/gateway/mask,vlanId 填 0,一条 vlanInfo 对应一条 DHCP 线路

json
{
  "managerNetDevName": "eth0",
  "convergeInfos": [
    {
      "netDevName": "eth1",
      "ipv6Dhcp": true,
      "vlanInfos": [
        {
          "vlanId": 0
        },
        {
          "vlanId": 0
        }
      ]
    }
  ]
}

返回值示例 ​

json
正常请求:
  http code 200
异常请求:
  http code 4xx/5xx
{
  "code": 4000001,
  "desc": ""
}

错误码列表 ​

错误码描述
401鉴权失败
4000002节点未查找到

如接口返回错误码未列举,可在错误码总览中查找