diff options
author | bms <bms@FreeBSD.org> | 2007-02-03 03:37:37 +0000 |
---|---|---|
committer | bms <bms@FreeBSD.org> | 2007-02-03 03:37:37 +0000 |
commit | a292a65af1a42f58727afbe143a35f0f7ca6b7c1 (patch) | |
tree | fb808378dfc00638c5a25cfb4332729c918314f4 /sbin/ifconfig | |
parent | cb84e5a9bd809b0fc9ae4a9601889aa89770481d (diff) | |
download | FreeBSD-src-a292a65af1a42f58727afbe143a35f0f7ca6b7c1.zip FreeBSD-src-a292a65af1a42f58727afbe143a35f0f7ca6b7c1.tar.gz |
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)
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r-- | sbin/ifconfig/ifconfig.8 | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index 17b16b8..b0c47d8 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 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 |