Add an EXAMPLES section to ifconfig(8), clearly showing how to configure

IPv6 addresses in FreeBSD.

See also: http://www.telscom.ch/index.php/downloads/configure_ipv6_features

MFC after:	1 week
PR:		102701
Obtained from:	OpenBSD (partly, with edits)
This commit is contained in:
Bruce M Simpson 2007-02-03 03:37:37 +00:00
parent 7059a5e0bd
commit 9bad5f3777
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166445

View File

@ -28,7 +28,7 @@
.\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94
.\" $FreeBSD$
.\"
.Dd January 20, 2007
.Dd February 3, 2007
.Dt IFCONFIG 8
.Os
.Sh NAME
@ -1567,6 +1567,47 @@ Only the super-user may modify the configuration of a network interface.
.Sh NOTES
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 ,
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
.Pp
Assign the IPv4 address
.Li 172.16.20.2 ,
with the CIDR network prefix
.Li /22 ,
to the interface
.Li ed0 :
.Dl # ifconfig ed0 inet 172.16.20.2/22
.Pp
Assign the IPv6 address
.Li 3ffe:112:fffc:10:1::2/64
to the interface
.Li em0 :
.Dl # ifconfig em0 inet6 add 3ffe:112:fffc:10:1::2 prefixlen 64
.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
.Pp
Configure the interface
.Li xl0 ,
to use 100baseTX, full duplex Ethernet media options:
.Dl # ifconfig xl0 media 100baseTX mediaopt full-duplex
.Pp
Create the software network interface
.Li gif1 :
.Dl # ifconfig gif1 create
.Pp
Destroy the software network interface
.Li gif1 :
.Dl # ifconfig gif1 destroy
.Sh DIAGNOSTICS
Messages indicating the specified interface does not exist, the
requested address is unknown, or the user is not privileged and