08 January 2011

Configuring a Site-to-Site GRE Tunnel

Generic routing encapsulation (GRE) is a tunneling protocol defined in RFC 1702 and RFC 2784. It was originally developed by Cisco Systems for creating a virtual point-to-point link to Cisco routers at remote points over an IP internetwork.

GRE supports multiprotocol tunneling. It can encapsulate multiple protocol packet types inside an IP tunnel. Adding an additional GRE header between the payload and the tunneling IP header provides the multiprotocol functionality. IP tunneling using GRE enables network expansion by connecting multiprotocol subnetworks across a single-protocol backbone environment. GRE also supports IP multicast tunneling. Routing protocols that are used across the tunnel enable dynamic exchange of routing information in the virtual network.



GRE encapsulates the entire original IP packet with a standard IP header and GRE header. A GRE tunnel header contains at least two 2-byte mandatory fields:

  • GRE flag
  • Protocol type


GRE uses a protocol type field in the GRE header to support the encapsulation of any OSI Layer 3 protocol. The GRE header, together with the tunneling IP header, creates at least 24 bytes of additional overhead for tunneled packets.




There are five steps to configuring a GRE tunnel:

Step 1. Creating a tunnel interface using the interface tunnel 0 command.

Step 2. Assigning the tunnel an IP address.

Step 3. Identifying the source tunnel interface using the tunnel source command.

Step 4. Identifying the destination of the tunnel using the tunnel destination command.

Step 5. Configuring which protocol GRE will encapsulate using the tunnel mode gre command.




The advantages of GRE are that it can be used to tunnel non-IP traffic over an IP network. Unlike IPsec, which only supports unicast traffic, GRE supports multicast and broadcast traffic over the tunnel link. Therefore, routing protocols are supported in GRE.

GRE does not provide encryption. If that is needed, IPsec should be configured.




biOos

No comments: