Description
Description
Get-AzEffectiveRouteTable output does not include NextHopIpAddress and addressPrefix in the output.
it is visible in the body data
see also https://github.com/Azure/azure-powershell/issues/22231 where this bug is mentioned, but the conclusion there is to alter the documentation. in comparison to Azure CLI and the Azure Portal the NextHopIpAddress and addressPrefix should be returned.
according to the documentation:
https://learn.microsoft.com/en-us/azure/network-watcher/diagnose-vm-network-routing-problem-powershell#view-details-of-a-route
`
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
OK
Headers:
Pragma : no-cache
x-ms-request-id : 67e6118d-ce0e-419c-85ff-d6b6d08015d7
x-ms-correlation-request-id : 79165b34-7acb-4faf-93c1-85c1693afd17
Azure-AsyncNotification : Enabled
x-ms-arm-service-request-id : 886c6b21-1d04-4cd7-b2a8-08cac866302d
Strict-Transport-Security : max-age=31536000; includeSubDomains
Cache-Control : no-cache
Location :
https://management.azure.com/subscriptions/a13f39e1-2887-4623-a964-88332d0642a3/providers/Microsoft.Network/locations/japaneast/operationResults/67e6118d-ce0e-419c-85ff-d6b6d08015d7?api-version=2022-11-01
Server : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-reads: 11998
x-ms-routing-request-id : JAPANEAST:20230703T083259Z:8b10dafd-0d7b-4fbb-a670-a97edab0741a
X-Content-Type-Options : nosniff
Date : Mon, 03 Jul 2023 08:32:59 GMT
Body:
{
"value": [
{
"disableBgpRoutePropagation": false,
"source": "Default",
"state": "Active",
"hasBgpOverride": false,
"addressPrefix": [
"10.20.0.0/16"
],
"nextHopType": "VnetLocal",
"nextHopIpAddress": [],
"destinationServiceTags": [],
"tagMap": {}
},
{
"disableBgpRoutePropagation": false,
"source": "Default",
"state": "Active",
"hasBgpOverride": false,
"addressPrefix": [
"0.0.0.0/0"
],
"nextHopType": "Internet",
"nextHopIpAddress": [],
"destinationServiceTags": [],
"tagMap": {}
},
{
"disableBgpRoutePropagation": false,
"source": "Default",
"state": "Active",
"hasBgpOverride": false,
"addressPrefix": [
"10.0.0.0/8"
],
"nextHopType": "None",
"nextHopIpAddress": [],
"destinationServiceTags": [],
"tagMap": {}
},
{
"disableBgpRoutePropagation": false,
"source": "Default",
"state": "Active",
"hasBgpOverride": false,
"addressPrefix": [
"127.0.0.0/8"
],
"nextHopType": "None",
"nextHopIpAddress": [],
"destinationServiceTags": [],
"tagMap": {}
},
{
"disableBgpRoutePropagation": false,
"source": "Default",
"state": "Active",
"hasBgpOverride": false,
"addressPrefix": [
"100.64.0.0/10"
],
"nextHopType": "None",
"nextHopIpAddress": [],
"destinationServiceTags": [],
"tagMap": {}
},
{
"disableBgpRoutePropagation": false,
"source": "Default",
"state": "Active",
"hasBgpOverride": false,
"addressPrefix": [
"172.16.0.0/12"
],
"nextHopType": "None",
"nextHopIpAddress": [],
"destinationServiceTags": [],
"tagMap": {}
},
{
"disableBgpRoutePropagation": false,
"source": "Default",
"state": "Active",
"hasBgpOverride": false,
"addressPrefix": [
"25.48.0.0/12"
],
"nextHopType": "None",
"nextHopIpAddress": [],
"destinationServiceTags": [],
"tagMap": {}
},
{
"disableBgpRoutePropagation": false,
"source": "Default",
"state": "Active",
"hasBgpOverride": false,
"addressPrefix": [
"25.4.0.0/14"
],
"nextHopType": "None",
"nextHopIpAddress": [],
"destinationServiceTags": [],
"tagMap": {}
},
{
"disableBgpRoutePropagation": false,
"source": "Default",
"state": "Active",
"hasBgpOverride": false,
"addressPrefix": [
"198.18.0.0/15"
],
"nextHopType": "None",
"nextHopIpAddress": [],
"destinationServiceTags": [],
"tagMap": {}
},
{
"disableBgpRoutePropagation": false,
"source": "Default",
"state": "Active",
"hasBgpOverride": false,
"addressPrefix": [
"157.59.0.0/16"
],
"nextHopType": "None",
"nextHopIpAddress": [],
"destinationServiceTags": [],
"tagMap": {}
},
{
"disableBgpRoutePropagation": false,
"source": "Default",
"state": "Active",
"hasBgpOverride": false,
"addressPrefix": [
"192.168.0.0/16"
],
"nextHopType": "None",
"nextHopIpAddress": [],
"destinationServiceTags": [],
"tagMap": {}
},
{
"disableBgpRoutePropagation": false,
"source": "Default",
"state": "Active",
"hasBgpOverride": false,
"addressPrefix": [
"25.33.0.0/16"
],
"nextHopType": "None",
"nextHopIpAddress": [],
"destinationServiceTags": [],
"tagMap": {}
},
{
"disableBgpRoutePropagation": false,
"source": "Default",
"state": "Active",
"hasBgpOverride": false,
"addressPrefix": [
"40.109.0.0/16"
],
"nextHopType": "None",
"nextHopIpAddress": [],
"destinationServiceTags": [],
"tagMap": {}
},
{
"disableBgpRoutePropagation": false,
"source": "Default",
"state": "Active",
"hasBgpOverride": false,
"addressPrefix": [
"104.147.0.0/16"
],
"nextHopType": "None",
"nextHopIpAddress": [],
"destinationServiceTags": [],
"tagMap": {}
},
{
"disableBgpRoutePropagation": false,
"source": "Default",
"state": "Active",
"hasBgpOverride": false,
"addressPrefix": [
"104.146.0.0/17"
],
"nextHopType": "None",
"nextHopIpAddress": [],
"destinationServiceTags": [],
"tagMap": {}
},
{
"disableBgpRoutePropagation": false,
"source": "Default",
"state": "Active",
"hasBgpOverride": false,
"addressPrefix": [
"40.108.0.0/17"
],
"nextHopType": "None",
"nextHopIpAddress": [],
"destinationServiceTags": [],
"tagMap": {}
},
{
"disableBgpRoutePropagation": false,
"source": "Default",
"state": "Active",
"hasBgpOverride": false,
"addressPrefix": [
"23.103.0.0/18"
],
"nextHopType": "None",
"nextHopIpAddress": [],
"destinationServiceTags": [],
"tagMap": {}
},
{
"disableBgpRoutePropagation": false,
"source": "Default",
"state": "Active",
"hasBgpOverride": false,
"addressPrefix": [
"25.41.0.0/20"
],
"nextHopType": "None",
"nextHopIpAddress": [],
"destinationServiceTags": [],
"tagMap": {}
},
{
"disableBgpRoutePropagation": false,
"source": "Default",
"state": "Active",
"hasBgpOverride": false,
"addressPrefix": [
"20.35.252.0/22"
],
"nextHopType": "None",
"nextHopIpAddress": [],
"destinationServiceTags": [],
"tagMap": {}
}
]
}
DEBUG: 8:33:02 - [ConfigManager] Got nothing from [DisplayRegionIdentified], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: AzureQoSEvent: Module: Az.Network:6.0.0; CommandName: Get-AzEffectiveRouteTable; PSVersion: 5.1.22621.1778; IsSuccess: True; Duration: 00:00:13.4099558
DEBUG: 8:33:02 - [ConfigManager] Got nothing from [EnableDataCollection], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 8:33:02 - GetAzureEffectiveRouteTableCommand end processing.
Name DisableBgpRoutePropagation State Source NextHopType
False Active Default VnetLocal
False Active Default Internet
False Active Default None
False Active Default None
False Active Default None
False Active Default None
False Active Default None
False Active Default None
False Active Default None
False Active Default None
False Active Default None
False Active Default None
False Active Default None
False Active Default None
False Active Default None
False Active Default None
False Active Default None
False Active Default None
False Active Default None`
Issue script & Debug output
Get-AzEffectiveRouteTable -Name "samplename" -ResourceGroup "samplegroup"
Environment data
run on Azure CLoud shell
Name Value
---- -----
PSVersion 7.3.8
PSEdition Core
GitCommitId 7.3.8
OS Linux 5.4.0-1109-azure #115~18.04.1-Ubuntu SMP Mon May 22 20:06:37 UTC 2023
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Module versions
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 2.13.1 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script 6.3.0 Az.Compute {Add-AzImageDataDisk, Add-AzVhd, Add-AzVMAdditionalUnattendContent, Add-AzVMDataDisk…}
Script 6.2.0 Az.Network {Add-AzApplicationGatewayAuthenticationCertificate, Add-AzApplicationGatewayBackendAddressPool, Add-AzApplicationGatewayBackendHttpSetting, Add-AzApplicationGatewayBa…
Script 6.11.1 Az.Resources {Export-AzResourceGroup, Export-AzTemplateSpec, Get-AzDenyAssignment, Get-AzDeployment…}
Script 5.10.1 Az.Storage {Add-AzRmStorageContainerLegalHold, Add-AzStorageAccountManagementPolicyAction, Add-AzStorageAccountNetworkRule, Close-AzStorageFileHandle…}
Script 1.1.2 Az.Tools.Predictor {Disable-AzPredictor, Enable-AzPredictor, Open-AzPredictorSurvey, Send-AzPredictorRating}
Script 0.0.0.10 AzureAD.Standard.Preview {Add-AzureADApplicationOwner, Add-AzureADDeviceRegisteredOwner, Add-AzureADDeviceRegisteredUser, Add-AzureADDirectoryRoleMember…}
Script 0.9.3 AzurePSDrive
Error output
No response