44 CONFIGURING GRE
This chapter covers the following topics:
GRE Protocol Overview
Configuring GRE
Displaying and Debugging GRE
GRE Configuration Example
Troubleshooting GRE

GRE Protocol

Overview The Generic Routing Encapsulation (GRE) protocol encapsulates datagram of
network layer protocols, such as IP and IPX, and enables these encapsulated
datagrams to transmit in another network layer protocol, such as IP. GRE is a Layer
3 protocol that creates Virtual Private Network (VPN) tunnels. A tunnel is a virtual
point-to-point connection and is a virtual interface that only supports
point-to-point connections. It is necessary to encapsulate and de-encapsulate it
when a message is transmitted on the tunnel. The interface provides a channel
where the encapsulated datagram can be transmitted. The interface also
encapsulates and de-encapsulates the datagram at both ends of a tunnel.
Encapsulation As shown in Figure 198, after receiving an IPX datagram, the interface connecting
“Group1” first delivers it to be processed by the IPX protocol which checks the
destination address domain in the IPX header and determines how to route the
packet.
Figure 198 Typical networking diagram of GRE
If it is found that the destination address of the message will route through the
network with network number 1f (virtual network number of the tunnel), the
message will be transmitted to the tunnel port with network number 1f. After
receiving the packet, the tunnel port will perform GRE and then, the packet will be
processed by the IP module. After IP header is encapsulated, the packet will be
processed by the corresponding network interface according to the destination
address and router table.
De-encapsulation The de-encapsulation is the opposite of encapsulation. When an IP message is
received at a tunnel interface, its destination address is checked and if the router is
the destination, then the IP header is removed and processed by the GRE protocol,
IPX protocol
Group1 Internet IPX protocol
Group2
Tunnel
Router A Router B