From: Jon Maloy <jmaloy@redhat.com>
To: sbrivio@redhat.com, dgibson@redhat.com,
david@gibson.dropbear.id.au, jmaloy@redhat.com,
passt-dev@passt.top
Subject: [PATCH v3 2/2] doc: Document CIDR notation support for -a/--address option
Date: Thu, 18 Dec 2025 17:22:13 -0500 [thread overview]
Message-ID: <20251218222213.703693-3-jmaloy@redhat.com> (raw)
In-Reply-To: <20251218222213.703693-1-jmaloy@redhat.com>
Update the man page to document the new CIDR notation support:
- Update -a/--address to show addr[/prefix_len] syntax
- Document that prefix length (0-32) can be appended for IPv4
- Note that mixing CIDR notation with -n results in an error
- Update -n/--netmask to mention CIDR alternative
Signed-off-by: Jon Maloy <jmaloy@redhat.com>
---
passt.1 | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/passt.1 b/passt.1
index db0d662..117239f 100644
--- a/passt.1
+++ b/passt.1
@@ -156,10 +156,14 @@ By default, the advertised MTU is 65520 bytes, that is, the maximum 802.3 MTU
minus the length of a 802.3 header, rounded to 32 bits (IPv4 words).
.TP
-.BR \-a ", " \-\-address " " \fIaddr
+.BR \-a ", " \-\-address " " \fIaddr\fR[\fB/\fR\fIprefix_len\fR]
Assign IPv4 \fIaddr\fR via DHCP (\fByiaddr\fR), or \fIaddr\fR via DHCPv6 (option
5) and an \fIaddr\fR-based prefix via NDP Router Advertisement (option type 3)
for an IPv6 \fIaddr\fR.
+For IPv4 addresses, an optional \fB/\fR\fIprefix_len\fR (0-32) can be
+appended in CIDR notation (e.g., 192.168.1.1/24). This is an alternative to
+using the \fB-n\fR, \fB--netmask\fR option. Mixing CIDR notation with
+\fB-n\fR results in an error.
This option can be specified zero (for defaults) to two times (once for IPv4,
once for IPv6).
By default, assigned IPv4 and IPv6 addresses are taken from the host interfaces
@@ -172,7 +176,9 @@ is assigned for IPv4, and no additional address will be assigned for IPv6.
.TP
.BR \-n ", " \-\-netmask " " \fImask
Assign IPv4 netmask \fImask\fR, expressed as dot-decimal or number of bits, via
-DHCP (option 1).
+DHCP (option 1). Alternatively, the prefix length can be specified using CIDR
+notation with the \fB-a\fR, \fB--address\fR option (e.g., \fB-a\fR 192.168.1.1/24).
+Mixing \fB-n\fR with CIDR notation results in an error.
By default, the netmask associated to the host address matching the assigned one
is used. If there's no matching address on the host, the netmask is determined
according to the CIDR block of the assigned address (RFC 4632).
--
2.52.0
prev parent reply other threads:[~2025-12-18 22:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-18 22:22 [PATCH v3 0/2] conf: Support CIDR notation " Jon Maloy
2025-12-18 22:22 ` [PATCH v3 1/2] " Jon Maloy
2025-12-18 22:22 ` Jon Maloy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251218222213.703693-3-jmaloy@redhat.com \
--to=jmaloy@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=dgibson@redhat.com \
--cc=passt-dev@passt.top \
--cc=sbrivio@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).