更新时间:2025-07-10 GMT+08:00
查询VPN网关路由表
功能介绍
根据VPN网关ID,查询指定VPN网关的路由表。
调用方法
请参见如何调用API。
URI
GET /v5/{project_id}/vpn-gateways/{vgw_id}/routing-table
名称 |
类型 |
是否必选 |
说明 |
---|---|---|---|
project_id |
String |
是 |
项目ID,可以通过获取项目ID获取项目ID。 |
vgw_id |
String |
是 |
VPN网关ID。 |
响应消息
- 响应参数
表2 响应Body参数列表 名称
类型
描述
routing_table
Array of Route objects
指定VPN网关的路由表
total_count
Long
该网关下的路由总条数
page_info
分页信息
表3 Route 名称
类型
描述
destination
String
路由目的地址
nexthop
String
下一跳IP地址
outbound_interface_ip
String
出接口IP地址
origin
String
- 功能说明:BGP路由的路由来源
- 取值范围:igp,egp,incomplete
as_path
String
BGP路由的AS路径
med
Integer
BGP路由的MED值
nexthop_resource
NexthopResource object
该路由对应的下一跳资源
- 响应样例
- 查询公网类型关联ER的VPN网关。
{ "routing_table": [ { "destination": "192.168.0.0/24", "nexthop": "192.168.0.240", "outbound_interface_ip": "192.168.0.240", "origin": "igp", "as_path": "64513", "med": 0, "nexthop_resource": { "id": "fd8e4220-cdcd-4c84-809e-09fd3148b24b", "type": "vpn_connection" } }, { "destination": "222.69.222.1/32", "nexthop": "169.254.1.2", "outbound_interface_ip": "169.254.1.1", "origin": "igp", "as_path": "64513", "med": 0, "nexthop_resource": { "id": "e3c28cc1-fb34-4acd-97f9-29d8e42efe0f", "type": "vpn_gateway" } }, { "destination": "222.69.222.2/32", "nexthop": "169.254.2.2", "outbound_interface_ip": "169.254.2.1", "origin": "igp", "as_path": "64513", "med": 0, "nexthop_resource": { "id": "85d31993-f519-49ea-8d2e-7afeffb8ef5e", "type": "vpn_connection" } } ], "total_count": 3, "page_info": { "current_count": 3 } }
- 查询公网类型关联ER的VPN网关。
状态码
请参见状态码。
父主题: 站点入云VPN网关