Freigeben über


Network Interfaces - Get Effective Route Table

Gets all route tables applied to a network interface.

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

URI Parameters

Name In Required Type Description
networkInterfaceName
path True

string

The name of the network interface.

resourceGroupName
path True

string

The name of the resource group.

subscriptionId
path True

string

The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

api-version
query True

string

Client API version.

Responses

Name Type Description
200 OK

EffectiveRouteListResult

Request successful. The operation returns a list of EffectRoute resources.

202 Accepted

Accepted and the operation will complete asynchronously.

Other Status Codes

CloudError

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Show network interface effective route tables

Sample request

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

Sample response

{
  "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=2024-03-01

Definitions

Name Description
CloudError

An error response from the service.

CloudErrorBody

An error response from the service.

EffectiveRoute

Effective Route.

EffectiveRouteListResult

Response for list effective route API service call.

EffectiveRouteSource

Who created the route.

EffectiveRouteState

The value of effective route.

RouteNextHopType

The type of Azure hop the packet should be sent to.

CloudError

An error response from the service.

Name Type Description
error

CloudErrorBody

Cloud error body.

CloudErrorBody

An error response from the service.

Name Type Description
code

string

An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

details

CloudErrorBody[]

A list of additional details about the error.

message

string

A message describing the error, intended to be suitable for display in a user interface.

target

string

The target of the particular error. For example, the name of the property in error.

EffectiveRoute

Effective Route.

Name Type Description
addressPrefix

string[]

The address prefixes of the effective routes in CIDR notation.

disableBgpRoutePropagation

boolean

If true, on-premises routes are not propagated to the network interfaces in the subnet.

name

string

The name of the user defined route. This is optional.

nextHopIpAddress

string[]

The IP address of the next hop of the effective route.

nextHopType

RouteNextHopType

The type of Azure hop the packet should be sent to.

source

EffectiveRouteSource

Who created the route.

state

EffectiveRouteState

The value of effective route.

EffectiveRouteListResult

Response for list effective route API service call.

Name Type Description
nextLink

string

The URL to get the next set of results.

value

EffectiveRoute[]

A list of effective routes.

EffectiveRouteSource

Who created the route.

Name Type Description
Default

string

Unknown

string

User

string

VirtualNetworkGateway

string

EffectiveRouteState

The value of effective route.

Name Type Description
Active

string

Invalid

string

RouteNextHopType

The type of Azure hop the packet should be sent to.

Name Type Description
Internet

string

None

string

VirtualAppliance

string

VirtualNetworkGateway

string

VnetLocal

string