Gre tunnel operating principle, Protocols and standards, Configuring a gre over ipv4 tunnel – H3C Technologies H3C S12500-X Series Switches User Manual
Page 173: Displaying and maintaining udp helper, Udp helper configuration example

162
GRE tunnel operating principle
Figure 62 IPv6 networks interconnected through a GRE tunnel
As shown in
, an IPv6 protocol packet traverses an IPv4 network through a GRE tunnel as
follows:
1.
After receiving an IPv6 packet from the interface connected to IPv6 network 1, Device A looks up
the routing table to determine that the outgoing interface is a GRE tunnel interface (Tunnel 0 in this
example), and then submits the IPv6 packet to the tunnel interface Tunnel 0.
2.
Upon receiving the packet, the tunnel interface encapsulates the packet with GRE and then with
IPv4. In the IPv4 header, the source address is the tunnel's source address (the IP address of
interface Ethernet 1/1 of Device A in this example), and the destination address is the tunnel's
destination address (the IP address of interface Ethernet 1/1 of Device B in this example).
3.
Device A looks up the routing table according to the destination address in the IPv4 header, and
forwards the IPv4 packet out of the physical interface (Ethernet 1/1) of the GRE tunnel.
4.
When the IPv4 arrives at the GRE tunnel destination Device B, Device B checks the destination
address. Because the destination is Device B itself and the protocol number in the IP header is 47
(the protocol number for GRE), Device B submits the packet to GRE for de-encapsulation.
5.
GRE first removes the IPv4 header, and then checks the GRE key, checksum, and packet sequence
number. After GRE finishes the checking, it removes the GRE header, and submits the payload to
the IPv6 protocol for forwarding.
NOTE:
GRE encapsulation and de-encapsulation can decrease the forwarding efficiency of tunnel-end devices.
Protocols and standards
•
RFC 1701, Generic Routing Encapsulation (GRE)
•
RFC 1702, Generic Routing Encapsulation over IPv4 networks
•
RFC 2784, Generic Routing Encapsulation (GRE)
•
RFC 2890, Key and Sequence Number Extensions to GRE
Configuring a GRE over IPv4 tunnel
Follow these guidelines when you configure a GRE over IPv4 tunnel: