Skip to content

Commit 24300f4

Browse files
authored
Improve netmap docs (zmap#813)
1 parent c7cd5e5 commit 24300f4

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

README.netmap.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,31 @@ For best results on hardware that supports AES acceleration, additionally use
3636

3737
### Running
3838

39-
Run zmap as you would normally. For best results, use the `--cores` option to
40-
pick which cores to pin to, pinning to different physical cores. The number of
41-
send threads is automatically capped to the number of TX rings, and to the
42-
number of available cores after setting aside one core for the receive thread,
43-
but you may still want to override the number of threads with `-T`.
39+
Run zmap as you would normally.
40+
41+
```
42+
$ sudo ./src/zmap -p 443 -i ix0 -o output.csv
43+
```
4444

4545
Warning: Netmap will disconnect the NIC from the host network stack for the
4646
duration of the scan. If you use an interface that you depend on for e.g. SSH
4747
access, you will lose connectivity until ZMap exits.
4848

49-
```
50-
$ sudo ./src/zmap -p 443 -i ix0 -o output.csv
51-
```
49+
50+
### Performance tuning
51+
52+
For best results, use the `--cores` option to pick which cores to pin to,
53+
pinning to different physical cores. By default, the number of send threads is
54+
set to the number of available cores after setting aside one core for the
55+
receive thread, capped to 4 send threads, but you may still want to override
56+
the number of send threads with `-T`. The number of send threads cannot exceed
57+
the number of TX rings of the NIC.
58+
59+
Tuning batch size can also have an effect on send rate. `--batch 256` is not
60+
an unreasonable starting point on 10 GbE hardware.
61+
62+
63+
### Switch ports and STP
5264

5365
Going into and leaving Netmap mode causes the link to go down and up as part of
5466
a PHY reset. If the interface is connected to a switch with STP enabled, then

src/zopt.ggo.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ option "rate" r "Set send rate in packets/sec"
3737
option "bandwidth" B "Set send rate in bits/second (supports suffixes G, M and K)"
3838
typestr="bps"
3939
optional string
40-
option "batch" - "Set batch size for how many packets to send in a single syscall. Only advantageous on Linux (default=64)"
40+
option "batch" - "Set batch size for how many packets to send in a single syscall. Advantageous on Linux or with netmap (default=64)"
4141
typestr="pps"
4242
optional int
4343
option "max-targets" n "Cap number of targets to probe (as a number or a percentage of the address space). A target is an IP/port pair, if scanning multiple ports, and an IP otherwise."

0 commit comments

Comments
 (0)