Skip to content

Commit 99eef3b

Browse files
authored
re-worked steps for starting a packet capture
this should match our exchange of comments; step 1 now goes back to the way it was originally in the PR and --location is removed from packet-capture create to match the CLI
1 parent cafdc09 commit 99eef3b

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,27 +104,21 @@ The following sample is an example of the response from running `az vm extension
104104

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

107-
### Step 1
108-
The next step is to retrieve the Network Watcher instance. TThe name of the Network Watcher is passed to the `az network watcher show` command in a subsequent step.
109-
110-
```azurecli
111-
az network watcher show --resource-group resourceGroup --name networkWatcherName
112-
```
113107

114-
### Step 2
108+
### Step 1
115109

116110
Retrieve a storage account. This storage account is used to store the packet capture file.
117111

118112
```azurecli
119113
az storage account list
120114
```
121115

122-
### Step 3
116+
### Step 2
123117

124118
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.
125119

126120
```azurecli
127-
az network watcher packet-capture create --resource-group {resourceGroupName} --vm {vmName} --name packetCaptureName --storage-account {storageAccountName} --location {location} --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\"}]"
121+
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\"}]"
128122
```
129123

130124
The following example is the expected output from running the `az network watcher packet-capture create` command.

0 commit comments

Comments
 (0)