Gre tunnel operating principle, Protocols and standards – H3C Technologies H3C S5560 Series Switches User Manual
Page 249

234
GRE tunnel operating principle
Figure 94 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 processes
the packet as follows:
a.
Looks up the routing table to identify the outgoing interface for the IPv6 packet.
b.
Submits the IPv6 packet to the outgoing interface—the GRE 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).
{
The destination address is the tunnel's destination address (the IP address of interface Ethernet
1/1 of Device B).
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 processes the packet. After GRE finishes processing,
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