summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorbms <bms@FreeBSD.org>2007-02-04 16:48:56 +0000
committerbms <bms@FreeBSD.org>2007-02-04 16:48:56 +0000
commit9211f5456edb1bdfbcf62c948ba94175d4fc67ef (patch)
treedfdbd041b3f39e2cc6ce3824bc44188fbb19f51e /sbin
parent77c2e113090f513f7876ee5e02f61ab600b319cf (diff)
downloadFreeBSD-src-9211f5456edb1bdfbcf62c948ba94175d4fc67ef.zip
FreeBSD-src-9211f5456edb1bdfbcf62c948ba94175d4fc67ef.tar.gz
Be explicit in examples about the correct grammar for 'alias' and
'-alias', and that 'add' and 'delete are in fact synonyms for these in the ifconfig(8) grammar. Use network prefixes explicitly specified in IETF RFCs for documentation purposes. (bz) PR: 102701 MFC after: 1 day See also: RFC 3330, RFC 3849 Submitted by: bz
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ifconfig/ifconfig.839
1 files changed, 27 insertions, 12 deletions
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8
index b0c47d8..f3fe1e7 100644
--- a/sbin/ifconfig/ifconfig.8
+++ b/sbin/ifconfig/ifconfig.8
@@ -28,7 +28,7 @@
.\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94
.\" $FreeBSD$
.\"
-.Dd February 3, 2007
+.Dd February 4, 2007
.Dt IFCONFIG 8
.Os
.Sh NAME
@@ -1569,32 +1569,47 @@ The media selection system is relatively new and only some drivers support
it (or have need for it).
.Sh EXAMPLES
Assign the IPv4 address
-.Li 192.168.1.10 ,
+.Li 192.0.2.10 ,
with a network mask of
.Li 255.255.255.0 ,
to the interface
.Li fxp0 :
-.Dl # ifconfig fxp0 inet 192.168.1.10 netmask 255.255.255.0
+.Dl # ifconfig fxp0 inet 192.0.2.10 netmask 255.255.255.0
.Pp
-Assign the IPv4 address
-.Li 172.16.20.2 ,
+Add the IPv4 address
+.Li 192.0.2.45 ,
with the CIDR network prefix
-.Li /22 ,
+.Li /28 ,
to the interface
+.Li ed0 ,
+using
+.Cm add
+as a synonym for the canonical form of the option
+.Cm alias :
+.Dl # ifconfig ed0 inet 192.0.2.45/28 add
+.Pp
+Remove the IPv4 address
+.Li 192.0.2.45
+from the interface
.Li ed0 :
-.Dl # ifconfig ed0 inet 172.16.20.2/22
+.Dl # ifconfig ed0 inet 192.0.2.45 -alias
.Pp
-Assign the IPv6 address
-.Li 3ffe:112:fffc:10:1::2/64
+Add the IPv6 address
+.Li 2001:DB8:DBDB::123/48
to the interface
.Li em0 :
-.Dl # ifconfig em0 inet6 add 3ffe:112:fffc:10:1::2 prefixlen 64
+.Dl # ifconfig em0 inet6 2001:db8:bdbd::123 prefixlen 48 alias
+Note that lower case hexadecimal IPv6 addresses are acceptable.
.Pp
Remove the IPv6 address added in the above example,
using the
.Li /
-character as shorthand for the network prefix:
-.Dl # ifconfig em0 inet6 3ffe:112:fffc:10:1::2/64 delete
+character as shorthand for the network prefix,
+and using
+.Cm delete
+as a synonym for the canonical form of the option
+.Fl alias :
+.Dl # ifconfig em0 inet6 2001:db8:bdbd::123/48 delete
.Pp
Configure the interface
.Li xl0 ,
OpenPOWER on IntegriCloud