man: ip link: document GRE tunnels

GRE tunnels are currently only documented together with IPIP and SIT
tunnels, but they actually have very different configuration
options. Let's separate them.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
Sabrina Dubroca 2018-04-20 10:31:59 +02:00 committed by David Ahern
parent 0d93d1e736
commit d21c028cf7
1 changed files with 148 additions and 4 deletions

View File

@ -693,13 +693,13 @@ tunnel.
.in -8 .in -8
.TP .TP
GRE, IPIP, SIT Type Support IPIP, SIT Type Support
For a link of types For a link of type
.I GRE/IPIP/SIT .IR IPIP or SIT
the following additional arguments are supported: the following additional arguments are supported:
.BI "ip link add " DEVICE .BI "ip link add " DEVICE
.BR type " { " gre " | " ipip " | " sit " }" .BR type " { " ipip " | " sit " }"
.BI " remote " ADDR " local " ADDR .BI " remote " ADDR " local " ADDR
[ [
.BR encap " { " fou " | " gue " | " none " }" .BR encap " { " fou " | " gue " | " none " }"
@ -764,6 +764,150 @@ IPv6-Over-IPv4 is not supported for IPIP.
- make this tunnel externally controlled - make this tunnel externally controlled
.RB "(e.g. " "ip route encap" ). .RB "(e.g. " "ip route encap" ).
.in -8
.TP
GRE Type Support
For a link of type
.IR GRE " or " GRETAP
the following additional arguments are supported:
.BI "ip link add " DEVICE
.BR type " { " gre " | " gretap " }"
.BI " remote " ADDR " local " ADDR
[
.RB [ i | o ] seq
] [
.RB [ i | o ] key
.I KEY
] [
.RB [ i | o ] csum
] [
.BI ttl " TTL "
] [
.BI tos " TOS "
] [
.RB [ no ] pmtudisc
] [
.RB [ no ] ignore-df
] [
.BI dev " PHYS_DEV "
] [
.BR encap " { " fou " | " gue " | " none " }"
] [
.BR encap-sport " { " \fIPORT " | " auto " }"
] [
.BI "encap-dport " PORT
] [
.RB [ no ] encap-csum
] [
.RB [ no ] encap-remcsum
] [
.BR external
]
.in +8
.sp
.BI remote " ADDR "
- specifies the remote address of the tunnel.
.sp
.BI local " ADDR "
- specifies the fixed local address for tunneled packets.
It must be an address on another interface on this host.
.sp
.RB [ i | o ] seq
- serialize packets.
The
.B oseq
flag enables sequencing of outgoing packets.
The
.B iseq
flag requires that all input packets are serialized.
.sp
.RB [ i | o ] key
.I KEY
- use keyed GRE with key
.IR KEY ". "KEY
is either a number or an IPv4 address-like dotted quad.
The
.B key
parameter specifies the same key to use in both directions.
The
.BR ikey " and " okey
parameters specify different keys for input and output.
.sp
.RB [ i | o ] csum
- generate/require checksums for tunneled packets.
The
.B ocsum
flag calculates checksums for outgoing packets.
The
.B icsum
flag requires that all input packets have the correct
checksum. The
.B csum
flag is equivalent to the combination
.B "icsum ocsum" .
.sp
.BI ttl " TTL"
- specifies the TTL value to use in outgoing packets.
.sp
.BI tos " TOS"
- specifies the TOS value to use in outgoing packets.
.sp
.RB [ no ] pmtudisc
- enables/disables Path MTU Discovery on this tunnel.
It is enabled by default. Note that a fixed ttl is incompatible
with this option: tunneling with a fixed ttl always makes pmtu
discovery.
.sp
.RB [ no ] ignore-df
- enables/disables IPv4 DF suppression on this tunnel.
Normally datagrams that exceed the MTU will be fragmented; the presence
of the DF flag inhibits this, resulting instead in an ICMP Unreachable
(Fragmentation Required) message. Enabling this attribute casues the
DF flag to be ignored.
.sp
.BI dev " PHYS_DEV"
- specifies the physical device to use for tunnel endpoint communication.
.sp
.BR encap " { " fou " | " gue " | " none " }"
- specifies type of secondary UDP encapsulation. "fou" indicates
Foo-Over-UDP, "gue" indicates Generic UDP Encapsulation.
.sp
.BR encap-sport " { " \fIPORT " | " auto " }"
- specifies the source port in UDP encapsulation.
.IR PORT
indicates the port by number, "auto"
indicates that the port number should be chosen automatically
(the kernel picks a flow based on the flow hash of the
encapsulated packet).
.sp
.RB [ no ] encap-csum
- specifies if UDP checksums are enabled in the secondary
encapsulation.
.sp
.RB [ no ] encap-remcsum
- specifies if Remote Checksum Offload is enabled. This is only
applicable for Generic UDP Encapsulation.
.sp
.BR external
- make this tunnel externally controlled
.RB "(e.g. " "ip route encap" ).
.in -8 .in -8
.TP .TP