你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Network Interfaces - Get Effective Route Table

获取应用于网络接口的所有路由表。

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable?api-version=2025-03-01

URI 参数

名称 必需 类型 说明
networkInterfaceName
path True

string

网络接口的名称。

resourceGroupName
path True

string

资源组的名称。

subscriptionId
path True

string

唯一标识 Azure 订阅Microsoft的订阅凭据。 订阅 ID 构成了每个服务调用的 URI 的一部分。

api-version
query True

string

客户端 API 版本。

响应

名称 类型 说明
200 OK

EffectiveRouteListResult

请求成功。 该作返回 EffectRoute 资源的列表。

202 Accepted

已接受,作将异步完成。

Other Status Codes

CloudError

描述作失败的原因的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

Show network interface effective route tables

示例请求

POST https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/nic1/effectiveRouteTable?api-version=2025-03-01

示例响应

{
  "value": [
    {
      "source": "Default",
      "state": "Active",
      "addressPrefix": [
        "172.20.2.0/24"
      ],
      "nextHopType": "VnetLocal",
      "nextHopIpAddress": []
    },
    {
      "source": "Default",
      "state": "Active",
      "addressPrefix": [
        "0.0.0.0/0"
      ],
      "nextHopType": "Internet",
      "nextHopIpAddress": []
    },
    {
      "source": "Default",
      "state": "Active",
      "addressPrefix": [
        "10.0.0.0/8"
      ],
      "nextHopType": "None",
      "nextHopIpAddress": []
    },
    {
      "source": "Default",
      "state": "Active",
      "addressPrefix": [
        "100.64.0.0/10"
      ],
      "nextHopType": "None",
      "nextHopIpAddress": []
    },
    {
      "source": "Default",
      "state": "Active",
      "addressPrefix": [
        "172.16.0.0/12"
      ],
      "nextHopType": "None",
      "nextHopIpAddress": []
    },
    {
      "source": "Default",
      "state": "Active",
      "addressPrefix": [
        "192.168.0.0/16"
      ],
      "nextHopType": "None",
      "nextHopIpAddress": []
    }
  ]
}
Location: https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/nic1/operationResults/00000000-0000-0000-0000-000000000000?api-version=2025-03-01

定义

名称 说明
CloudError

服务的错误响应。

CloudErrorBody

服务的错误响应。

EffectiveRoute

有效路由。

EffectiveRouteListResult

列出有效的路由 API 服务调用的响应。

EffectiveRouteSource

谁创建了路线。

EffectiveRouteState

有效路由的值。

RouteNextHopType

应将数据包发送到的 Azure 跃点的类型。

CloudError

服务的错误响应。

名称 类型 说明
error

CloudErrorBody

云错误正文。

CloudErrorBody

服务的错误响应。

名称 类型 说明
code

string

错误的标识符。 代码是固定的,旨在以编程方式使用。

details

CloudErrorBody[]

有关错误的其他详细信息的列表。

message

string

描述错误的消息,旨在适合在用户界面中显示。

target

string

特定错误的目标。 例如,错误属性的名称。

EffectiveRoute

有效路由。

名称 类型 说明
addressPrefix

string[]

CIDR表示法中有效路由的地址前缀。

disableBgpRoutePropagation

boolean

如果为 true,则本地路由不会传播到子网中的网络接口。

name

string

用户定义路由的名称。 这是可选的。

nextHopIpAddress

string[]

有效路由下一跃点的 IP 地址。

nextHopType

RouteNextHopType

应将数据包发送到的 Azure 跃点的类型。

source

EffectiveRouteSource

谁创建了路线。

state

EffectiveRouteState

有效路由的值。

EffectiveRouteListResult

列出有效的路由 API 服务调用的响应。

名称 类型 说明
nextLink

string

用于获取下一组结果的 URL。

value

EffectiveRoute[]

有效路由列表。

EffectiveRouteSource

谁创建了路线。

说明
Unknown
User
VirtualNetworkGateway
Default

EffectiveRouteState

有效路由的值。

说明
Active
Invalid

RouteNextHopType

应将数据包发送到的 Azure 跃点的类型。

说明
VirtualNetworkGateway
VnetLocal
Internet
VirtualAppliance
None