Guest

Cisco IOS Software Releases 12.3 T

Generic Routing Encapsulation Tunnel IP Source and Destination VRF Membership

Table Of Contents

Generic Routing Encapsulation Tunnel IP Source and Destination VRF Membership

Contents

How to Configure GRE Tunnel IP Source and Destination VRF Membership

GRE Tunnel IP Source and Destination VRF Membership Configuration: Example

Additional References

Related Documents

MIBs

Technical Assistance

Command Reference

tunnel vrf


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
Modification

12.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

Additional References

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

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables higher privilege levels, such as privileged EXEC mode.

Enter your password if prompted.

Step 2 

configure {terminal | memory | network}

Example:

Router# configure terminal

Enters global configuration mode.

Step 3 

interface tunnel slot

Example:

Router(config)# interface tunnel 0

Enters interface configuration mode for the specified interface.

Step 4 

ip vrf forwarding vrf-name

Example:

Router(config-if)# ip vrf forwarding green

Defines the VRF.

Step 5 

ip address ip-address subnet-mask

Example:

Router(config-if)# ip address 10.7.7.7 255.255.255.255

Specifies the ip address and subnet mask.

Step 6 

tunnel source {ip-address | type number}

Example:

Router(config-if)# tunnel source loop 0

Specifies the tunnel source.

Step 7 

tunnel destination {hostname | ip-address}

Example:

Router(config-if)# tunnel destination 10.5.5.5

Defines the tunnel destination.

Step 8 

tunnel vrf vrf-name

Example:

Router(config-if)# tunnel vrf finance1

Defines the VRF.


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 blue
 rd 1:1

ip vrf green
 rd 1:2

interface loopback0
 ip vrf forwarding blue
 ip address 10.7.7.7 255.255.255.255

interface tunnel0
 ip vrf forwarding green
 ip address 10.3.3.3 255.255.255.0
 tunnel source loopback 0
 tunnel destination 10.5.5.5
 tunnel vrf blue

interface ethernet0
 ip vrf forwarding green
 ip address 10.1.1.1 255.255.255.0

interface ethernet1
 ip vrf forwarding blue
 ip address 10.2.2.2 255.255.255.0

 ip route vrf blue 10.5.5.5 255.255.255.0 ethernet 1

Additional References

The following sections provide references related to Generic Routing Encapsulation Tunnel IP Source and Destination VRF Membership.

Related Documents

Related Topic
Document Title

VRF tables

"Configuring Multiprotocol Label Switching" chapter of the Cisco IOS Switching Services Configuration Guide, Release 12.3

Tunnels

Cisco IOS Interface Configuration Guide, Release 12.3


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:

http://www.cisco.com/go/mibs


Technical Assistance

Description
Link

The Cisco Technical Support website contains thousands of pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco.com users can log in from this page to access even more content.

http://www.cisco.com/techsupport


Command Reference

This section documents a new command only.

tunnel vrf

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

vrf-name

Name assigned to a VRF.


Defaults

The default destination is determined by the global routing table.

Command Modes

Global configuration
Interface configuration

Command History

Release
Modification

12.0(23)S

This command was introduced.

12.3(2)T

This command was integrated into Cisco IOS Release 12.3(2)T.

12.2(27)SBC

This command was integrated into Cisco IOS Release 12.2(27)SBC.


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 tunnel0
 ip vrf forwarding green
 ip address 10.3.3.3 255.255.255.0
 tunnel source loop 0
 tunnel destination 10.5.5.5
 tunnel vrf blue

Related Commands

Command
Description

ip route vrf

Establishes static routes for a VRF.

ip vrf

Configures a VRF routing table.

ip vrf forwarding

Associates a VPN VRF instance with an interface or subinterface.

tunnel destination

Specifies the destination for a tunnel interface.

tunnel source

Sets the source address for a tunnel interface.