NetBSD/share/man/man4/etherip.4

172 lines
6.8 KiB
Groff

.\" $NetBSD: etherip.4,v 1.7 2008/05/04 19:43:05 martin Exp $
.\"
.\" Copyright (c) 2006, Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>.
.\" 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. Neither the name of Hans Rosenfeld nor the names of his contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``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 PROJECT OR CONTRIBUTORS 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.
.\"
.\"
.\" Copyright (c) 2004, 2005 The NetBSD Foundation.
.\" 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.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``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 FOUNDATION OR CONTRIBUTORS
.\" 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.
.\"
.\"
.\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
.\" 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. Neither the name of the project nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``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 PROJECT OR CONTRIBUTORS 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 November 23, 2006
.Dt ETHERIP 4
.Os
.Sh NAME
.Nm etherip
.Nd EtherIP tunneling device
.Sh SYNOPSIS
.Cd "pseudo-device etherip"
.Sh DESCRIPTION
The
.Nm
interface is a tunneling pseudo device for Ethernet frames.
It can tunnel Ethernet traffic over IPv4 and IPv6 using the EtherIP
protocol specified in RFC 3378.
.Pp
The only difference between an
.Nm
interface and a real Ethernet interface is that there is an IP tunnel
instead of a wire.
Therefore, to use
.Nm
the administrator must first create the interface and then configure
protocol and addresses used for the outer header.
This can be done by using
.Xr ifconfig 8
.Cm create
and
.Cm tunnel
subcommands, or
.Dv SIOCIFCREATE
and
.Dv SIOCSLIFPHYADDR
ioctls.
.Ss Packet format
Ethernet frames are prepended with a EtherIP header as described by
RFC 3378.
The resulting EtherIP packets will be encapsulated in an
outer packet, which may be either an IPv4 or IPv6 packet, with IP
protocol number 97.
.Ss Ethernet address
When a
.Nm
device is created, it is assigned an Ethernet address
of the form f2:0b:a5:xx:xx:xx.
This address can later be changed through a sysctl node.
.Pp
The sysctl node is net.link.etherip.\*[Lt]iface\*[Gt].
Any string of six colon-separated hexadecimal numbers will be accepted.
Reading that node will provide a string representation of the current
Ethernet address.
.Ss Security
The EtherIP header of incoming packets is not checked for
validity.
This is because there seems to be some confusion about how
such a header has to look like.
For outgoing packets, the header is set up the same way as done in
.Ox ,
.Fx ,
and Linux to be compatible with those systems.
.Ss Converting from previous implementation
A tunnel configured for the previous (undocumented) implementation
will work with just renaming the device from gif to
.Nm .
.Sh SEE ALSO
.Xr bridge 4 ,
.Xr gif 4 ,
.Xr inet 4 ,
.Xr inet6 4 ,
.Xr tap 4 ,
.Xr ifconfig 8
.\"
.Sh HISTORY
The
.Nm
device first appeared in
.Nx 4.0 ,
it is based on
.Xr tap 4 ,
.Xr gif 4 ,
and the former gif-based EtherIP implementation ported from
.Ox .
.\"
.Sh BUGS
Probably many.
There is lots of code duplication between
.Nm ,
.Xr tap 4 ,
.Xr gif 4 ,
and probably other tunnelling drivers which should be cleaned up.