1

Please consider the attached image below: A GRE tunnel is set up between R1 and R4. Tunnel source is R1 interface having the IP address 172.16.0.1/16

Tunnel destination is R4 interface having the IP address 192.16.0.2/16

There is IGP reachabilty between 172.16.0.0/16and 192.16.0.0/16 network. Hence we bring up the tunnel as below.

On R1

R1(config)#interface tunnel 1   
R1(config-if)#tunnel source 172.16.0.1
R1(config-if)#tunnel destination 192.16.0.2
R1(config-if)#ip address 8.8.8.1 255.0.0.0

On R4

R4(config)#interface tunnel 1   
R4(config-if)#tunnel source 192.16.0.2
R4(config-if)#tunnel destination 172.16.0.1
R4(config-if)#ip address 8.8.8.2 255.0.0.0

Objective is to ping 4.4.4.4 with Source as 1.1.1.1

Q1: When the packet is encapsulated, how will it look like? Please explain in terms of Outer source IP address, Outer Destination IP address, Inner Source IP address, Inner destination IP address, GRE header etc.

A: Outer Source IP address: 8.8.8.1

Outer Dest IP address: 8.8.8.2

Inner Src IP address: 1.1.1.1

Inner Dest IP address: 4.4.4.4

Q2: Since R2 and R3 DO NOT have knowledge of tunnel, how will they see when the packet comes to them? What Source and destination IP address will they see? Why would they not drop the packet?

A: R2 and R3 are unaware of the tunnel. Hence they have no knowledge of the 8.0.0.0 subnet. So when the packet comes to R2, it will ONLY see the TUNNEL DESTINATION, e.g. 192.16.0.2, but what about the Src IP address? My confusion here is, will the original packet be tweaked? What happens to Outer Src IP address and Outer Dest IP address at this point?

Q3: The most common advantage of GRE tunnel(they say) is support for multicast (thereby we can run routing protocols over the tunnel as routing protocols require multicast. Is that the only advantage?

A: I guess this is the major advantage

Q4: To bring up the tunnel itself, we need to ensure that the Tunnel Source and destination are reachable (say via IGP), then how is it different from Q3? I mean, to bring the tunnel itself, we need the IGP reachabilty (which would also require multicast).

A:I am not sure of this.

enter image description here

I have updated the post with my own answer. Please correct me if wrong.

  • 2
    this sounds like a homework question... – JFL Jan 9 '17 at 8:56
  • i built this on my own to clarify my understanding..not a homework question...read the concept on a few blogs but nowhere did i find the working example showing outer and inner header...pardon my ignorance – fsociety Jan 9 '17 at 9:05
  • For Q1 and Q2, you could start by looking at the real thing, e.g. here: packetlife.net/captures/protocol/gre. Also, trying to set it up, on real hardware or on a simulator, would improve you understanding. – Gerben Jan 9 '17 at 9:40
  • 1
    @fsociety To help your understanding, you should attempt to figure this out on your own, and then we can help you with specific problems. But to start, your tunnel source and destination need to be reachable addresses -- that's not the case in your example. – Ron Trunk Jan 9 '17 at 12:25
  • 1
    Imagine building a bridge across a river. The river is R2 and R3. The riverbank is the edges of the river, the interfaces of R1 and R4 (note that you have duplicated addresses in your diagram: R2-R3 and R3-R4). You put your bridge (tunnel endpoints) on the banks of the river. – Ron Trunk Jan 9 '17 at 12:41
2

Q1:

Inner Source: 1.1.1.1
Inner Dest: 4.4.4.4
Outer source: 172.16.0.1
Outer Dest: 192.16.0.2

Q2: The source address is the tunnel source, 172.16.0.1 (for R1-R4 traffic). The inner and outer addresses are not modified.

Q3: That is only one advantage. There are many uses. Generally, you use a tunnel whenever you need to hide the underlying infrastructure. or when you can't route over it directly.

Q4: The tunnel "hides" the underlying topology.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.