Hi,
/etc/hostname.if supports IPv4 addresses with a CIDR prefix length:
inet 10.0.0.1/16
which is not documented in hostname.if(5). The attached patch fixes
that. I'm not sure whether describing '/prefixlen' before 'netmask' is a
good idea, but it matches the order things have to be specified in and
'netmask' is the next paragraph after '/prefixlen'
--
Gregor
Index: hostname.if.5
===================================================================
RCS file: /mnt/media/cvs/src/share/man/man5/hostname.if.5,v
retrieving revision 1.64
diff -u -p -r1.64 hostname.if.5
--- hostname.if.5 6 Jun 2015 13:13:07 -0000 1.64
+++ hostname.if.5 1 May 2016 17:17:22 -0000
@@ -82,7 +82,9 @@ Regular IPv4 network setup:
.Bd -ragged -offset indent
.Li inet
.Op Li alias
-.Va addr
+.Sm
+.Va addr Op / Va prefixlen
+.Sm
.Va netmask
.Va broadcast_addr
.Va options
@@ -117,6 +119,7 @@ inet alias 10.0.1.13 255.255.255.255 10.
inet alias 10.0.1.14 255.255.255.255 NONE
inet alias 10.0.1.15 255.255.255.255
inet alias 10.0.1.16 0xffffffff
+inet alias 10.0.1.17/29
# This is an example comment line.
inet6 alias fec0::1 64
inet6 alias fec0::2 64 anycast
@@ -152,6 +155,12 @@ If no address is specified, the
and
.Va dest_addr
options are invalid and will be ignored.
+.Sm
+.It / Va prefixlen
+.Sm
+The optional CIDR prefix length for the interface, e.g.,
+/29.
+If both a netmask and a prefix length are specified, the netmask is used.
.It Va netmask
The optional network mask for the interface, e.g.,
255.255.255.0.