Definition
GRE is a tunnelling protocol designed by Cisco that facilitates a secure tunnel for transmitting packets through a public network by encapsulating packets. In other words, it creates a point-to-point connection.
Examples of Generic Routing Encapsulation
- It is commonly used in Virtual private networks (VPN) to create private point-to-point connections.
History of Generic Routing Encapsulation
Cisco Systems designed the GRE protocol in 1994 to simplify the connection between different networks. Initially, it was stated in RFC 1701 and RFC 1702, describing how to encapsulate various protocols. Later, RFC 2784 streamlined the GRE’s header structure and made it more effective.
RFC 2890 includes optional fields such as checksum, key, and sequence number in the GRE header. Today, GRE is widespread and has many use cases, such as mobility protocols, multicast routing, and VPNs.
Benefits of Generic Routing Encapsulation
- GRE encapsulates various network layer protocols within virtual point-to-point connections over IP networks.
- GRE preserves the original IP header, allowing intermediate routers to handle packets without inspection.
- Intermediate routers don’t require extra hardware or software for GRE, making it lightweight.
- GRE tunnels can transmit traffic between IPv4 or IPv6 networks.
- Cloud-based VPNs can connect to on-premises networks via GRE tunnels, offering enhanced security.
- GRE and IPsec are commonly combined to create a secure tunnel between networks. IPsec encrypts data within GRE to prevent eavesdropping.
Drawbacks of Generic Routing Encapsulation
- GRE is not an open standard like other protocols such as IPsec.
- Some routers do not support GRE.
- It can be difficult to diagnose packets and headers because GRE tunnels isolate them.
- Delays are likely because of the encapsulation and decapsulation processes at both ends.
- GRE tunnels are susceptible to attacks that cause denial of service (DoS).
Generic Routing Encapsulation Use Cases
Examples of how GRE is used include:
- Linking networks that use different protocols, such as IPv4 and IPv6.
- Designing VPNs that bypass network address translation (NAT) systems and firewalls.
- Facilitating broadcast and multicast traffic across unicast-supported networks.
- Transporting routing data across domains and protocols.