1*4f351863Sjmc.\" $OpenBSD: gif.4,v 1.33 2018/07/11 06:16:50 jmc Exp $ 2f0658980Sitojun.\" $KAME: gif.4,v 1.15 2000/04/19 09:39:42 itojun Exp $ 300692fe1Sitojun.\" 400692fe1Sitojun.\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 500692fe1Sitojun.\" All rights reserved. 600692fe1Sitojun.\" 700692fe1Sitojun.\" Redistribution and use in source and binary forms, with or without 800692fe1Sitojun.\" modification, are permitted provided that the following conditions 900692fe1Sitojun.\" are met: 1000692fe1Sitojun.\" 1. Redistributions of source code must retain the above copyright 1100692fe1Sitojun.\" notice, this list of conditions and the following disclaimer. 1200692fe1Sitojun.\" 2. Redistributions in binary form must reproduce the above copyright 1300692fe1Sitojun.\" notice, this list of conditions and the following disclaimer in the 1400692fe1Sitojun.\" documentation and/or other materials provided with the distribution. 1500692fe1Sitojun.\" 3. Neither the name of the project nor the names of its contributors 1600692fe1Sitojun.\" may be used to endorse or promote products derived from this software 1700692fe1Sitojun.\" without specific prior written permission. 1800692fe1Sitojun.\" 1900692fe1Sitojun.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 2000692fe1Sitojun.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2100692fe1Sitojun.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2200692fe1Sitojun.\" ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 2300692fe1Sitojun.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2400692fe1Sitojun.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2500692fe1Sitojun.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2600692fe1Sitojun.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2700692fe1Sitojun.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2800692fe1Sitojun.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2900692fe1Sitojun.\" SUCH DAMAGE. 3000692fe1Sitojun.\" 31*4f351863Sjmc.Dd $Mdocdate: July 11 2018 $ 3200692fe1Sitojun.Dt GIF 4 3300692fe1Sitojun.Os 3400692fe1Sitojun.Sh NAME 3500692fe1Sitojun.Nm gif 36efffa220Saaron.Nd generic tunnel interface 3700692fe1Sitojun.Sh SYNOPSIS 3833a4e0ffSjmc.Cd "pseudo-device gif" 3900692fe1Sitojun.Sh DESCRIPTION 4000692fe1SitojunThe 4100692fe1Sitojun.Nm 42c4c539b2Sdlginterface is a generic tunnelling pseudo-device. 43c4c539b2SdlgIt can tunnel IPv4, IPv6, and MPLS over IPv4 and IPv6, 44c4c539b2Sdlgwith behavior mainly based on RFC 4213 IPv6-over-IPv4. 4500692fe1Sitojun.Pp 46c0efddabSmarkusA 47c0efddabSmarkus.Nm 48c0efddabSmarkusinterface can be created at runtime using the 495668a55dSjaredy.Ic ifconfig gif Ns Ar N Ic create 50c0efddabSmarkuscommand or by setting up a 51c0efddabSmarkus.Xr hostname.if 5 52c0efddabSmarkusconfiguration file for 53c0efddabSmarkus.Xr netstart 8 . 54c0efddabSmarkus.Pp 559127b62dSsthenThe 5642477250Sderaadt.Nm 5742477250Sderaadtinterface must be configured with the 5842477250Sderaadtaddresses used for the outer header. 5900692fe1SitojunThis can be done by using 60bf1c21e6Sschwarze.Xr ifconfig 8 Ns 's 6142477250Sderaadt.Ic tunnel 6242477250Sderaadtcommand (which uses the 63d4d91f39Smpi.Dv SIOCSLIFPHYADDR 6442477250Sderaadtioctl). 6572cc6a9cSjmc.Pp 669127b62dSsthenThe addresses of the inner header must be configured by using 6742477250Sderaadt.Xr ifconfig 8 6842477250Sderaadtin the normal way. 6972cc6a9cSjmcThe routing table can be used to direct packets toward the 7000692fe1Sitojun.Nm 7100692fe1Sitojuninterface. 7200692fe1Sitojun.Sh SEE ALSO 73aaeccf36Sderaadt.Xr sysctl 2 , 749127b62dSsthen.Xr etherip 4 , 75c4c539b2Sdlg.Xr gre 4 , 7600692fe1Sitojun.Xr inet 4 , 7700692fe1Sitojun.Xr inet6 4 , 783900f002Sjmc.Xr ipsec 4 , 7977e58ecaSjmc.Xr hostname.if 5 , 8077e58ecaSjmc.Xr ifconfig 8 , 8177e58ecaSjmc.Xr netstart 8 8204152b69Sjmc.Sh STANDARDS 830cb51245Sitojun.Rs 84e34e488cSjmc.%A E. Nordmark 85e34e488cSjmc.%A R. Gilligan 86e34e488cSjmc.%D October 2005 87e34e488cSjmc.%R RFC 4213 88e34e488cSjmc.%T Basic Transition Mechanisms for IPv6 Hosts and Routers 8972cc6a9cSjmc.Re 90c4c539b2Sdlg.Pp 91c4c539b2Sdlg.Rs 92c4c539b2Sdlg.%A T. Worster 93c4c539b2Sdlg.%A Y. Rekhter 94c4c539b2Sdlg.%A E. Rosen 95c4c539b2Sdlg.%D March 2005 96c4c539b2Sdlg.%R RFC 4023 97c4c539b2Sdlg.%T Encapsulating MPLS in IP or Generic Routing Encapsulation (GRE) 98c4c539b2Sdlg.Re 9900692fe1Sitojun.Sh HISTORY 10000692fe1SitojunThe 10100692fe1Sitojun.Nm 10200692fe1Sitojundevice first appeared in WIDE hydrangea IPv6 kit. 1039127b62dSsthen.Pp 1049127b62dSsthenPreviously, 1059127b62dSsthen.Nm 1069127b62dSsthensupported RFC 3378 EtherIP tunnels over 1079127b62dSsthen.Xr bridge 4 1089127b62dSstheninterfaces. 1099127b62dSsthenThis is now handled by 1109127b62dSsthen.Xr etherip 4 . 1110cb51245Sitojun.Sh BUGS 1120cb51245SitojunThere are many tunnelling protocol specifications, 1130cb51245Sitojundefined differently from each other. 1140cb51245Sitojun.Nm 1150cb51245Sitojunmay not interoperate with peers which are based on different specifications, 1160cb51245Sitojunand are picky about outer header fields. 1170cb51245SitojunFor example, you cannot usually use 1180cb51245Sitojun.Nm 1190cb51245Sitojunto talk with IPsec devices that use IPsec tunnel mode. 1200cb51245Sitojun.Pp 1210cb51245SitojunThe current code does not check if the ingress address 1220cb51245Sitojun.Pq outer source address 1230cb51245Sitojunconfigured to 1240cb51245Sitojun.Nm 1250cb51245Sitojunmakes sense. 1260cb51245SitojunMake sure to configure an address which belongs to your node. 1270cb51245SitojunOtherwise, your node will not be able to receive packets from the peer, 1280cb51245Sitojunand your node will generate packets with a spoofed source address. 1290cb51245Sitojun.Pp 1300cb51245SitojunIf the outer protocol is IPv6, path MTU discovery for encapsulated packet 1310cb51245Sitojunmay affect communication over the interface. 132