Search This Blog

2015-07-12

GRE Tunnel Config

Steps to create a GRE Tunnel



Local Subnet 1: 10.2.1.0/24
Local Subnet 2: 10.1.1.0/24
Public Subnet: 41.95.109.0/24

On Local subnet 2 side create a tunnel interface:

interface tunnel 0
ip address 10.5.1.2 255.255.255.0


Tie this interface to the physical interface in which it should be bound to:

tunnel source serial 0/0

Which is the IP address of 41.95.109.2/24

Then we need to set the tunnel destination to be

tunnel destination 41.96.109.1

This is the other side of the public IP connection

Set the tunnel mode to be gre

tunnel mode gre ip


On Local subnet 1 side create a tunnel interface.
This doesn't have to be the same number as the tunnel on the remote side.

interface tunnel 0
ip address 10.5.1.1 255.255.255.0
tunnel source s0/0
tunnel destination 41.95.109.2
tunnel mode gre ip


If you're running a routing protocol on each router that has established a tunnel with each other they will each form an adjacency with each others subnet. Meaning Local Subnet 1 router will now know that Local Subnet 2 is over the GRE tunnel interface.

References:
https://en.wikipedia.org/wiki/Generic_Routing_Encapsulation
https://supportforums.cisco.com/document/13576/how-configure-gre-tunnel
http://www.juniper.net/documentation/en_US/junos12.3/topics/concept/gre-tunnel-services.html
http://www.tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.tunnel.gre.html
http://blog.pluralsight.com/multipoint-gre-tunnel-introduction
https://www.quora.com/What-are-GRE-tunnels-and-how-are-they-utilized
http://blog.ipspace.net/2010/12/where-would-you-need-gre.html
http://deepakarora1984.blogspot.ca/2010/08/gre-tunnels-unleashed-making-breaking.html
http://gns3vault.com/forums/topic/would-someone-explain-gre-tunneling-3f/

No comments:

Post a Comment