IPE(4) Device Drivers Manual IPE(4)

NAME

ipeInternet Encapsulation Protocol network device

SYNOPSIS

pseudo-device ipe

DESCRIPTION

The ipe driver provides IP tunnel construction using A Scheme for an Internet Encapsulation Protocol: Version 1 (RFC 1241).
ipe datagrams (IP protocol number 98 as per RFC 1700) are encapsulated into IP using a small encapsulation header. Different tunnels between the same endpoints are distinguished by a Flow Identifier in the header. This protocol according to the RFC only supports encapsulating IPv4 in IPv4, but the driver also supports IPv6.
A ipe interface can be created at runtime using the ifconfig ipeN create command or by setting up a hostname.if(5) configuration file for netstart(8).
The MTU is set to 1452 by default. This may not be an optimal value depending on the link between the two tunnel endpoints, but it can be adjusted via ifconfig(8).
For correct operation, the route to the tunnel destination must not go over the interface itself. This can be implemented by adding a distinct or a more specific route to the tunnel destination than the hosts or networks routed via the tunnel interface. Alternatively, the tunnel traffic may be configured in a separate routing table to the encapsulated traffic.
ipe interfaces support the following ioctl(2)s for configuring tunnel options:
SIOCSLIFPHYADDR struct if_laddrreq *
Set the addresses of the outer IP header. The addresses may only be configured while the interface is down.
SIOCGLIFPHYADDR struct if_laddrreq *
Get the addresses of the outer IP header.
SIOCDIFPHYADDR
Clear the outer IP header addresses. The addresses may only be cleared while the interface is down.
SIOCSVNETID struct ifreq *
Set a 32 bit virtual network identifier used as the Flow Identifier in the IP Encapsulation header. The virtual network identifier may only be configured while the interface is down.
SIOCGVNETID struct ifreq *
Get the virtual network identifer used as the Flow Identifier in the IP Encapsulation header.
SIOCSLIFPHYRTABLE struct ifreq *
Set the routing table the encapsulated IP packets operate within. The routing table may only be configured while the interface is down.
SIOCGLIFPHYRTABLE struct ifreq *
Get the routing table the encapsulated IP packets operate within.
SIOCSLIFPHYTTL struct ifreq *
Set the Time-To-Live field in IPv4 encapsulation headers, or the Hop Limit field in IPv6 encapsulation headers.
SIOCGLIFPHYTTL struct ifreq *
Get the value used in Time-To-Live field in a IPv4 encapsulation header or the Hop Limit field in a IPv6 encapsulation header.

EXAMPLES

Configuration example:
Host X --- Host A ----------- IP Encap ------------ Host D --- Host E 
              \                                      / 
               \                                    / 
                +------ Host B ------ Host C ------+
On Host A (OpenBSD):
# route add default B 
# ifconfig ipeN create 
# ifconfig ipeN tunnel A D 
# ifconfig ipeN A D netmask 255.255.255.255 
# route add E D
On Host D (OpenBSD):
# route add default C 
# ifconfig ipeN create 
# ifconfig ipeN tunnel D A 
# ifconfig ipeN D A netmask 255.255.255.255 
# route add D E
The Flow Identifier may be set using ifconfig(8) and the vnetid argument:
# ifconfig ipeN vnetid 128
The route domain used for the encapsulated traffic may be set using ifconfig(8) and the tunneldomain argument:
# ifconfig ipeN tunneldomain 1

SEE ALSO

inet(4), ip(4), netintro(4), options(4), hostname.if(5), protocols(5), ifconfig(8), netstart(8)

STANDARDS

R. Woodburn and D. Mills, A Scheme for an Internet Encapsulation Protocol: Version 1, RFC 1241, July 1991.
J. Reynolds and J. Postel, Assigned Numbers, RFC 1700, October 1994.

HISTORY

The ipe driver first appeared in OpenBSD 6.3.

AUTHORS

David Gwynne <dlg@openbsd.org>

CAVEATS

The ipe driver only handles data packets within the protocol, it does not implement support for error handling as described in the RFC.
January 23, 2018