GRE Tunnel Basic

Scenario:

You are working for Company “BigLabs” and you have heard some colleague network engineers talk about VPN tunnels and how they were unable to send routing protocols across the VPN tunnels. You also heard that a  GRE tunnel could possible solve this problem. Let’s see what this is all about and lab it up!

Goal:

  • Configure all IP addresses as specified in the topology picture.
  • Configure a loopback interface on Router Godzilla and Nessie:
    Godzilla: Loopback0: 1.1.1.1 /24
    Nessie: Loopback0: 3.3.3.3 /24
  • Configure EIGRP AS1 on all 3 routers, only advertise the 192.168.12.0 and 192.168.23.0 network, do not advertise the loopbacks.
  • Ensure Router Godzilla and Nessie can ping each other.
  • Configure a GRE tunnel between Router Godzilla and Nessie.
  • Configure the 192.168.13.0 /24 network on the GRE tunnel:
    Godzilla: 192.168.13.1
    Nessie: 192.168.13.3
  • Ensure you can ping the IP addresses that you configured on the tunnel interface.
  • Configure another loopback interface on Router Godzilla and Nessie:
    Godzilla: Loopback1: 11.11.11.11 /24
    Nessie: Loopback1: 33.33.33.33 /24
  • Configure OSPF and use network commands to advertise the network on the GRE tunnel.
  • Advertise Loopback1 in OSPF on Router Godzilla and Nessie.
  • Ensure you establish a OSPF neighbor relationship and that you see the loopback1 interfaces in the routing table.

IOS:

c3640-jk9s-mz.124-16.bin

Topology:

alt

Video Solution:

Configuration Files

You need to register to download the GNS3 topology file. (Registration is free!)

Once you are logged in you will find the configuration files right here.

Opt In Image
Do you want your CCNA or CCNP Certificate?

The How to Master series helps you to understand complex topics like spanning-tree, VLANs, trunks, OSPF, EIGRP, BGP and more.

Written by René Molenaar - CCIE #41726

You May Also Like

About the Author: Rene Molenaar

René - CCIE #41726 is the creator of GNS3Vault.com where he shares CCNA, CCNP and CCIE R&S labs. He also blogs about networking on http://networklessons.com

31 Comments

  1. Hi Rene:
    First of all, thanks for the lab. I’m trying to do it but I have some problemas with the tunneling. Could you put the routers configuration in order to check my solution?
    Thanks in advance,

  2. Hi Rene, Thanks for the lab and congratulation for the page. Could you check it? If I can see the network 33.33.33.0/24 know by a OSPF update, I guess is work right? Thanks for your time

    Godzilla#sh ip route

    Gateway of last resort is not set

    C 192.168.12.0/24 is directly connected, FastEthernet0/0
    1.0.0.0/24 is subnetted, 1 subnets
    C 1.1.1.0 is directly connected, Loopback0
    C 192.168.13.0/24 is directly connected, Tunnel0
    33.0.0.0/32 is subnetted, 1 subnets
    O 33.33.33.33 [110/11112] via 192.168.13.3, 00:01:10, Tunnel0
    D 192.168.23.0/24 [90/30720] via 192.168.12.2, 00:44:47, FastEthernet0/0
    11.0.0.0/24 is subnetted, 1 subnets
    C 11.11.11.0 is directly connected, Loopback1

    1. hi,
      you can use under loop interface
      ip ospf network point-to-point
      if you want see /24 network

      regards

  3. If you see the OSPF update you can assume it’s working correctly. A better idea is to use some show and debug commands to confirm that it’s actually working.

  4. Rene,

    i can up the tunnel. My line protocol stays down. any reason?
    I used the fe interface as source.

  5. ***********Godzilla************
    host Godzilla
    line con 0
    logg sy
    int f0/0
    ip add 192.168.12.1 255.255.255.0
    no sh
    !
    int l0
    ip add 1.1.1.1 255.255.255.0
    !

    router eigrp 1
    netw 192.168.12.0 0.0.0.255
    !
    int tun 0
    ip add 192.168.13.1 255.255.255.0
    tu so f0/0
    tu des 192.168.23.3
    !
    int l1
    ip add 11.11.11.11 255.255.255.0
    !
    router ospf 1
    !netw 192.168.12.0 0.0.0.255 are 0
    netw 1.1.1.1 0.0.0.255 are 0
    netw 11.11.11.11 0.0.0.255 are 0
    netw 192.168.13.0 0.0.0.255 are 0
    !

    ***********KingKong************

    host KingKong
    line con 0
    logg sy
    int f0/0
    ip add 192.168.12.2 255.255.255.0
    no sh
    int f1/0
    ip add 192.168.23.2 255.255.255.0
    no sh
    !
    router eigrp 1
    netw 192.168.12.0 0.0.0.255
    netw 192.168.23.0 0.0.0.255
    !

    ***********nessie********

    host Nessie
    line con 0
    logg sy
    int f0/0
    ip add 192.168.23.3 255.255.255.0
    no sh
    !
    int l0
    ip add 3.3.3.3 255.255.255.0
    !
    router eigrp 1
    netw 192.168.23.0 0.0.0.255
    !
    !
    int tun 0
    ip add 192.168.13.3 255.255.255.0
    tu so f0/0
    tu des 192.168.12.1
    !
    int l1
    ip add 33.33.33.33 255.255.255.0
    !
    router ospf 1
    !netw 192.168.23.0 0.0.0.255 are 0
    netw 192.168.13.0 0.0.0.255 are 0
    netw 3.3.3.3 0.0.0.255 are 0
    netw 33.33.33.33 0.0.0.255 are 0
    !

  6. Hi,
    1) We have configured loop back 0 (1.1.1.1 and 3.3.3.3)but never used it in GRE-config. Is this loop back not required for GRE?.
    2) On tunnel interfaces, we assigned IPs 192.168.13.1 and 192.168.13.3 but we never used that too so we can assign any random IPs on tunnel interface. Then why we have given that IP?

  7. On all the routers EIGRP is configured for basic connectivity. This way we can create a GRE tunnel between the two routers, otherwise they don’t know how to reach each others IP address.

    We use the IP addresses on the GRE tunnel so we can establish an OSPF adjacency between the two routers, the loopbacks are advertised in OSPF and learned through the GRE tunnel.

  8. Is GNS3 still having problems loading configs from projects? Every time I load a project from a .net file downloaded from here the startup configs never load with the project, so what I am I doing wrong? Is there a special way to load the .net file with project open to get the configs at the same time?

  9. Never mind I see that that there is no original configs, you start out with no configs in the routers and config from scratch in the lab, sorry for the confusion.

    1. Most of my labs do have startup-configs, seems like i still have to fix this one…

  10. Hi. If using IPIP encap instead of GRE in a prod environment(over an MPLS network), do you think it that the tunnel can handle the load if the remote connection is a stub area connection, and bandwidth statement added to the tunnel to raise its priority in OSPF?

    I realize that GRE tunnels bw is 9k which makes it undesirable for sites with multiple links.

  11. I love your labs man, you’re easy to follow and accurate! You really have been helping my skill set ^-^

  12. Rene,

    I’ve been spending quite some time on your site & am really delighted to learn lot of stuff in a simple way. You’re just amazing with your tech skills. Please do continue to post…

    Building a single GRE tunnel, it worked. Let’s say, i’ve 5 sites & i want to build a static tunnel between all these 5 sites…
    Can you please tell me what will be the source & destination IP for each tunnel?
    Would you be able to shed some light on this?

  13. Cheers. Watched all 4 in this section and labbed them up. Many thanks. I need some more time in the day for all the vids.

  14. great lab, thanks for posting it, it has all the information needed to start off doing tunneling

  15. [b]Godzilla :::::::::[/b]
    interface Loopback0
    ip address 1.1.1.1 255.255.255.0
    !
    interface Loopback1
    ip address 11.11.11.11 255.255.255.0
    !
    interface Tunnel1
    ip address 192.168.13.1 255.255.255.0
    tunnel source FastEthernet0/0
    tunnel destination 192.168.23.3
    !
    interface FastEthernet0/0
    ip address 192.168.12.1 255.255.255.0
    duplex auto
    speed auto
    !
    router eigrp 1
    network 192.168.12.0
    auto-summary
    !
    router ospf 1
    log-adjacency-changes
    network 11.11.11.11 0.0.0.0 area 0
    network 192.168.13.0 0.0.0.255 area 0

    [b]Godzilla#sh ip route[/b]
    Gateway of last resort is not set

    C 192.168.12.0/24 is directly connected, FastEthernet0/0
    1.0.0.0/24 is subnetted, 1 subnets
    C 1.1.1.0 is directly connected, Loopback0
    C 192.168.13.0/24 is directly connected, Tunnel1
    33.0.0.0/32 is subnetted, 1 subnets
    O 33.33.33.33 [110/11112] via 192.168.13.3, 00:02:35, Tunnel1
    D 192.168.23.0/24 [90/30720] via 192.168.12.2, 00:01:39, FastEthernet0/0
    11.0.0.0/24 is subnetted, 1 subnets
    C 11.11.11.0 is directly connected, Loopback1

    [b]KingKong:::::::::::::::::[/b]

    interface FastEthernet0/0
    ip address 192.168.12.2 255.255.255.0
    duplex auto
    speed auto
    !
    interface FastEthernet1/0
    ip address 192.168.23.2 255.255.255.0
    duplex auto
    speed auto
    !
    router eigrp 1
    network 192.168.12.0
    network 192.168.23.0
    auto-summary

    KingKong#sh ip route

    Gateway of last resort is not set

    C 192.168.12.0/24 is directly connected, FastEthernet0/0
    C 192.168.23.0/24 is directly connected, FastEthernet1/0

    [b]NESSIE::::::::::::::[/b]

    interface Loopback0
    ip address 3.3.3.3 255.255.255.0
    !
    interface Loopback1
    ip address 33.33.33.33 255.255.255.0
    !
    interface Tunnel3
    ip address 192.168.13.3 255.255.255.0
    tunnel source FastEthernet0/0
    tunnel destination 192.168.12.1
    !
    interface FastEthernet0/0
    ip address 192.168.23.3 255.255.255.0
    duplex auto
    speed auto
    !
    router eigrp 1
    network 192.168.23.0
    auto-summary
    !
    router ospf 1
    log-adjacency-changes
    network 33.33.33.33 0.0.0.0 area 0
    network 192.168.13.0 0.0.0.255 area 0

    [b]Nessie#sh ip route[/b]

    Gateway of last resort is not set

    D 192.168.12.0/24 [90/30720] via 192.168.23.2, 00:00:32, FastEthernet0/0
    C 192.168.13.0/24 is directly connected, Tunnel3
    33.0.0.0/24 is subnetted, 1 subnets
    C 33.33.33.0 is directly connected, Loopback1
    3.0.0.0/24 is subnetted, 1 subnets
    C 3.3.3.0 is directly connected, Loopback0
    C 192.168.23.0/24 is directly connected, FastEthernet0/0
    11.0.0.0/32 is subnetted, 1 subnets
    O 11.11.11.11 [110/11112] via 192.168.13.1, 00:04:52, Tunnel3

    Rene Please Verify the Configs…
    Thanx and by the way very educational Labs..

  16. Hello Rene,

    Nice to meet you. I have a quetion

    What was the reason to creating the loopback’s 1.1.1.1 and 3.3.3.3?

    Cheers

  17. The routers are not configured on the .zip file you have uploaded, the beginning one

  18. Rene, Thanks, this lab is simple, however this solution with 2 protocols are so smart and give us to think about how the world routing works and help us a lot.
    You”re the guy!

  19. OK, I know it is a simple lab topology, but configuring it and seeing the adjacencies come up and watching how the packets are being routed is pretty cool. Thanks!

  20. This is the oddest thing to me. I’ve so cool that it works, but essentially OSPF is riding the back of EIGRP to create an adjacency.

Comments are closed.