2 .\" $KAME: gifconfig.8,v 1.6 2000/11/22 11:10:09 itojun Exp $
4 .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
5 .\" All rights reserved.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
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.
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
36 .Nd configure generic IP tunnel
42 .Op Ar physsrc physdest
50 configures the physical address for the generic IP tunnel
51 inteface, such as "gif0".
56 are interpreted as the outer source/destination address for
57 encapsulating IPv4/v6 header.
60 specifies the address family for
69 and will be treated as
77 just deletes the existing source and destination addresses on
79 If no outer addresses are specified, this usage has no effect.
82 takes the following optional argument:
85 Display information associated with all
90 Please note that it is very easy to create infinite routing loop,
91 when you configure tunnel over same address family
92 (e.g. IPv4-over-IPv4).
96 interface is created at runtime using interface cloning.
98 most easily done with the
102 .Va gifconfig_ Ns Aq Ar interface
106 If you would like to configure IPv6 over IPv4
112 you should perform the following command:
114 # gifconfig gif0 inet 10.1.1.1 10.2.3.4
119 .\" feature to establish a tunnel from host1 to host3
120 .\" which will encapsulate and carry packets from host2, on host1 do:
121 .\" .Bd -literal -offset
122 .\" # ifconfig gif0 inet host1 127.0.0.2 # assign an address to gif0
123 .\" # gifconfig gif0 inet host1 0.0.0.0 # assign encapsulation addresses
124 .\" # route add host2 host3 -ifp gif0: # encap host2 packets, send to host3
129 .\" option to route does not work as documented in
130 .\" most versions of FreeBSD.
133 .\" .Bd -literal -offset
134 .\" # ifconfig gif0 inet host3 127.0.0.2 # assign an address to gif0
135 .\" # gifconfig gif0 inet host3 0.0.0.0 # assign encapsulation addresses
138 .\" Now if you ping host2 from host1, the packets should be encapsulated
139 .\" with outer source address = host1 and outer destination address = host3,
140 .\" and delivered to host3.
141 .\" host3 will decapsulate the packet and deliver it normally to host2.
143 This is also possible to use IPv6 as outer proto, by replacing
147 and IPv4 addresses to some appropriate IPv6 addresses in above example.
149 The command exits with exit status of 1 on errors, 0 on success.
156 command first appeared in WIDE Hydrangea IPv6 protocol stack kit.
158 IPv6 and IPsec support based on the KAME Project (http://www.kame.net/) stack
159 was initially integrated into