Table Of Contents
Generic Routing Encapsulation Tunnel IP Source and Destination VRF Membership
How to Configure GRE Tunnel IP Source and Destination VRF Membership
GRE Tunnel IP Source and Destination VRF Membership Configuration: Example
Generic Routing Encapsulation Tunnel IP Source and Destination VRF Membership
This feature allows you to configure the source and destination of a tunnel to belong to any virtual private network (VPN) routing/forwarding (VRFs) tables. A VRF table stores routing data for each VPN. The VRF table defines the VPN membership of a customer site attached to the network access server (NAS). Each VRF table comprises an IP routing table, a derived Cisco Express Forwarding (CEF) table, and guidelines and routing protocol parameters that control the information that is included in the routing table.
Previously, Generic Routing Encapsulation (GRE) IP tunnels required the IP tunnel destination to be in the global routing table. The implementation of this feature allows you to configure a tunnel source and destination to belong to any VRF. As with existing GRE tunnels, the tunnel becomes disabled if no route to the tunnel destination is defined.
History for the Generic Routing Encapsulation Tunnel IP Source and Destination VRF Membership
Release Modification12.0(23)S
This feature was introduced.
12.3(2)T
This feature was integrated into Cisco IOS Release 12.3(2)T.
Feature
Finding Support Information for Platforms and Cisco IOS Software Images
Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.
Contents
•
How to Configure GRE Tunnel IP Source and Destination VRF Membership
•
GRE Tunnel IP Source and Destination VRF Membership Configuration: Example
•
MIBs
How to Configure GRE Tunnel IP Source and Destination VRF Membership
SUMMARY STEPS
1.
enable
2.
configure {terminal | memory | network}
3.
interface tunnel slot
4.
ip vrf forwarding vrf-name
5.
ip address ip-address subnet-mask
6.
tunnel source (ip-address | type number)
7.
tunnel destination ip-address {hostname | ip-address}
8.
tunnel vrf vrf-name
DETAILED STEPS
GRE Tunnel IP Source and Destination VRF Membership Configuration: Example
In this example, packets received on interface e0 using VRF green, will be forwarded out of the tunnel through interface e1 using VRF blue. Figure 1 shows a simple tunnel scenario:
Figure 1 GRE Tunnel Diagram
The following example shows the configuration for the tunnel in Figure 1.
ip vrf bluerd 1:1ip vrf greenrd 1:2interface loopback0ip vrf forwarding blueip address 10.7.7.7 255.255.255.255interface tunnel0ip vrf forwarding greenip address 10.3.3.3 255.255.255.0tunnel source loopback 0tunnel destination 10.5.5.5tunnel vrf blueinterface ethernet0ip vrf forwarding greenip address 10.1.1.1 255.255.255.0interface ethernet1ip vrf forwarding blueip address 10.2.2.2 255.255.255.0ip route vrf blue 10.5.5.5 255.255.255.0 ethernet 1Additional References
The following sections provide references related to Generic Routing Encapsulation Tunnel IP Source and Destination VRF Membership.
Related Documents
MIBs
MIB MIBs Link•
![]()
•
![]()
To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:
Technical Assistance
Command Reference
This section documents a new command only.
tunnel vrf
To associate a VPN routing and forwarding (VRF) instance with a specific tunnel destination, interface or subinterface, use the tunnel vrf command in global configuration mode or interface configuration mode. To disassociate a VRF from the tunnel destination, use the no form of this command.
tunnel vrf vrf-name
no tunnel vrf vrf-name
Syntax Description
Defaults
The default destination is determined by the global routing table.
Command Modes
Global configuration
Interface configurationCommand History
Usage Guidelines
The tunnel source and destination must be in the same VRF.
Either the IP VRF or the tunnel VRF can be set to the global routing table (using the no ip vrf forwarding vrf command or the no tunnel vrf vrf command).
The tunnel will be disabled if no route to the tunnel destination is defined. If the tunnel VRF is set, there must ba a route to that destination in the VRF.
Examples
The following example shows how to associate a VRF with a tunnel destination. The tunnel endpoint, 10.5.5.5 will be looked up in the blue VRF.
interface tunnel0ip vrf forwarding greenip address 10.3.3.3 255.255.255.0tunnel source loop 0tunnel destination 10.5.5.5tunnel vrf blueRelated Commands
Copyright © 2003, 2005 Cisco Systems, Inc. All rights reserved.


