Skip to content

Commit 6103c2f

Browse files
authored
Merge pull request #38264 from mrhoads/patch-1
Update network-watcher-packet-capture-manage-cli.md
2 parents 47e3ef7 + 99eef3b commit 6103c2f

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

articles/network-watcher/network-watcher-packet-capture-manage-cli.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ This article assumes you have the following resources:
4747

4848
### Step 1
4949

50-
Run the `az vm extension set` cmdlet to install the packet capture agent on the guest virtual machine.
50+
Run the `az vm extension set` command to install the packet capture agent on the guest virtual machine.
5151

5252
For Windows virtual machines:
5353

@@ -58,17 +58,23 @@ az vm extension set --resource-group resourceGroupName --vm-name virtualMachineN
5858
For Linux virtual machines:
5959

6060
```azurecli
61-
az vm extension set --resource-group resourceGroupName --vm-name virtualMachineName --publisher Microsoft.Azure.NetworkWatcher --name NetworkWatcherAgentLinux--version 1.4
61+
az vm extension set --resource-group resourceGroupName --vm-name virtualMachineName --publisher Microsoft.Azure.NetworkWatcher --name NetworkWatcherAgentLinux --version 1.4
6262
```
6363

6464
### Step 2
6565

66-
To ensure that the agent is installed, run the `vm extension show` cmdlet and pass it the resource group and virtual machine name. Check the resulting list to ensure the agent is installed.
66+
To ensure that the agent is installed, run the `vm extension show` command and pass it the resource group and virtual machine name. Check the resulting list to ensure the agent is installed.
6767

68+
For Windows virtual machines:
6869
```azurecli
6970
az vm extension show --resource-group resourceGroupName --vm-name virtualMachineName --name NetworkWatcherAgentWindows
7071
```
7172

73+
For Linux virtual machines:
74+
```azurecli
75+
az vm extension show --resource-group resourceGroupName --vm-name virtualMachineName --name AzureNetworkWatcherExtension
76+
```
77+
7278
The following sample is an example of the response from running `az vm extension show`
7379

7480
```json
@@ -95,31 +101,24 @@ The following sample is an example of the response from running `az vm extension
95101

96102
Once the preceding steps are complete, the packet capture agent is installed on the virtual machine.
97103

98-
### Step 1
99-
100-
The next step is to retrieve the Network Watcher instance. TThe name of the Network Watcher is passed to the `az network watcher show` cmdlet in step 4.
101104

102-
```azurecli
103-
az network watcher show --resource-group resourceGroup --name networkWatcherName
104-
```
105-
106-
### Step 2
105+
### Step 1
107106

108107
Retrieve a storage account. This storage account is used to store the packet capture file.
109108

110109
```azurecli
111-
azure storage account list
110+
az storage account list
112111
```
113112

114-
### Step 3
113+
### Step 2
115114

116-
Filters can be used to limit the data that is stored by the packet capture. The following example sets up a packet capture with several filters. The first three filters collect outgoing TCP traffic only from local IP 10.0.0.3 to destination ports 20, 80 and 443. The last filter collects only UDP traffic.
115+
At this point, you are ready to create a packet capture. First, let's examine the parameters you may want to configure. Filters are one such parameter that can be used to limit the data that is stored by the packet capture. The following example sets up a packet capture with several filters. The first three filters collect outgoing TCP traffic only from local IP 10.0.0.3 to destination ports 20, 80 and 443. The last filter collects only UDP traffic.
117116

118117
```azurecli
119118
az network watcher packet-capture create --resource-group {resourceGroupName} --vm {vmName} --name packetCaptureName --storage-account {storageAccountName} --filters "[{\"protocol\":\"TCP\", \"remoteIPAddress\":\"1.1.1.1-255.255.255\",\"localIPAddress\":\"10.0.0.3\", \"remotePort\":\"20\"},{\"protocol\":\"TCP\", \"remoteIPAddress\":\"1.1.1.1-255.255.255\",\"localIPAddress\":\"10.0.0.3\", \"remotePort\":\"80\"},{\"protocol\":\"TCP\", \"remoteIPAddress\":\"1.1.1.1-255.255.255\",\"localIPAddress\":\"10.0.0.3\", \"remotePort\":\"443\"},{\"protocol\":\"UDP\"}]"
120119
```
121120

122-
The following example is the expected output from running the `az network watcher packet-capture create` cmdlet.
121+
The following example is the expected output from running the `az network watcher packet-capture create` command.
123122

124123
```json
125124
{
@@ -174,13 +173,13 @@ roviders/microsoft.compute/virtualmachines/{vmName}/2017/05/25/packetcapture_16_
174173

175174
## Get a packet capture
176175

177-
Running the `az network watcher packet-capture show-status` cmdlet, retrieves the status of a currently running, or completed packet capture.
176+
Running the `az network watcher packet-capture show-status` command, retrieves the status of a currently running, or completed packet capture.
178177

179178
```azurecli
180179
az network watcher packet-capture show-status --name packetCaptureName --location {networkWatcherLocation}
181180
```
182181

183-
The following example is the output from the `az network watcher packet-capture show-status` cmdlet. The following example is when the capture is Stopped, with a StopReason of TimeExceeded.
182+
The following example is the output from the `az network watcher packet-capture show-status` command. The following example is when the capture is Stopped, with a StopReason of TimeExceeded.
184183

185184
```
186185
{
@@ -199,14 +198,14 @@ cketCaptures/packetCaptureName",
199198

200199
## Stop a packet capture
201200

202-
By running the `az network watcher packet-capture stop` cmdlet, if a capture session is in progress it is stopped.
201+
By running the `az network watcher packet-capture stop` command, if a capture session is in progress it is stopped.
203202

204203
```azurecli
205204
az network watcher packet-capture stop --name packetCaptureName --location westcentralus
206205
```
207206

208207
> [!NOTE]
209-
> The cmdlet returns no response when ran on a currently running capture session or an existing session that has already stopped.
208+
> The command returns no response when ran on a currently running capture session or an existing session that has already stopped.
210209
211210
## Delete a packet capture
212211

0 commit comments

Comments
 (0)