Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/share/man/man5 Pull up revisions 1.1-1.2 (new, requeste...



details:   https://anonhg.NetBSD.org/src/rev/74dcb2e51db1
branches:  netbsd-1-5
changeset: 491594:74dcb2e51db1
user:      he <he%NetBSD.org@localhost>
date:      Wed May 02 22:51:18 2001 +0000

description:
Pull up revisions 1.1-1.2 (new, requested by itojun):
  Add support for "!" and "#" syntax in /etc/ifconfig.*.

diffstat:

 share/man/man5/ifconfig.if.5 |  104 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 104 insertions(+), 0 deletions(-)

diffs (108 lines):

diff -r 172a661cbefc -r 74dcb2e51db1 share/man/man5/ifconfig.if.5
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/man/man5/ifconfig.if.5      Wed May 02 22:51:18 2001 +0000
@@ -0,0 +1,104 @@
+.\"    $NetBSD: ifconfig.if.5,v 1.2.2.2 2001/05/02 22:51:18 he Exp $
+.\"
+.\" Copyright (c) 1996 Matthew R. Green
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote products
+.\"    derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd January 12, 2001
+.Dt IFCONFIG.IF 5
+.Os
+.Sh NAME
+.Nm ifconfig.if
+.Nd interface-specific configuration files
+.Sh DESCRIPTION
+The
+.Nm
+files contain information regarding the configuration of each network interface.
+.Nm
+is processed by
+.Pa /etc/rc.d/network
+at system boot time.
+.Pp
+One file should exist for each interface that is to be configured, such as
+.Pa /etc/ifconfig.fxp0 .
+The file will get evaluated only if the interface exists on the system.
+Multiple lines can be placed in a file, and will be evaluated sequentially.
+.Pp
+Normally, a line will be evaluated as command line arguments to 
+.Xr ifconfig 8 .
+.Dq Li ifconfig if
+will be prepended on evaluation.
+.Pp
+If a line is empty, or starts with
+.Sq # ,
+the line will be ignored as comment.
+.Pp
+If a line starts with
+.Sq ! ,
+the rest of line will get evaluated as shell script fragment.
+Shell variables declared in
+.Pa /etc/rc.d/network
+are accessible.
+The most useful variable is 
+.Li $int ,
+as it will be bound to the interface being configured with the file.
+.Pp
+For example, the following illustrates static interface configuration:
+.Bd -literal -offset xxxx
+# IPv4, with an alias
+inet 10.0.1.12 255.255.255.0 media 100baseTX
+inet 10.0.1.13 255.255.255.255 alias
+# let us have IPv6 address on this interface
+inet6 fec0::1 prefixlen 64 alias
+# have subnet router anycast address too
+inet6 fec0:: prefixlen 64 alias anycast
+.Ed
+.Pp
+The following illustrates dynamic configuration setup with
+.Xr dhclient 8
+and
+.Xr rtsol 8 :
+.Bd -literal -offset xxxx
+up
+# autoconfigure IPv4 address
+!dhclient $int
+# autoconfigure IPv6 address.  be sure to set $ip6mode to autohost.
+!rtsol $int
+.Ed
+.Pp
+The following example is for dynamically-created pseudo interfaces like
+.Xr gif 4 :
+.Bd -literal -offset xxxx
+create
+up
+# configure IPv6 default route toward the interface
+!route add -inet6 default ::1
+!route change -inet6 default -ifp $int
+.Ed
+.Sh FILES
+.Pa /etc/rc.d/network
+.Sh SEE ALSO
+.Xr rc.conf 5 ,
+.Xr ifconfig 8



Home | Main Index | Thread Index | Old Index