Main index | Section 4 | Options |
Each gif interface is created at runtime using interface cloning. This is most easily done with the "ifconfig" command or using the ifconfig_<interface> variable in rc.conf(5).
To use gif, the administrator needs to configure the protocol and addresses used for the outer header. This can be done by using ifconfig(8) tunnel, or SIOCSIFPHYADDR ioctl. The administrator also needs to configure the protocol and addresses for the inner header, with ifconfig(8). Note that IPv6 link-local addresses (those that start with fe80::) will be automatically configured whenever possible. You may need to remove IPv6 link-local addresses manually using ifconfig(8), if you want to disable the use of IPv6 as the inner header (for example, if you need a pure IPv4-over-IPv6 tunnel). Finally, you must modify the routing table to route the packets through the gif interface.
The gif device can be configured to be ECN friendly. This can be configured by IFF_LINK1.
Without IFF_LINK1, gif will show normal behavior, as described in RFC2893. This can be summarized as follows:
Ingress | |
Set outer TOS bit to 0. | |
Egress | Drop outer TOS bit. |
With IFF_LINK1, gif will copy ECN bits ( 0x02 and 0x01 on IPv4 TOS byte or IPv6 traffic class byte) on egress and ingress, as follows:
Ingress | |
Copy TOS bits except for ECN CE (masked with 0xfe) from inner to outer. Set ECN CE bit to 0. | |
Egress | Use inner TOS bits with some change. If outer ECN CE bit is 1, enable ECN CE bit on the inner. |
Note that the ECN friendly behavior violates RFC2893. This should be used in mutual agreement with the peer.
RFC2893, Transition Mechanisms for IPv6 Hosts and Routers, August 2000.
, ,draft-ietf-ipsec-ecn-02.txt, IPsec Interactions with ECN, December 1999.
, , ,If the outer protocol is IPv4, gif does not try to perform path MTU discovery for the encapsulated packet (DF bit is set to 0).
If the outer protocol is IPv6, path MTU discovery for encapsulated packets may affect communication over the interface. The first bigger-than-pmtu packet may be lost. To avoid the problem, you may want to set the interface MTU for gif to 1240 or smaller, when the outer header is IPv6 and the inner header is IPv4.
The gif device does not translate ICMP messages for the outer header into the inner header.
In the past, gif had a multi-destination behavior, configurable via IFF_LINK0 flag. The behavior is obsolete and is no longer supported.
GIF (4) | October 21, 2018 |
Main index | Section 4 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | You have successfully logged in, Now press any key to log out | ” |