Richard Burts Thu, 08/23/2007 - 07:50
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN


The traditional implementation of GRE tunnels requires static IP addresses on both ends of the tunnel. Cisco has introduced a new feature of dynamic multipoint GRE which allows one end of the tunnel to have dynamic addressing. I believe that this is what you need. This link should give you information to get started:



Antonio_1_2 Mon, 08/27/2007 - 00:03
User Badges:

Thanks a lot. Just one question. Is it possible to use dns name instead of IP address in IOS configuration. i.e. for destination address in GRE tunnel?

thomas.anthony Mon, 08/27/2007 - 01:26
User Badges:

no.You need to use only the IP address for GRE source and destination,

osiristrading123 Mon, 08/27/2007 - 13:40
User Badges:

There actually is a nifty way to make this work: set up a config script which contains this:


interface tunnel

tunnel destination



Copy this script to the router via TFTP or HTTP, and set up a kron job to copy the file to running-config every minute. IOS will resolve the hostname to the correct IP address. You will also need to issue a "file prompt quiet" command to the router in config mode, or this will not work.

Lastly, whenever the IP address changes, your GRE tunnel may be down for a few minutes.

Antonio_1_2 Wed, 08/29/2007 - 00:13
User Badges:

Great! Thanks a lot. Just to make clear for me: when I use coomand tunnel destination (DNS name instead IP addr.) IOS resolve once and cache IP address? It doesn't query DNS server anymore (i.e. when tunnel gets up)?

Pavel Bykov Wed, 08/29/2007 - 02:26
User Badges:
  • Silver, 250 points or more

IOS resolves the DNS and applies the configuration with the resolved IP address. It's a command parsing feature - the actual configuration cannot be with DNS name. Therefor it resolves the name only once (during entering the command), and writes resolved IP address. If DNS server will not be available at the time when you issued the command, it will not resolve the IP address and configuration will be invalid.

Make sure DNS server is available whenever you are pasting/typing/issuing commands with DNS names.

osiristrading123 Wed, 08/29/2007 - 06:44
User Badges:

Antonio, yes, that is correct. By setting up the kron job, you are simulating typing in the correct ip address every minute. We have a few tunnels running like this, and it works very well.


This Discussion