GRE Tunnel Key

This topic is to discuss the following lesson:

Hi Rene
How to change it to use second key instead the first key

Hello Lam

The choice of GRE key depends on the routing configured in each router.

There are two GRE tunnels between R1 and R2 with specific IP addresses. The default route within R1 and R2 indicates which should be the next-hop IP. This next-hop IP is also what specifies which tunnel should be used.

R1 has a default route to and R2 has a default route to so for all communication in both directions, Tunnel 1 should be used since tunnel 1 is on the subnet.

Without the GRE key, as you see in the lesson, either tunnel will be used. By putting in the GRE key, only tunnel 1 is used.

Now if you want to use Tunnel 2, you simply change the routing so that the default route of R1 points to and the default route of R2 points to Then traffic will use the other tunnel.

I hope this has been helpful!


HI Laz

Thank, I now has clearer understanding.


Tan lam soon

1 Like

Hi Laz,

I have two points to discuss:

  1. Does the use of tunnel key allow the transmission of multicast traffic over GRE tunnels?
  2. In a local Lab, I tried to build two GRE tunnels based on loopback interfaces. Bothe tunnels have same source and destination IPv4 address. First tunnel interface has an IPv6 address (the tunnel is supposed to carry IPv6 traffic), second tunnel interface has an IPv4 address (the tunnel is supposed to carry IPv4 traffic). The observed behaviour is that always the second tunnel to be configured is up, the second one is always down. e.g. if I first configure the IPv6 over IPv4 tunnel and then the IPv4 over IPv4 tunnel, then it’s the latter that works.

Is this behaviour expected?



Hello Alex

GRE tunnels by definition support multicast traffic. This is why GRE is often used to convey multicast traffic over a network that may natively not support it. This is useful also for routing protocols to function since they extensively use multicast to operate. The use of a tunnel key does not affect this support of multicast, so yes, you should be able to transmit multicast traffic over GRE tunnels that use a tunnel key.

As for the two GRE tunnels in your lab, there’s really no reason for only one tunnel to be functional at any time. I’m inclined to believe that the problem lies elsewhere. I suggest you start off by recreating the lab in the lesson, with two tunnels that support IPv4. Make sure you get both tunnels to work. Then, go on to changing one of the tunnels to support IPv6. The following lesson will help you to do that:

Check out the behaviour at this point and let us know how you come along. If you have trouble along the way, let us know so we can help you further.

I hope this has been helpful!