-
请求示例 HTTP的示例 GET /controller/campus/v1/lanwan/interconnection/route/bgp/bgp-advance-config?vnId=a99f794e-b510-438c-a75d-de59f02347eb&siteId=a99f794e-b510-438c-a75d-de59f02347eb&deviceId=a99f794e-b510-438c-a75d-de59f02347eb 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:查询成功返回。 HTTP/1.1 200 OK
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
{
"errcode" : "0",
"errmsg" : "",
"data" : {
"vnId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"siteId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"coreBgpFamilyInfos" : [
{
"externalPreferences" : 30,
"defaultRouteRedistribution" : false,
"routeRedistribute" : ["Static","Direct"],
"aggregationRoute" : ["192.168.10.0/24"],
"compareDifAsMed" : false,
"maxLoadBalanceNum" : 1,
"deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e"
}
],
"gwBgpFamilyInfos" : [
{
"externalPreferences" : 30,
"defaultRouteRedistribution" : false,
"routeRedistribute" : ["Static","Direct"],
"aggregationRoute" : ["192.168.10.0/24"],
"compareDifAsMed" : false,
"maxLoadBalanceNum" : 1,
"deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e"
}
]
}
} 返回状态码为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
返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error
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
-
URI /controller/campus/v1/lanwan/interconnection/route/bgp/bgp-advance-config 表1 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 vnId 是 string 36个字符。 - VN ID。 "a99f794e-b510-438c-a75d-de59f02347eb" siteId 是 string 36个字符。 - 站点ID。 "a99f794e-b510-438c-a75d-de59f02347eb" deviceId 否 string 36个字符。 - 设备ID。 "a99f794e-b510-438c-a75d-de59f02347eb"
-
响应示例 返回状态码为200:更新BGP对等体出参。 HTTP/1.1 200 OK
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
{
"errcode" : "0",
"errmsg" : "",
"success" : {
"linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"peerInfo" : {
"coreAs" : 65002,
"corePeerIp" : "192.168.10.1",
"gatewayAs" : 100,
"gatewayPeerIp" : "192.168.10.1",
"keepaliveTime" : 60,
"holdTime" : 180,
"authMode" : "KEYCHAIN",
"md5Pwd" : "Abc123",
"keyChainName" : "keyChainName",
"bfdEnable" : false,
"bfdInformation" : {
"minTxInterval" : 1000,
"minRxInterval" : 1000,
"detectMultiplier" : 3
}
},
"coreBgpAdvancedInfo" : {
"deviceId" : "b473136d-17ff-4f4f-9fa9-a4c0e1e87e42",
"familyGlobalInfo" : {
"externalPreferences" : 30,
"defaultRouteRedistribution" : false,
"routeRedistribute" : ["Static","Direct"],
"aggregationRoute" : ["192.168.10.0/24"],
"compareDifAsMed" : false,
"maxLoadBalanceNum" : 1
},
"exportRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"importRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"allowAsLoop" : 1,
"ebgpMaxHop" : 1,
"peerIgnore" : false,
"advertiseCommunity" : false
},
"gatewayBgpAdvancedInfo" : {
"deviceId" : "b473136d-17ff-4f4f-9fa9-a4c0e1e87e42",
"familyGlobalInfo" : {
"externalPreferences" : 30,
"defaultRouteRedistribution" : false,
"routeRedistribute" : ["Static","Direct"],
"aggregationRoute" : ["192.168.10.0/24"],
"compareDifAsMed" : false,
"maxLoadBalanceNum" : 1
},
"exportRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"importRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"allowAsLoop" : 1,
"ebgpMaxHop" : 1,
"peerIgnore" : false,
"advertiseCommunity" : false
},
"coreBgpPeers" : [
{
"coreAs" : 65002,
"corePeerIp" : "192.168.10.1",
"gatewayAs" : 100,
"gatewayPeerIp" : "192.168.10.1",
"keepaliveTime" : 60,
"holdTime" : 180,
"authMode" : "KEYCHAIN",
"md5Pwd" : "Abc123",
"keyChainName" : "keyChainName",
"bfdEnable" : false,
"bfdInformation" : {
"minTxInterval" : 1000,
"minRxInterval" : 1000,
"detectMultiplier" : 3
},
"deviceId" : "b473136d-17ff-4f4f-9fa9-a4c0e1e87e42",
"familyGlobalInfo" : {
"externalPreferences" : 30,
"defaultRouteRedistribution" : false,
"routeRedistribute" : ["Static","Direct"],
"aggregationRoute" : ["192.168.10.0/24"],
"compareDifAsMed" : false,
"maxLoadBalanceNum" : 1
},
"exportRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"importRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"allowAsLoop" : 1,
"ebgpMaxHop" : 1,
"peerIgnore" : false,
"advertiseCommunity" : false
}
],
"gatewayBgpPeers" : [
{
"coreAs" : 65002,
"corePeerIp" : "192.168.10.1",
"gatewayAs" : 100,
"gatewayPeerIp" : "192.168.10.1",
"keepaliveTime" : 60,
"holdTime" : 180,
"authMode" : "KEYCHAIN",
"md5Pwd" : "Abc123",
"keyChainName" : "keyChainName",
"bfdEnable" : false,
"bfdInformation" : {
"minTxInterval" : 1000,
"minRxInterval" : 1000,
"detectMultiplier" : 3
},
"deviceId" : "b473136d-17ff-4f4f-9fa9-a4c0e1e87e42",
"familyGlobalInfo" : {
"externalPreferences" : 30,
"defaultRouteRedistribution" : false,
"routeRedistribute" : ["Static","Direct"],
"aggregationRoute" : ["192.168.10.0/24"],
"compareDifAsMed" : false,
"maxLoadBalanceNum" : 1
},
"exportRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"importRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"allowAsLoop" : 1,
"ebgpMaxHop" : 1,
"peerIgnore" : false,
"advertiseCommunity" : false
}
]
},
"fail" : {
"linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"coreBgpFailInfo" : {
"errcode" : "0",
"errmsg" : "",
"deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"bgpAs" : 100,
"peerIp" : "192.168.10.1"
},
"gatewayBgpFailInfo" : {
"errcode" : "0",
"errmsg" : "",
"deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"bgpAs" : 100,
"peerIp" : "192.168.10.1"
},
"coreBgpBaseInfos" : [
{
"errcode" : "0",
"errmsg" : "",
"deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"bgpAs" : 100,
"peerIp" : "192.168.10.1"
}
],
"gatewayBgpBaseInfos" : [
{
"errcode" : "0",
"errmsg" : "",
"deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"bgpAs" : 100,
"peerIp" : "192.168.10.1"
}
]
}
} 返回状态码为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
返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error
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的示例 PUT /controller/campus/v1/lanwan/interconnection/route/bgp 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
{
"linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"peerInfo" : {
"coreAs" : 65002,
"corePeerIp" : "192.168.10.1",
"gatewayAs" : 100,
"gatewayPeerIp" : "192.168.10.1",
"keepaliveTime" : 60,
"holdTime" : 180,
"authMode" : "KEYCHAIN",
"md5Pwd" : "Abc123",
"keyChainName" : "keyChainName",
"bfdEnable" : false,
"bfdInformation" : {
"minTxInterval" : 1000,
"minRxInterval" : 1000,
"detectMultiplier" : 3
}
},
"coreBgpAdvancedInfo" : {
"deviceId" : "b473136d-17ff-4f4f-9fa9-a4c0e1e87e42",
"familyGlobalInfo" : {
"externalPreferences" : 30,
"defaultRouteRedistribution" : false,
"routeRedistribute" : ["Static","Direct"],
"aggregationRoute" : ["192.168.10.0/24"],
"compareDifAsMed" : false,
"maxLoadBalanceNum" : 1
},
"exportRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"importRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"allowAsLoop" : 1,
"ebgpMaxHop" : 1,
"peerIgnore" : false,
"advertiseCommunity" : false
},
"gatewayBgpAdvancedInfo" : {
"deviceId" : "b473136d-17ff-4f4f-9fa9-a4c0e1e87e42",
"familyGlobalInfo" : {
"externalPreferences" : 30,
"defaultRouteRedistribution" : false,
"routeRedistribute" : ["Static","Direct"],
"aggregationRoute" : ["192.168.10.0/24"],
"compareDifAsMed" : false,
"maxLoadBalanceNum" : 1
},
"exportRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"importRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"allowAsLoop" : 1,
"ebgpMaxHop" : 1,
"peerIgnore" : false,
"advertiseCommunity" : false
},
"coreBgpPeers" : [
{
"coreAs" : 65002,
"corePeerIp" : "192.168.10.1",
"gatewayAs" : 100,
"gatewayPeerIp" : "192.168.10.1",
"keepaliveTime" : 60,
"holdTime" : 180,
"authMode" : "KEYCHAIN",
"md5Pwd" : "Abc123",
"keyChainName" : "keyChainName",
"bfdEnable" : false,
"bfdInformation" : {
"minTxInterval" : 1000,
"minRxInterval" : 1000,
"detectMultiplier" : 3
},
"deviceId" : "b473136d-17ff-4f4f-9fa9-a4c0e1e87e42",
"familyGlobalInfo" : {
"externalPreferences" : 30,
"defaultRouteRedistribution" : false,
"routeRedistribute" : ["Static","Direct"],
"aggregationRoute" : ["192.168.10.0/24"],
"compareDifAsMed" : false,
"maxLoadBalanceNum" : 1
},
"exportRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"importRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"allowAsLoop" : 1,
"ebgpMaxHop" : 1,
"peerIgnore" : false,
"advertiseCommunity" : false
}
],
"gatewayBgpPeers" : [
{
"coreAs" : 65002,
"corePeerIp" : "192.168.10.1",
"gatewayAs" : 100,
"gatewayPeerIp" : "192.168.10.1",
"keepaliveTime" : 60,
"holdTime" : 180,
"authMode" : "KEYCHAIN",
"md5Pwd" : "Abc123",
"keyChainName" : "keyChainName",
"bfdEnable" : false,
"bfdInformation" : {
"minTxInterval" : 1000,
"minRxInterval" : 1000,
"detectMultiplier" : 3
},
"deviceId" : "b473136d-17ff-4f4f-9fa9-a4c0e1e87e42",
"familyGlobalInfo" : {
"externalPreferences" : 30,
"defaultRouteRedistribution" : false,
"routeRedistribute" : ["Static","Direct"],
"aggregationRoute" : ["192.168.10.0/24"],
"compareDifAsMed" : false,
"maxLoadBalanceNum" : 1
},
"exportRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"importRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"allowAsLoop" : 1,
"ebgpMaxHop" : 1,
"peerIgnore" : false,
"advertiseCommunity" : false
}
]
}
-
响应示例 返回状态码为200:删除BGP对等体出参。 HTTP/1.1 200 OK
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
{
"errcode" : "0",
"errmsg" : "",
"success" : {
"linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"coreDeleteLinkBgpInfo" : {
"deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"bgpAs" : 100,
"peerIp" : "192.168.10.1"
},
"gatewayDeleteLinkBgpInfo" : {
"deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"bgpAs" : 100,
"peerIp" : "192.168.10.1"
},
"coreBgpBaseInfos" : [
{
"deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"bgpAs" : 100,
"peerIp" : "192.168.10.1"
}
],
"gatewayBgpBaseInfos" : [
{
"deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"bgpAs" : 100,
"peerIp" : "192.168.10.1"
}
]
},
"fail" : {
"linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"coreBgpFailInfo" : {
"errcode" : "0",
"errmsg" : "",
"deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"bgpAs" : 100,
"peerIp" : "192.168.10.1"
},
"gatewayBgpFailInfo" : {
"errcode" : "0",
"errmsg" : "",
"deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"bgpAs" : 100,
"peerIp" : "192.168.10.1"
},
"coreBgpBaseInfos" : [
{
"errcode" : "0",
"errmsg" : "",
"deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"bgpAs" : 100,
"peerIp" : "192.168.10.1"
}
],
"gatewayBgpBaseInfos" : [
{
"errcode" : "0",
"errmsg" : "",
"deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"bgpAs" : 100,
"peerIp" : "192.168.10.1"
}
]
}
} 返回状态码为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
返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error
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
-
响应参数 返回状态码为200:删除BGP对等体出参。 表5 DeleteRouteBgpResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "" success REFERENCE 详细请参见表6。 删除成功BGP对等体出参。 - fail REFERENCE 详细请参见表33。 删除失败BGP对等体出参。 - 表6 DeleteLinkBgpInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 linkId string 36个字符。 - 互联接口标识。uuid格式。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" coreDeleteLinkBgpInfo REFERENCE 详细请参见表7。 核心设备删除成功BGP对等体出参。升级兼容,不推荐使用。 - gatewayDeleteLinkBgpInfo REFERENCE 详细请参见表7。 网关设备删除成功BGP对等体出参。升级兼容,不推荐使用。 - coreBgpBaseInfos ARRAY_REFERENCE 0-32个列表项,详细请参见表7。 核心设备删除成功BGP邻居。 - gatewayBgpBaseInfos ARRAY_REFERENCE 0-32个列表项,详细请参见表7。 网关设备删除成功BGP邻居。 - 表7 BgpPeerBaseInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 deviceId string 36个字符。 - 设备标识,UUID格式。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" bgpAs int64 [1-4294967295] - BGP的AS号。 100 peerIp string 0~64个字符。 - BGP对等体的IP地址。 "192.168.10.1" 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
-
请求参数 表2 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 delBgpPeer 否 REFERENCE 详细请参见表3。 删除BGP对等体入参,不传值则按linkId全量删除。 - 表3 DeleteBgpPeer对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 delCoreBgpPeers 否 ARRAY_REFERENCE 0-32个列表项,详细请参见表4。 待删除的核心侧BGP信息。 - delGatewayBgpPeers 否 ARRAY_REFERENCE 0-32个列表项,详细请参见表4。 待删除的网关设备BGP信息。 - 表4 BgpPeerToDel对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string 36个字符。 - 设备标识,UUID格式。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" peerIp 是 string 0~64个字符。 - BGP对等体的IP地址。 "192.168.10.1"
-
请求示例 HTTP的示例 DELETE /controller/campus/v1/lanwan/interconnection/route/bgp/fbb684c8-0d37-496f-bafa-4b06d5151e2e 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
{
"delCoreBgpPeers" : [
{
"deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"peerIp" : "192.168.10.1"
}
],
"delGatewayBgpPeers" : [
{
"deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"peerIp" : "192.168.10.1"
}
]
}
-
响应示例 返回状态码为201:创建BGP对等体出参。 HTTP/1.1 201 Created
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
{
"errcode" : "0",
"errmsg" : "",
"success" : {
"linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"peerInfo" : {
"coreAs" : 65002,
"corePeerIp" : "192.168.10.1",
"gatewayAs" : 100,
"gatewayPeerIp" : "192.168.10.1",
"keepaliveTime" : 60,
"holdTime" : 180,
"authMode" : "KEYCHAIN",
"md5Pwd" : "Abc123",
"keyChainName" : "keyChainName",
"bfdEnable" : false,
"bfdInformation" : {
"minTxInterval" : 1000,
"minRxInterval" : 1000,
"detectMultiplier" : 3
}
},
"coreBgpAdvancedInfo" : {
"deviceId" : "b473136d-17ff-4f4f-9fa9-a4c0e1e87e42",
"familyGlobalInfo" : {
"externalPreferences" : 30,
"defaultRouteRedistribution" : false,
"routeRedistribute" : ["Static","Direct"],
"aggregationRoute" : ["192.168.10.0/24"],
"compareDifAsMed" : false,
"maxLoadBalanceNum" : 1
},
"exportRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"importRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"allowAsLoop" : 1,
"ebgpMaxHop" : 1,
"peerIgnore" : false,
"advertiseCommunity" : false
},
"gatewayBgpAdvancedInfo" : {
"deviceId" : "b473136d-17ff-4f4f-9fa9-a4c0e1e87e42",
"familyGlobalInfo" : {
"externalPreferences" : 30,
"defaultRouteRedistribution" : false,
"routeRedistribute" : ["Static","Direct"],
"aggregationRoute" : ["192.168.10.0/24"],
"compareDifAsMed" : false,
"maxLoadBalanceNum" : 1
},
"exportRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"importRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"allowAsLoop" : 1,
"ebgpMaxHop" : 1,
"peerIgnore" : false,
"advertiseCommunity" : false
},
"coreBgpPeers" : [
{
"coreAs" : 65002,
"corePeerIp" : "192.168.10.1",
"gatewayAs" : 100,
"gatewayPeerIp" : "192.168.10.1",
"keepaliveTime" : 60,
"holdTime" : 180,
"authMode" : "KEYCHAIN",
"md5Pwd" : "Abc123",
"keyChainName" : "keyChainName",
"bfdEnable" : false,
"bfdInformation" : {
"minTxInterval" : 1000,
"minRxInterval" : 1000,
"detectMultiplier" : 3
},
"deviceId" : "b473136d-17ff-4f4f-9fa9-a4c0e1e87e42",
"familyGlobalInfo" : {
"externalPreferences" : 30,
"defaultRouteRedistribution" : false,
"routeRedistribute" : ["Static","Direct"],
"aggregationRoute" : ["192.168.10.0/24"],
"compareDifAsMed" : false,
"maxLoadBalanceNum" : 1
},
"exportRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"importRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"allowAsLoop" : 1,
"ebgpMaxHop" : 1,
"peerIgnore" : false,
"advertiseCommunity" : false
}
],
"gatewayBgpPeers" : [
{
"coreAs" : 65002,
"corePeerIp" : "192.168.10.1",
"gatewayAs" : 100,
"gatewayPeerIp" : "192.168.10.1",
"keepaliveTime" : 60,
"holdTime" : 180,
"authMode" : "KEYCHAIN",
"md5Pwd" : "Abc123",
"keyChainName" : "keyChainName",
"bfdEnable" : false,
"bfdInformation" : {
"minTxInterval" : 1000,
"minRxInterval" : 1000,
"detectMultiplier" : 3
},
"deviceId" : "b473136d-17ff-4f4f-9fa9-a4c0e1e87e42",
"familyGlobalInfo" : {
"externalPreferences" : 30,
"defaultRouteRedistribution" : false,
"routeRedistribute" : ["Static","Direct"],
"aggregationRoute" : ["192.168.10.0/24"],
"compareDifAsMed" : false,
"maxLoadBalanceNum" : 1
},
"exportRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"importRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"allowAsLoop" : 1,
"ebgpMaxHop" : 1,
"peerIgnore" : false,
"advertiseCommunity" : false
}
]
},
"fail" : {
"linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"coreBgpFailInfo" : {
"errcode" : "0",
"errmsg" : "",
"deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"bgpAs" : 100,
"peerIp" : "192.168.10.1"
},
"gatewayBgpFailInfo" : {
"errcode" : "0",
"errmsg" : "",
"deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"bgpAs" : 100,
"peerIp" : "192.168.10.1"
},
"coreBgpBaseInfos" : [
{
"errcode" : "0",
"errmsg" : "",
"deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"bgpAs" : 100,
"peerIp" : "192.168.10.1"
}
],
"gatewayBgpBaseInfos" : [
{
"errcode" : "0",
"errmsg" : "",
"deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"bgpAs" : 100,
"peerIp" : "192.168.10.1"
}
]
}
} 返回状态码为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
返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error
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的示例 POST /controller/campus/v1/lanwan/interconnection/route/bgp 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
{
"linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"peerInfo" : {
"coreAs" : 65002,
"corePeerIp" : "192.168.10.1",
"gatewayAs" : 100,
"gatewayPeerIp" : "192.168.10.1",
"keepaliveTime" : 60,
"holdTime" : 180,
"authMode" : "KEYCHAIN",
"md5Pwd" : "Abc123",
"keyChainName" : "keyChainName",
"bfdEnable" : false,
"bfdInformation" : {
"minTxInterval" : 1000,
"minRxInterval" : 1000,
"detectMultiplier" : 3
}
},
"coreBgpAdvancedInfo" : {
"deviceId" : "b473136d-17ff-4f4f-9fa9-a4c0e1e87e42",
"familyGlobalInfo" : {
"externalPreferences" : 30,
"defaultRouteRedistribution" : false,
"routeRedistribute" : ["Static","Direct"],
"aggregationRoute" : ["192.168.10.0/24"],
"compareDifAsMed" : false,
"maxLoadBalanceNum" : 1
},
"exportRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"importRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"allowAsLoop" : 1,
"ebgpMaxHop" : 1,
"peerIgnore" : false,
"advertiseCommunity" : false
},
"gatewayBgpAdvancedInfo" : {
"deviceId" : "b473136d-17ff-4f4f-9fa9-a4c0e1e87e42",
"familyGlobalInfo" : {
"externalPreferences" : 30,
"defaultRouteRedistribution" : false,
"routeRedistribute" : ["Static","Direct"],
"aggregationRoute" : ["192.168.10.0/24"],
"compareDifAsMed" : false,
"maxLoadBalanceNum" : 1
},
"exportRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"importRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"allowAsLoop" : 1,
"ebgpMaxHop" : 1,
"peerIgnore" : false,
"advertiseCommunity" : false
},
"coreBgpPeers" : [
{
"coreAs" : 65002,
"corePeerIp" : "192.168.10.1",
"gatewayAs" : 100,
"gatewayPeerIp" : "192.168.10.1",
"keepaliveTime" : 60,
"holdTime" : 180,
"authMode" : "KEYCHAIN",
"md5Pwd" : "Abc123",
"keyChainName" : "keyChainName",
"bfdEnable" : false,
"bfdInformation" : {
"minTxInterval" : 1000,
"minRxInterval" : 1000,
"detectMultiplier" : 3
},
"deviceId" : "b473136d-17ff-4f4f-9fa9-a4c0e1e87e42",
"familyGlobalInfo" : {
"externalPreferences" : 30,
"defaultRouteRedistribution" : false,
"routeRedistribute" : ["Static","Direct"],
"aggregationRoute" : ["192.168.10.0/24"],
"compareDifAsMed" : false,
"maxLoadBalanceNum" : 1
},
"exportRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"importRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"allowAsLoop" : 1,
"ebgpMaxHop" : 1,
"peerIgnore" : false,
"advertiseCommunity" : false
}
],
"gatewayBgpPeers" : [
{
"coreAs" : 65002,
"corePeerIp" : "192.168.10.1",
"gatewayAs" : 100,
"gatewayPeerIp" : "192.168.10.1",
"keepaliveTime" : 60,
"holdTime" : 180,
"authMode" : "KEYCHAIN",
"md5Pwd" : "Abc123",
"keyChainName" : "keyChainName",
"bfdEnable" : false,
"bfdInformation" : {
"minTxInterval" : 1000,
"minRxInterval" : 1000,
"detectMultiplier" : 3
},
"deviceId" : "b473136d-17ff-4f4f-9fa9-a4c0e1e87e42",
"familyGlobalInfo" : {
"externalPreferences" : 30,
"defaultRouteRedistribution" : false,
"routeRedistribute" : ["Static","Direct"],
"aggregationRoute" : ["192.168.10.0/24"],
"compareDifAsMed" : false,
"maxLoadBalanceNum" : 1
},
"exportRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"importRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"allowAsLoop" : 1,
"ebgpMaxHop" : 1,
"peerIgnore" : false,
"advertiseCommunity" : false
}
]
}
-
请求示例 HTTP的示例 GET /controller/campus/v1/lanwan/interconnection/route/bgp?linkId=fbb684c8-0d37-496f-bafa-4b06d5151e2e 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
-
响应参数 返回状态码为200:查询成功返回。 表2 QueryRouteBgpResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "" data REFERENCE 详细请参见表18。 查询返回的Bgp信息,兼容老版本,不推荐使用。 - bgpPeers ARRAY_REFERENCE 0-32个列表项,详细请参见表3。 查询返回的BGP对等体信息。 - 表3 RouteLinkAllBgpInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 linkId string 36个字符。 - 互联接口标识。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" linkName string 0~64个字符。 - 互联接口名称, 创建、更新不填,查询返回。 "ConnectLink" deviceId string 36个字符。 - 设备标识。创建、更新不填。查询返回。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" deviceName string 0~64个字符。 - 设备名称,创建、更新不填,查询返回。 "Core-1" deviceType string 0~10个字符。 - 设备类型,创建、更新不填,查询返回。 "LSW" configSource string 0~32个字符。 - 配置源 "LANWAN" bgpPeer REFERENCE 详细请参见表32。 BGP对等体配置参数 - 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
-
响应示例 返回状态码为200:查询成功返回。 HTTP/1.1 200 OK
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
{
"errcode" : "0",
"errmsg" : "",
"data" : {
"linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"peerInfo" : {
"coreAs" : 65002,
"corePeerIp" : "192.168.10.1",
"gatewayAs" : 100,
"gatewayPeerIp" : "192.168.10.1",
"keepaliveTime" : 60,
"holdTime" : 180,
"authMode" : "KEYCHAIN",
"md5Pwd" : "Abc123",
"keyChainName" : "keyChainName",
"bfdEnable" : false,
"bfdInformation" : {
"minTxInterval" : 1000,
"minRxInterval" : 1000,
"detectMultiplier" : 3
}
},
"coreBgpAdvancedInfo" : {
"deviceId" : "b473136d-17ff-4f4f-9fa9-a4c0e1e87e42",
"familyGlobalInfo" : {
"externalPreferences" : 30,
"defaultRouteRedistribution" : false,
"routeRedistribute" : ["Static","Direct"],
"aggregationRoute" : ["192.168.10.0/24"],
"compareDifAsMed" : false,
"maxLoadBalanceNum" : 1
},
"exportRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"importRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"allowAsLoop" : 1,
"ebgpMaxHop" : 1,
"peerIgnore" : false,
"advertiseCommunity" : false
},
"gatewayBgpAdvancedInfo" : {
"deviceId" : "b473136d-17ff-4f4f-9fa9-a4c0e1e87e42",
"familyGlobalInfo" : {
"externalPreferences" : 30,
"defaultRouteRedistribution" : false,
"routeRedistribute" : ["Static","Direct"],
"aggregationRoute" : ["192.168.10.0/24"],
"compareDifAsMed" : false,
"maxLoadBalanceNum" : 1
},
"exportRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"importRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"allowAsLoop" : 1,
"ebgpMaxHop" : 1,
"peerIgnore" : false,
"advertiseCommunity" : false
},
"coreBgpPeers" : [
{
"coreAs" : 65002,
"corePeerIp" : "192.168.10.1",
"gatewayAs" : 100,
"gatewayPeerIp" : "192.168.10.1",
"keepaliveTime" : 60,
"holdTime" : 180,
"authMode" : "KEYCHAIN",
"md5Pwd" : "Abc123",
"keyChainName" : "keyChainName",
"bfdEnable" : false,
"bfdInformation" : {
"minTxInterval" : 1000,
"minRxInterval" : 1000,
"detectMultiplier" : 3
},
"deviceId" : "b473136d-17ff-4f4f-9fa9-a4c0e1e87e42",
"familyGlobalInfo" : {
"externalPreferences" : 30,
"defaultRouteRedistribution" : false,
"routeRedistribute" : ["Static","Direct"],
"aggregationRoute" : ["192.168.10.0/24"],
"compareDifAsMed" : false,
"maxLoadBalanceNum" : 1
},
"exportRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"importRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"allowAsLoop" : 1,
"ebgpMaxHop" : 1,
"peerIgnore" : false,
"advertiseCommunity" : false
}
],
"gatewayBgpPeers" : [
{
"coreAs" : 65002,
"corePeerIp" : "192.168.10.1",
"gatewayAs" : 100,
"gatewayPeerIp" : "192.168.10.1",
"keepaliveTime" : 60,
"holdTime" : 180,
"authMode" : "KEYCHAIN",
"md5Pwd" : "Abc123",
"keyChainName" : "keyChainName",
"bfdEnable" : false,
"bfdInformation" : {
"minTxInterval" : 1000,
"minRxInterval" : 1000,
"detectMultiplier" : 3
},
"deviceId" : "b473136d-17ff-4f4f-9fa9-a4c0e1e87e42",
"familyGlobalInfo" : {
"externalPreferences" : 30,
"defaultRouteRedistribution" : false,
"routeRedistribute" : ["Static","Direct"],
"aggregationRoute" : ["192.168.10.0/24"],
"compareDifAsMed" : false,
"maxLoadBalanceNum" : 1
},
"exportRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"importRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"allowAsLoop" : 1,
"ebgpMaxHop" : 1,
"peerIgnore" : false,
"advertiseCommunity" : false
}
]
},
"bgpPeers" : [
{
"linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"linkName" : "ConnectLink",
"deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"deviceName" : "Core-1",
"deviceType" : "LSW",
"configSource" : "LANWAN",
"bgpPeer" : {
"coreAs" : 65002,
"corePeerIp" : "192.168.10.1",
"gatewayAs" : 100,
"gatewayPeerIp" : "192.168.10.1",
"keepaliveTime" : 60,
"holdTime" : 180,
"authMode" : "KEYCHAIN",
"md5Pwd" : "Abc123",
"keyChainName" : "keyChainName",
"bfdEnable" : false,
"bfdInformation" : {
"minTxInterval" : 1000,
"minRxInterval" : 1000,
"detectMultiplier" : 3
},
"deviceId" : "b473136d-17ff-4f4f-9fa9-a4c0e1e87e42",
"familyGlobalInfo" : {
"externalPreferences" : 30,
"defaultRouteRedistribution" : false,
"routeRedistribute" : ["Static","Direct"],
"aggregationRoute" : ["192.168.10.0/24"],
"compareDifAsMed" : false,
"maxLoadBalanceNum" : 1
},
"exportRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"importRoutePolicy" : [
{
"nodeMatchmode" : "PERMIT",
"matchCondition" : {
"ipPrefixList" : [
{
"ipAddress" : "192.168.10.0",
"maskLength" : 24,
"maskUpperLimit" : 24,
"maskLowerLimit" : 24
}
],
"communityFilters" : [
{
"name" : "teamName",
"communityNodes" : [
{
"matchMode" : "permit",
"communityMembers" : ["1","2"]
}
],
"wholeMatch" : true
}
]
},
"applyAction" : {
"applyCommunity" : {
"communityNumbers" : [
100
],
"communityNumberList" : [
"100"
]
},
"applyAsPath" : {
"asNumbers" : [
100
]
},
"applyMetric" : {
"cost" : 60
},
"preferredValue" : 100,
"localPreference" : 100,
"nodeIndex" : 20060
}
}
],
"allowAsLoop" : 1,
"ebgpMaxHop" : 1,
"peerIgnore" : false,
"advertiseCommunity" : false
}
}
]
} 返回状态码为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
返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error
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