why do gre tunnels need their own IP ?

mattaumattau Member Posts: 218
hey, I was just wondering why gre tunnels need their own ip address. I struggle to visualize why this is needed

No where seems to explain why, I have read a few posts saying its there purely to tell the router through what interface to go through to reach the tunnel and thats it ?

do tunnel interfaces basically work like a funnel and happen before the routing decision ? for example if a packet comes into the router on interface A there is something in the routing table to tell it based on the destination address to use the tunnel interface ? then because its using the tunnel it grabs all the config settings that you configured the tunnel for then sends it out interface B with a new IP header ?

Thats how the routers know how to route the packet through the internet based on the source and destination tunnel addresses because these are normally public addresses?

its just weird how when you trace a destination that goes through the tunnel you only see the end tunnel address and nothing else like its directly connected when its not really.. lol

Even when I look in a packet sniffer I can only really see the inner and outer IP header addresses. not the actually tunnel IP itself.


_____________________________________
CCNP ROUTE - passed 20/3/12
CCNP SWITCH - passed 25/10/12
CCNP TSHOOT - passed 11/12/12




gre.jpg 79.8K

Comments

  • SharkDiverSharkDiver Member Posts: 844
    When you get into using a GRE tunnel to send IPv6 packets across an IPv4 network, it makes a little more sense.

    Using the drawing you have, imagine that the LAN to the far left is an IPv6 network and the LAN to the far right is an IPv6 network, and the network between the routers is an IPv4 network.

    In order to get packets from the IPv6 network on the left to the IPv6 network on the right, they will have to pass over the IPv4 network via a tunnel. The IPv6 routing table will have to have an IPv6 next-hop address at the other end of the tunnel so that it knows where to send the packet. That next-hop address will be the IPv6 address assigned to the tunnel.

    Long story short, I think the address needs to be on the tunnel so that the router knows where to send a packet. If the routing table has the other router's physical interface's IP address as the next-hop address, it knows to send the packet outside of the tunnel. If the routing table has the address of the tunnel on the other router, it knows to send it through the tunnel.
  • mattaumattau Member Posts: 218
    thankyou :) you really said that well "Long story short, I think the address needs to be on the tunnel so that the router knows where to send a packet. If the routing table has the other router's physical interface's IP address as the next-hop address, it knows to send the packet outside of the tunnel. If the routing table has the address of the tunnel on the other router, it knows to send it through the tunnel"

    made me grasp it alot better. it makes sense. I guess yea without it you cant direct packets though the tunnel so it all goes out without the gre headers. Also if there are no IP addresses on the tunnel no routes can be installed in the table directing traffic into the tunnel
    _____________________________________
    CCNP ROUTE - passed 20/3/12
    CCNP SWITCH - passed 25/10/12
    CCNP TSHOOT - passed 11/12/12




Sign In or Register to comment.