Tech Notes

Networking: GRE and IPSec Tunnels

GRE tunnel use-cases:

  • Route multicast traffic on non-supported transport(IPSec/Internet)
  • Route IPv6 traffic on IPv4 underlay

GRE tunnels:

Main components:

  • Passenger protocol: the data which will be encapsulated
  • Carrier protocol: GRE(4 bytes)
  • Transport Protocol: The routable protocol which will carry the passenger protocol to other side

GRE Packet: (transport protocol+GRE header)(encapsulate(Original Payload + passenger protocol)

Configuration:

See below scenario:

R1:
interface Tunnel100
tunnel mode gre
ip address 102.1.1.1 255.255.255.0
ipv6 enable                     
tunnel source Loopback0           
tunnel destination 2.2.2.2

R2:
interface Tunnel100
tunnel mode gre
ip address 102.1.1.2 255.255.255.0
ipv6 enable                     
tunnel source Loopback0           
tunnel destination 1.1.1.1

Please note that 1.1.1.1 and 2.2.2.2 should be reachable from each other router.

A ping between 2 PCs:

Recursive Routing:

Recursive routing could happen when the tunnel destination is routed and learned through the tunnel itself, resulting in recursive routing.

https://packetpushers.net/blog/anatomy-of-gre-tunnels/


Posted

in

by

Tags: