Skip to content

Commit b220409

Browse files
authored
Merge pull request #271453 from HollyCl/nexus0408
new concept article for RO commands
2 parents 4cbecac + c6635c5 commit b220409

File tree

2 files changed

+139
-0
lines changed

2 files changed

+139
-0
lines changed

articles/operator-nexus/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
href: concepts-network-fabric-services.md
2525
- name: Network Fabric resource update and commit
2626
href: concepts-network-fabric-resource-update-commit.md
27+
- name: Network Fabric read-only commands
28+
href: concepts-network-fabric-read-only-commands.md
2729
- name: Isolation Domains
2830
expanded: false
2931
items:
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
---
2+
title: Network Fabric read-only commands
3+
description: Learn about troubleshooting network devices using read-only commands.
4+
author: HollyCl
5+
ms.author: HollyCl
6+
ms.service: azure-operator-nexus
7+
ms.topic: concept-article #Required; leave this attribute/value as-is.
8+
ms.date: 04/15/2024
9+
10+
#CustomerIntent: As a <type of user>, I want <what?> so that <why?>.
11+
---
12+
13+
# Network Fabric read-only commands for troubleshooting
14+
15+
Troubleshooting network devices is a critical aspect of effective network management. Ensuring the health and optimal performance of your infrastructure requires timely diagnosis and resolution of issues. In this guide, we present a comprehensive approach to troubleshooting Azure Operator Nexus devices using read-only (RO) commands.
16+
17+
## Understanding read-only commands
18+
19+
RO commands serve as essential tools for network administrators. Unlike read-write (RW) commands that modify device configurations, RO commands allow administrators to gather diagnostic information without altering the device's state. These commands provide valuable insights into the device's status, configuration, and operational data.
20+
21+
## Read-only diagnostic API
22+
23+
The read-only diagnostic API enables users to execute `show` commands on network devices via an API call. This efficient method allows administrators to remotely run diagnostic queries across all network fabric devices. Key features of the read-only diagnostic API include:
24+
25+
- **Efficiency** - Execute `show` commands without direct access to the device console.
26+
27+
- **Seamless Integration with AZCLI**: Users can utilize the regular Azure Command-Line Interface (AZCLI) to pass the desired "show command." The API then facilitates command execution on the target device, fetching the output.
28+
29+
- **JSON Output**: Results from the executed commands are presented in JSON format, making it easy to parse and analyze.
30+
31+
- **Secure Storage**: The output data is stored in the customer-owned storage account, ensuring data security and compliance.
32+
33+
By using the read-only diagnostic API, network administrators can efficiently troubleshoot issues, verify configurations, and monitor device health across their Azure Operator Nexus devices.
34+
35+
## Prerequisites
36+
37+
To use Network Fabric read-only commands, complete the following steps:
38+
39+
- Provision the Nexus Network Fabric successfully.
40+
- Generate the storage URL.
41+
42+
Refer to [Create a container](../storage/blobs/blob-containers-portal.md#create-a-container) to create a container.
43+
44+
> [!NOTE]
45+
> Enter the name of the container using only lowercase letters.
46+
47+
Refer to [Generate a shared access signature](../storage/blobs/blob-containers-portal.md#generate-a-shared-access-signature) to create the SAS URL of the container. Provide Write permission for SAS.
48+
49+
> [!NOTE]
50+
> SAS URLs are short lived. By default, it is set to expire in eight hours. If the SAS URL expires, then the fabric must be re-patched.
51+
52+
53+
- Provide the storage URL with WRITE access via a support ticket.
54+
55+
> [!NOTE]
56+
> The Storage URL must be located in a different region from the Network Fabric. For instance, if the Fabric is hosted in East US, the storage URL should be outside of East US.
57+
58+
## Command restrictions
59+
60+
To ensure security and compliance, RO commands must adhere to the following specific rules:
61+
62+
- Only absolute commands should be provided as input. Short forms and prompts aren't supported. For example:
63+
- Enter `show interfaces Ethernet 1/1 status`
64+
- Don't enter `sh int stat` or `sh int e1/1 status`
65+
- Commands must not be null, empty, or consist only of a single word.
66+
- Commands must not include the pipe (|) character.
67+
- Show commands are unrestricted, except for the high CPU intensive commands specifically referred to in this list of restrictions.
68+
- Commands must not end with `tech-support`, `agent logs`, `ip route`, or `ip route vrf all`.
69+
- Only one `show` command at a time can be used on a specific device.
70+
- You can run the `show` command on another CLI window in parallel.
71+
- You can run a `show` command on different devices at the same time.
72+
73+
## Troubleshoot using read-only commands
74+
75+
To troubleshoot using read-only commands, follow these steps:
76+
77+
1. Open a Microsoft support ticket. The support engineer makes the necessary updates.
78+
1. Execute the following Azure CLI command:
79+
80+
```azurecli
81+
az networkfabric device run-ro --resource-name "<NFResourceName>" --resource-group "<NFResourceGroupName>" --ro-command "show version"
82+
```
83+
84+
Expected output:
85+
86+
`{ }`
87+
88+
1. Enter the following command:
89+
90+
```azurecli
91+
az networkfabric device run-ro --resource-group Fab3LabNF-6-0-A --resource-name nffab3-6-0-A-AggrRack-CE1 --ro-command "show version" --no-wait --debug
92+
```
93+
94+
The following (truncated) output appears. Copy the URL through **private preview**. This portion of the URL is used in the following step to check the status of the operation.
95+
96+
```azurecli
97+
***https://management.azure.com/subscriptions/9531faa8-8c39-4165-b033-48697fe943db/providers/Microsoft.ManagedNetworkFabric/locations/EASTUS2EUAP/operationStatuses/59fdc0c8-eeb1-4258-9163-3cf096490148*A9E6DB3DF5C58D67BD395F7A608C056BC8219C392CC1CE0AD22E4C36D70CEE5C?api-version=2022-01-15-privatepreview***&t=638485032018035520&c=MIIHHjCCBgagAwIBAgITfwKWMg6goKCq4WwU2AAEApYyDjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMTAzMDI3WhcNMjUwMTI0MTAzMDI3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALMk1pBZQQoNY8tos8XBaEjHjcdWubRHrQk5CqKcX3tpFfukMI0_PVZK-Kr7xkZFQTYp_ItaM2RPRDXx-0W9-mmrUBKvdcQ0rdjcSXDek7GvWS29F5sDHojD1v3e9k2jJa4cVSWwdIguvXmdUa57t1EHxqtDzTL4WmjXitzY8QOIHLMRLyXUNg3Gqfxch40cmQeBoN4rVMlP31LizDfdwRyT1qghK7vgvworA3D9rE00aM0n7TcBH9I0mu-96JE0gSX1FWXctlEcmdwQmXj_U0sZCu11_Yr6Oa34bmUQHGc3hDvO226L1Au-QsLuRWFLbKJ-0wmSV5b3CbU1kweD5LUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-
98+
```
99+
100+
3. Check the status of the operation programmatically using the following Azure CLI command:
101+
102+
```azurecli
103+
az rest -m get -u "<Azure-AsyncOperation-endpoint url>"
104+
```
105+
106+
The operation status indicates if the API succeeded or failed, and appears similar to the following output:
107+
108+
```azurecli
109+
https://management.azure.com/subscriptions/xxxxxxxxxxx/providers/Microsoft.ManagedNetworkFabric/locations/EASTUS/operationStatuses/xxxxxxxxxxx?api-version=20XX-0X-xx-xx
110+
```
111+
112+
113+
114+
4. View and download the generated output file. Sample output is shown here.
115+
116+
```azurecli
117+
{
118+
"architecture": "x86_64",
119+
"bootupTimestamp": 1701940797.5429916,
120+
"configMacAddress": "00:00:00:00:00:00",
121+
"hardwareRevision": "12.05",
122+
"hwMacAddress": "c4:ca:2b:62:6d:d3",
123+
"imageFormatVersion": "3.0",
124+
"imageOptimization": "Default",
125+
"internalBuildId": "d009619b-XXXX-XXXX-XXXX-fcccff30ae3b",
126+
"internalVersion": "4.30.3M-33434233.4303M",
127+
"isIntlVersion": false,
128+
"memFree": 3744220,
129+
"memTotal": 8107980,
130+
"mfgName": "Arista",
131+
"modelName": "DCS-7280DR3-24-F",
132+
"serialNumber": "JPAXXXX1LZ",
133+
"systemMacAddress": "c4:ca:2b:62:6d:d3",
134+
"uptime": 8475685.5,
135+
"version": "4.30.3M"
136+
}
137+
```

0 commit comments

Comments
 (0)