]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/gifconfig/gifconfig.8
This commit was generated by cvs2svn to compensate for changes in r75264,
[FreeBSD/FreeBSD.git] / usr.sbin / gifconfig / gifconfig.8
1 .\"     $FreeBSD$
2 .\"     $KAME: gifconfig.8,v 1.5 2000/05/13 07:48:10 itojun Exp $
3 .\"
4 .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
5 .\" All rights reserved.
6 .\" 
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\"    notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in the
14 .\"    documentation and/or other materials provided with the distribution.
15 .\" 3. Neither the name of the project nor the names of its contributors
16 .\"    may be used to endorse or promote products derived from this software
17 .\"    without specific prior written permission.
18 .\" 
19 .\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
23 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 .\" SUCH DAMAGE.
30 .\"
31 .Dd May 17, 1998
32 .Dt GIFCONFIG 8
33 .Os
34 .Sh NAME
35 .Nm gifconfig
36 .Nd configure generic IP tunnel
37 .Sh SYNOPSIS
38 .Nm
39 .Ar interface
40 .Op Ar af
41 .Op Ar physsrc physdest
42 .Nm
43 .Ar interface
44 .Ic delete
45 .Nm
46 .Fl a
47 .Sh DESCRIPTION
48 .Nm
49 configures the physical address for the generic IP tunnel
50 inteface, such as "gif0".
51 Argument
52 .Ar physsrc
53 and
54 .Ar physdest
55 are interpreted as the outer source/destination address for
56 encapsulating IPv4/v6 header.
57 Argument
58 .Ar af
59 specifies the address family for
60 .Ar physsrc
61 and
62 .Ar physdest .
63 .Ar Af
64 can be
65 .Li inet
66 or
67 .Li inet6 ,
68 and will be treated as
69 .Li inet
70 if ommitted.
71 .Pp
72 If a special argument
73 .Ic delete
74 is specified,
75 .Nm
76 just deletes the existing source and destination addresses on
77 .Ar interface .
78 If no outer addresses are specified, this usage has no effect.
79 .Pp
80 .Nm
81 takes the following optional argument:
82 .Bl -tag -width Ds
83 .It Fl a
84 Display information associated all generic IP tunnel interfaces.
85 .El
86 .Pp
87 Please note that it is very easy to create infinite routing loop,
88 when you configure tunnel over same address family
89 .Po
90 e.g. IPv4-over-IPv4
91 .Pc .
92 .Sh EXAMPLES
93 If you would like to configure IPv6 over IPv4
94 .Pq aka IPv6 in IPv4
95 tunnel between
96 .Li 10.1.1.1
97 and
98 .Li 10.2.3.4 ,
99 you should perform the following command:
100 .Bd -literal -offset
101 # gifconfig gif0 inet 10.1.1.1 10.2.3.4
102 .Ed
103 .Pp
104 .\" To use the
105 .\" .Li 0.0.0.0
106 .\" feature to establish a tunnel from host1 to host3
107 .\" which will encapsulate and carry packets from host2, on host1 do:
108 .\" .Bd -literal -offset
109 .\" # ifconfig gif0 inet host1  127.0.0.2  # assign an address to gif0
110 .\" # gifconfig gif0 inet host1 0.0.0.0    # assign encapsulation addresses
111 .\" # route add host2 host3 -ifp gif0:     # encap host2 packets, send to host3
112 .\" .Ed
113 .\" .Pp
114 .\" Note: the
115 .\" .Fl ifp
116 .\" option to route does not work as documented in
117 .\" most versions of FreeBSD.
118 .\" .Pp
119 .\" On host3 do:
120 .\" .Bd -literal -offset
121 .\" # ifconfig gif0 inet host3  127.0.0.2  # assign an address to gif0
122 .\" # gifconfig gif0 inet host3 0.0.0.0    # assign encapsulation addresses
123 .\" .Ed
124 .\" .Pp
125 .\" Now if you ping host2 from host1, the packets should be encapsulated
126 .\" with outer source address = host1 and outer destination address = host3,
127 .\" and delivered to host3.
128 .\" host3 will decapsulate the packet and deliver it normally to host2.
129 .\" .Pp
130 This is also possible to use IPv6 as outer proto, by replacing
131 .Li inet
132 to
133 .Li inet6 ,
134 and IPv4 addresses to some appropriate IPv6 addresses in above example.
135 .Sh RETURN VALUES
136 The command exits with exit status of 1 on errors, 0 on success.
137 .Sh SEE ALSO
138 .Xr gif 4 ,
139 .Xr ifconfig 8
140 .Sh HISTORY
141 The
142 .Nm
143 command first appeared in WIDE Hydrangea IPv6 protocol stack kit.
144 .Pp
145 IPv6 and IPsec support based on the KAME Project (http://www.kame.net/) stack
146 was initially integrated into
147 .Fx 4.0