Azure / Azure/azure-powershell

[Az.Network] One conceptual docs about Get-AzEffectiveRouteTable include property AddressPrefix in output (but should not)

Open Beginner friendly
#22,231 7 comments 0 reactions 0 assignees View on GitHub
act-quality-productivity-squad bug Doc - Conceptual Network - Virtual Network Service Attention
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

### Description

The output from [Diagnose a VM network routing problem - Azure PowerShell - Azure Network Watcher | Microsoft Learn](https://learn.microsoft.com/en-us/azure/network-watcher/diagnose-vm-network-routing-problem-powershell#view-details-of-a-route)
![image](https://github.com/Azure/azure-powershell/assets/19869716/47445335-160d-45bf-8236-9e2a574cb0d1)

Actual output is as below:
![image](https://github.com/Azure/azure-powershell/assets/19869716/8c30bbad-10db-499e-9c70-7766bf580304)

And, AddressPrefix and NextHopIpAddress should not be displayed according to [format file](https://github.com/Azure/azure-powershell/blob/3a73bf4f4cdf10dd2ac107d39de27b76e7d629c3/src/Network/Network/Network.generated.format.ps1xml#L6305).

**Solution: Need to correct the docs.**

### Issue script & Debug output

```PowerShell
PS C:\Users\toizumi> $DebugPreference = 'Continue'
PS C:\Users\toizumi> Get-AzEffectiveRouteTable -NetworkInterfaceName vm1193 -ResourceGroupName rg-test-0621 | Format-Table

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
POST

Absolute Uri:
https://management.azure.com/subscriptions/a13f39e1-2887-4623-a964-88332d0642a3/resourceGroups/rg-test-0621/providers/Microsoft.Network/networkInterfaces/vm1193/effectiveRouteTable?api-version=2022-11-01

Headers:
x-ms-client-request-id : 4963168e-0f91-4631-95d8-f8fe5fd18b76
accept-language : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
Accepted

Headers:
Pragma : no-cache
Retry-After : 10
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-writes: 1199
x-ms-routing-request-id : JAPANEAST:20230703T083249Z:79165b34-7acb-4faf-93c1-85c1693afd17
X-Content-Type-Options : nosniff
Date : Mon, 03 Jul 2023 08:32:48 GMT

Body:
null

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
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

Headers:
x-ms-client-request-id : 4963168e-0f91-4631-95d8-f8fe5fd18b76

Body:

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: 11999
x-ms-routing-request-id : JAPANEAST:20230703T083259Z:d96379e6-d857-415f-9a1d-6f92e5c86e34
X-Content-Type-Options : nosniff
Date : Mon, 03 Jul 2023 08:32:58 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: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
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

Headers:
x-ms-client-request-id : 4963168e-0f91-4631-95d8-f8fe5fd18b76

Body:

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
```

### Environment data

```PowerShell
None
```

### Module versions

```PowerShell
DEBUG: AzureQoSEvent: Module: Az.Network:6.0.0; CommandName: Get-AzEffectiveRouteTable; PSVersion: 5.1.22621.1778; IsSuccess: True; Duration: 00:00:13.4099558
```

### Error output

_No response_

Contributor guide

Open the contributing guide

Research direction

Compare the Microsoft Learn page linked in the issue with the output format in src/Network/Network/Network.generated.format.ps1xml around line 6305. Update the conceptual documentation so the Get-AzEffectiveRouteTable example matches the fields actually displayed, then verify the corrected example against the command output described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cloud, documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.