When the router receives a VPN route to a BGP next-hop address but no MPLS path is available, a GRE tunnel can be dynamically generated to carry the VPN traffic across the BGP network. The GRE tunnel is generated and then its routing information is copied into the inet.3 routing table.
![]() |
Note: IPv4 routes are the only type of routes supported for dynamic GRE tunnels. Also, the routing platform must have a tunnel PIC. |
To generate GRE tunnels dynamically, include the dynamic-tunnels statement:
-
dynamic-tunnels tunnel-name {
- destination-networks prefix;
- source-address address;
- tunnel-type gre;
- }
You can include this statement at the following hierarchy levels:
Specify the IPv4 prefix range (for example, 10/8 or 11.1/16) for the destination network by including the destination-networks statement. Only tunnels within the specified IPv4 prefix range are allowed to be initiated.
- destination-networks prefix;
You can include this statement at the following hierarchy levels:
Specify the source address for the GRE tunnels by including the source-address statement. The source address specifies the address used as the source for the local tunnel endpoint. This could be any local address on the router (typically the router ID or the loopback address).
- source-address address;
You can include this statement at the following hierarchy levels:
Specify the type of tunnel to be dynamically created by including the tunnel-type statement. The only currently valid value is gre (for GRE tunnels).
- tunnel-type gre;
You can include this statement at the following hierarchy levels: