summaryrefslogtreecommitdiff
path: root/share/man
diff options
context:
space:
mode:
Diffstat (limited to 'share/man')
-rw-r--r--share/man/man4/gre.489
1 files changed, 42 insertions, 47 deletions
diff --git a/share/man/man4/gre.4 b/share/man/man4/gre.4
index d0d7c144f2a..5210c3ab889 100644
--- a/share/man/man4/gre.4
+++ b/share/man/man4/gre.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: gre.4,v 1.1 2000/01/07 22:28:03 angelos Exp $
+.\" $OpenBSD: gre.4,v 1.2 2000/01/08 02:12:47 angelos Exp $
.\" $NetBSD: gre.4,v 1.10 1999/12/22 14:55:49 kleink Exp $
.\"
.\" Copyright 1998 (c) The NetBSD Foundation, Inc.
@@ -47,9 +47,9 @@
.Tn GRE
and
.Tn MobileIP
-is enabled with the following
+are enabled with the following
.Xr sysctl 3
-variables in
+variables respectively in
.Pa /etc/sysctl.conf :
.Bl -tag -width xxxxxxxxxxxxxxxxxxxxx
.It net.inet.gre.allow
@@ -61,38 +61,37 @@ Allow MobileIP packets in and out of the system.
.Sh DESCRIPTION
The
.Nm gre
-network interface is a pseudo device that allows to encapsulate datagrams
-into IP. These encapsulated datagrams are routed to a destination host,
-where they are decapsulated and further routed to their final destination.
-The so called ``tunnel'' appears to the inner datagrams like one hop.
+network interface allows tunnel construction using the Cisco GRE or
+the Mobile-IP (RFC 2004) encapsulation protocols.
.Pp
This driver currently supports the following modes of operation:
.Bl -tag -width abc
.It GRE encapsulation (IP protocol number 47).
-Encapsulated datagrams are
-prepended by a outer datagram and a GRE header. The GRE header specifies
-the type of the encapsulated datagram and thus allows for tunneling other
-protocols than IP like e.g. AppleTalk (not yet supported). GRE mode is
-also the default tunnel mode on Cisco routers. This is also the default
-mode of operation of the
+Encapsulated datagrams are prepended by a outer datagram and a GRE header.
+The GRE header specifies the type of the encapsulated datagram
+and thus allows for tunneling other protocols than IP like
+e.g. AppleTalk (not yet supported).
+GRE mode is the default tunnel mode on Cisco routers.
+This is also the default mode of operation of the
.Sy gre Ns Ar X
interfaces.
.It MOBILE encapsulation (IP protocol number 55).
-Datagrams are
-encapsulated into IP, but with a shorter encapsulation. The original
-IP header is modified and the modifications are inserted between the
-so modified header and the original payload. Like IPIP only for IP in IP
-encapsulation.
+Datagrams are encapsulated into IP, but with a much smaller
+encapsulation header.
+This protocol only supports IP in IP encapsulation, and is intended
+for use with mobile IP.
.El
.Pp
The network interfaces are named
.Sy gre Ns Ar 0 ,
-.Sy gre Ns Ar 1
-and so on, as many as have given on the
+.Sy gre Ns Ar 1 ,
+etc.
+The number of interfaces is given by the corresponding
.Sy pseudo-device
-line in the system config file. Each interface supports a number of
-.Xr ioctl 2 Ns s,
-such as:
+line in the system config file.
+.Xr gre 4
+interfaces support the following
+.Xr ioctl 2 Ns s :
.Bl -tag -width aaa
.It GRESADDRS:
Set the IP address of the local tunnel end.
@@ -103,10 +102,9 @@ Query the IP address that is set for the local tunnel end.
.It GREGADDRD:
Query the IP address that is set for the remote tunnel end.
.It GRESPROTO:
-Set the operation mode to the specified IP protocol value. The
-protocol is passed to the interface in (struct ifreq)->ifr_flags.
-The operation mode can also
-be given as
+Set the operation mode to the specified IP protocol value.
+The protocol is passed to the interface in (struct ifreq)->ifr_flags.
+The operation mode can also be given as
.Bl -tag -width bbb
.It link0
IPPROTO_GRE
@@ -117,7 +115,7 @@ IPPROTO_MOBILE
to
.Xr ifconfig 8 .
As the linkN flags are not mutually exclusive, modes must be set by applying
-positive and negative flags as e.g.
+positive and negative flags, e.g.,
.Xr ifconfig 8
link0 -link1 -link2
.It GREGPROTO:
@@ -141,7 +139,7 @@ Host X-- Host A ----------------tunnel---------- cisco D------Host E
+------Host B----------Host C----------+
.Ed
- On host A (NetBSD):
+ On host A (OpenBSD):
# route add default B
# ifconfig greN A D netmask 0xffffffff linkX up
@@ -160,15 +158,13 @@ Host X-- Host A ----------------tunnel---------- cisco D------Host E
OR
- On Host D (NetBSD):
+ On Host D (OpenBSD):
# route add default C
# ifconfig greN D A
.Pp
-If all goes well, you should see packets flowing ;-)
-.Pp
-If you want to reach Host A over the tunnel (from the Cisco D), then
-you have to have an alias on Host A for e.g. the Ethernet interface like:
+To reach Host A over the tunnel (from host D), there has to be an
+alias on Host A for the ethernet interface:
ifconfig <etherif> alias Y
and on the cisco
ip route Y mask tunnelX
@@ -177,16 +173,16 @@ For correct operation, the
.Nm
device needs a route to the destination, that is less specific than the
one over the tunnel.
-(Basically, there needs to be a route to the decapsulating host that
-does not run over the tunnel, as this would be a loop ..)
+(There needs to be a route to the decapsulating host that
+does not run over the tunnel, as this would create a loop.)
.Pp
-In order to
+In order for
.Xr ifconfig 8
to actually mark the interface as up, the keyword ``up'' must be given
last on its command line.
.Pp
-The kernel must be set to forward datagrams by either option
-``GATEWAY'' in the kernel config file or by issuing the appropriate
+The kernel must be set to forward datagrams by including option
+``GATEWAY'' in the kernel config file and issuing the appropriate
option to
.Xr sysctl 8 .
.Sh SEE ALSO
@@ -204,20 +200,19 @@ A description of GRE encapsulation can be found in RFC 1701, RFC 1702.
.Pp
A description of MOBILE encapsulation can be found in RFC 2004.
.Sh BUGS
-The compute_route() code in if_gre.c toggles the last bit of the
+The compute_route() code in net/if_gre.c toggles the last bit of the
IP-address to provoke the search for a less specific route than the
-one directly over the tunnel to prevent loops. This is possibly not
-the best solution.
+one directly over the tunnel to prevent loops.
+This is possibly not the best solution.
.Pp
To avoid the address munging described above, turn on the link1 flag
-on the ifconfig command line. This implies that the GRE packet
-destination (set via greconfig -d) and the ifconfig remote host are
-not the same IP addresses, and that the GRE destination does not route
-over the greX interface itself.
+on the ifconfig command line.
+This implies that the GRE packet destination (set via greconfig -d)
+and the ifconfig remote host are not the same IP addresses, and that
+the GRE destination does not route over the greX interface itself.
.Pp
GRE RFC not yet fully implemented (no GRE options), no other protocols
yet than IP over IP.
-
.Pp
.Sh AUTHOR
Heiko W.Rupp <hwr@pilhuhn.de>