Benefits and drawbacks of GRE
Benefits:
- Tunneling: GRE tunnels efficiently encapsulate network layer protocols.
- WAN Connectivity: Ideal for secure connections over public networks.
- Tunneling Non-IP Traffic: Supports non-IP protocols.
- Routing Flexibility: Enables routing and forwarding of encapsulated packets.
- Protocol Agnostic: Suitable for various network protocols.
Drawbacks:
- Lack of Encryption: GRE lacks inherent encryption.
- Complex Configuration: Configuration can be intricate, especially with routing.
- Overhead: Adds 24 bytes to the packet header, leading to increased overhead.
- Limited Authentication: Offers limited authentication mechanisms.
- Scaling Challenges: May not be suitable for large or complex networks.
Generic Routing Encapsulation (GRE)
- RFC 2784: GRE is defined by RFC 2784.
- IP Protocol 47: GRE uses IP Protocol 47 for communication.
- 24 Bytes of Additional Header Information: GRE encapsulation adds 24 bytes to the original packet.
GRE Header Structure
- GRE Header (4 bytes): Contains essential GRE control information.
- Outer IP Header (20 bytes): Includes the IP header for routing.
- Underlay/NBMA/Routable/Public IP Address: GRE operates over an underlay or non-broadcast multi-access (NBMA) network and utilizes routable/public IP addresses.
Versatility
- Can Literally Encapsulate Just About Anything!: GRE is very versatile and can encapsulate a wide range of network layer protocols, including but not limited to:
- IPv4 and IPv6 traffic
- Multicast traffic
- CLNS (Connectionless Network Service)
- and more.
Stateless
- Stateless: GRE is a stateless protocol, meaning it doesn't maintain state information about the connection. It relies on the underlying network infrastructure for routing and forwarding.
GRE is a valuable tool for encapsulating and transporting various types of network traffic securely and efficiently, making it an important technology in network communication.