Mobile IP - Generic Routing Encapsulation for Cisco Mobile Networks

Prior to the introduction of the Generic Routing Encapsulation for Cisco Mobile Networks feature, Cisco Mobile Networks supported only IP-in-IP encapsulation. This feature adds generic routing encapsulation (GRE) support for mobile networks. Benefits of the Generic Routing Encapsulation for Cisco Mobile Networks feature include the following:

  • GRE supports multiprotocol tunneling.

  • GRE provides explicit protection against recursive encapsulation.

  • Hardware support of GRE tunneling increases the performance of the router.

  • GRE keepalive messages allow the status of the end-to-end tunnel to be monitored.

Feature History for the Mobile IP - GRE for Cisco Mobile Networks Feature

Release

Modification

12.3(7)T

This feature was introduced.

Finding Feature Information

Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.

Prerequisites for GRE for Cisco Mobile Networks

Roaming must be enabled on an interface before GRE encapsulation can be enabled on the interface.

Restrictions for GRE for Cisco Mobile Networks

The foreign agent (FA) and home agent (HA) must support GRE encapsulation in order for the mobile router to register with GRE encapsulation enabled. If the mobile router is attempting to register using collocated care-of address (CCoA) with GRE encapsulation, the HA must support GRE encapsulation.

GRE keepalives do not support Network Address Translation (NAT). If there is NAT in the path between a mobile router and its HA, GRE keepalive messages will not work properly. To work around the problem, consider using the Mobile IP NAT Traversal feature, which offers UDP encapsulation. The Mobile IP NAT Traversal feature documentation can be found at the following URL:

http://www.cisco.com/univercd/cc/td/doc/product/software/ios123/123newft/123t/123t_8/gtnatmip.htm

Information About GRE for Cisco Mobile Networks

Generic Routing Encapsulation

Generic routing encapsulation (GRE) is a tunneling protocol used by Mobile IP. The GRE tunnel interface creates a virtual point-to-point link between two routers at remote points over an IP internetwork. GRE tunnels can transport a passenger protocol or encapsulated protocol.

Unlike IP-in-IP encapsulation, GRE provides the following:

  • Explicit protection against recursive encapsulation, a condition in which tunneled packets reenter the same tunnel before exiting.

  • Configurable keepalive messages to monitor the end-to-end status of the tunnel.

GRE is beneficial for certain applications because of its support for multiprotocol tunneling and explicit prevention of recursive encapsulation.

GRE for Cisco Mobile Networks Feature Design

To understand the components of the Cisco Mobile Networks solution, refer to the http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122newft/122t/122t4/ftmbrout.htm Cisco Mobile Networks feature documentation.

During agent discovery, HAs and FAs advertise their presence on their attached links by periodically multicasting or broadcasting messages called agent advertisements. The agent advertisements are ICMP Router Discovery Protocol (IRDP) messages with one or more extensions specific to Mobile IP. The agent advertisement extension consists of several fields including the following field that is relevant to this feature:

  • G: This agent can receive tunneled IP datagrams that use GRE (referred to as the G bit)

If the GRE for Cisco Mobile Networks feature is enabled, the mobile router will request GRE encapsulation in the registration request only if the FA advertises that it is capable of GRE encapsulation (the G bit is set in the advertisement). If the registration request is successful, packets will be tunneled using GRE encapsulation.

If the GRE for Cisco Mobile Networks feature is enabled and the mobile router is using collocated care-of address (CCoA), the mobile router will attempt to register with the HA using GRE encapsulation. If the registration request is successful, packets will be tunneled using GRE encapsulation.

If the mobile router receives a denied registration reply with error code 72 (foreign agent required encapsulation unavailable) or error code 139 (home agent unsupported encapsulation), the mobile router will send another registration request with the G bit unset and the default IP-in-IP encapsulation will be used.

GRE Keepalive Messages

GRE tunnels support keepalive messages, which are messages sent periodically to the HA that allow the detection of an interruption in the end-to-end tunnel. Tunnels that use IP-in-IP encapsulation do not use keepalive messages. If a tunnel that is using IP-in-IP encapsulation loses its connection to the HA, the mobile router will not be aware of the disruption until it tries to register with the HA again. This can take up to one half of the mobile router’s registration lifetime. GRE keepalive messages allow the status of the end-to-end tunnel to be checked at a configurable interval. If the mobile router detects an interruption in the connection to the HA, it will tear down the existing tunnel and attempt to reregister using the best interface. Typically this is the same interface on which the connection was previously established. If the registration attempt is unsuccessful, the mobile router will then try to register on the next best interface if one exists.

Benefits of GRE for Cisco Mobile Networks

The GRE for Cisco Mobile Networks feature introduces the ability for a mobile router to use GRE tunneling in addition to the default encapsulation method of IP-in-IP. GRE is a widely supported tunneling protocol, and some platforms support GRE tunnels in hardware. Hardware support of GRE tunneling offloads software operations, such as Cisco Express Forwarding (CEF) switching, from the CPU and increases the performance of the router. In addition, GRE supports multiprotocol tunneling and provides explicit protection against recursive encapsulation. Finally, the ability to configure keepalive messages with GRE allows the status of the end-to-end tunnel to be checked at a configurable interval, and reregistration can be attempted as soon as an interruption is detected.

How to Configure GRE for Cisco Mobile Networks

Configuring GRE on the Mobile Router

GRE encapsulation can be configured per interface or globally. Configuring GRE encapsulation on an interface allows only that interface to attempt to register with GRE encapsulation enabled. Configuring GRE encapsulation globally allows all roaming interfaces to attempt to register with GRE encapsulation enabled, unless the interface is configured for IP-in-IP encapsulation. The interface-level configuration overrides the global configuration.

Perform one of the following tasks to configure GRE on the mobile router:

Configuring GRE Globally on the Mobile Router

Perform this task to configure GRE globally on the mobile router.

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. ip mobile router
  4. tunnel mode gre
  5. end
  6. show ip mobile router registration
  7. show ip mobile router

DETAILED STEPS

  Command or Action Purpose
Step 1

enable

Example:

Router> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3

ip mobile router

Example:

Router(config)# ip mobile router

Enables the mobile router and enters mobile router configuration mode.

Step 4

tunnel mode gre

Example:

Router(mobile-router)#
 
tunnel mode gre

Sets the global encapsulation mode on all roaming interfaces of a mobile router to GRE.

Note 

Configuring an encapsulation protocol on an interface overrides the globally configured encapsulation protocol on that interface only. If there is no interface-level configuration, the interface inherits the global configuration.

Step 5

end

Example:

Router(mobile-router)# end 

Ends the current configuration session and returns to privileged EXEC mode.

Step 6

show ip mobile router registration

Example:

Router# show ip mobile router registration

Displays the pending and accepted registrations of the mobile router.

Step 7

show ip mobile router

Example:

Router# show ip mobile router

Displays configuration information and monitoring statistics about the mobile router.

Configuring GRE per Interface on the Mobile Router

Perform this task to configure GRE on an interface of the mobile router.

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. interface type number
  4. ip mobile router-service tunnel mode {gre | ipip }
  5. end
  6. show ip mobile router registration
  7. show ip mobile router interface

DETAILED STEPS

  Command or Action Purpose
Step 1

enable

Example:

Router> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3

interface type number

Example:

Router(config)# interface serial 2

Configures an interface type and enters interface configuration mode.

Step 4

ip mobile router-service tunnel mode {gre | ipip }

Example:

Router(config-if)# ip mobile router-service tunnel mode gre

Sets the encapsulation mode for a mobile router interface.

  • gre --Specifies that the mobile router will attempt to register with GRE encapsulation on the interface.

  • ipip --Specifies that IP-in-IP encapsulation will be used on the interface.

Note 

Configuring an encapsulation protocol on an interface overrides the globally configured encapsulation protocol on that interface only. If there is no interface-level configuration, the interface inherits the global configuration.

Step 5

end

Example:

Router(config-if)# end 

Ends the current configuration session and returns to privileged EXEC mode.

Step 6

show ip mobile router registration

Example:

Router# show ip mobile router registration

Displays the pending and accepted registrations of the mobile router.

Step 7

show ip mobile router interface

Example:

Router# show ip mobile router interface

Displays information about the interface that the mobile router is using for roaming.

Configuring GRE Keepalive Messages

Perform this task on the mobile router to enable GRE keepalive messages. No configuration is required on the HA to respond to GRE keepalive messages from the mobile router.

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. interface tunnel interface-number
  4. keepalive [period [retries ]]
  5. exit
  6. ip mobile router
  7. template tunnel interface-number

DETAILED STEPS

  Command or Action Purpose
Step 1

enable

Example:


Router> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:


Router# configure terminal

Enters global configuration mode.

Step 3

interface tunnel interface-number

Example:


Router(config)# interface tunnel 121

Enters interface configuration mode for the specified interface.

Step 4

keepalive [period [retries ]]

Example:


Router(config-if)# keepalive 5 3

Enables keepalive packets and specifies the number of times that the Cisco IOS software tries to send keepalive packets without a response before bringing down the interface or before bringing the tunnel protocol down for a specific interface.

Step 5

exit

Example:


Router(config-if)# exit 

Returns to global configuration mode.

Step 6

ip mobile router

Example:


Router(config)# ip mobile router

Enables the mobile router and enters mobile router configuration mode.

Step 7

template tunnel interface-number

Example:


Router(mobile-router)# template tunnel 121

Applies a tunnel template to tunnels brought up at the mobile router.

Configuration Examples for GRE for Cisco Mobile Networks

Configuring GRE for Cisco Mobile Networks Globally Example

The following example globally configures GRE encapsulation on a mobile router and enables GRE keepalive messages:


router mobile
!
ip mobile secure home-agent 10.40.40.1 spi 101 key hex 12345678123456781234567812345678      algorithm md5 mode prefix-suffix
ip mobile router
 address 10.80.80.1 255.255.255.0
 home-agent 10.40.40.1
 mobile-network Ethernet1/3
 mobile-network FastEthernet0/0
 template Tunnel 121
 tunnel mode gre
!
interface tunnel 121
 keepalive 5 3

Configuring GRE for Cisco Mobile Networks on an Interface Example

The following example configures GRE encapsulation on an interface of a mobile router and enables GRE keepalive messages:


interface FastEthernet0/0
 ip address 10.52.52.2 255.255.255.0
 ip mobile router-service roam
 ip mobile router-service tunnel mode gre
!
interface tunnel 121
 keepalive 5 3
!
ip mobile router
 template tunnel 121

Verifying GRE for Cisco Mobile Networks Examples

The following example shows display output from the show ip mobile router registration command when GRE encapsulation is configured on the mobile router. The Flags field shows that GRE encapsulation is enabled by displaying a capital "G." If GRE encapsulation were not enabled, a lowercase "g" would be displayed.


Router# show ip mobile router registration
Mobile Router Registrations:
Foreign agent 10.52.52.1:
    Registration accepted 01/11/00 07:01:24, On FastEthernet0/0
    Care-of addr 10.52.52.1, HA addr 10.40.40.1, Home addr 10.80.80.1 
    Lifetime requested 10:00:00 (36000), Granted 01:00:00 (3600) 
    Remaining 00:59:47 
    Flags sbdmG-t-
, Identification B68B7673.81565B8
    Register next time 00:59:27 
    Extensions:
        Mobile Network 172.16.153.0/24 
        Mobile Network 172.16.143.0/24 
        MN-HA Authentication SPI 101 

The following example shows display output from the show ip mobile router command when GRE encapsulation is globally configured on the mobile router. When GRE encapsulation is enabled, the line "Request GRE tunnel" is displayed in the output and the tunnel mode is shown as "GRE/IP".


Router# show ip mobile router
Mobile Router 
    Enabled 01/11/00 06:59:19 
    Last redundancy state transition NEVER 
Configuration:
    Home Address 10.80.80.1 Mask 255.255.255.0 
    Home Agent 10.40.40.1 Priority 100 (best) (current) 
    Registration lifetime 65534 sec 
    Retransmit Init 1000, Max 5000 msec, Limit 3 
    Extend Expire 20, Retry 10, Interval 1 
    Request GRE tunnel
    Mobile Networks:Ethernet1/3 (172.16.143.0/255.255.255.0) 
                     FastEthernet0/0 (172.16.153.0/255.255.255.0) 
Monitor:
    Status -Registered- 
    Active foreign agent 10.52.52.1, Care-of 10.52.52.1 
    On interface FastEthernet0/0
    Tunnel0 mode GRE/IP

The following example shows display output from the show ip mobile router interface command when GRE encapsulation is configured on an interface of the mobile router. When GRE encapsulation is enabled on the interface, the line "Request GRE tunnel" is displayed in the output.


Router# show ip mobile router interface
FastEthernet0/0:
    Priority 110, Bandwidth 100000, Address 10.52.52.2 
    Periodic solicitation disabled, Interval 600 sec 
    Retransmit Init 1000, Max 5000 msec, Limit 3 
    Current 2000, Remaining 0 msec, Count 2 
    Hold down 0 sec 
    Routing disallowed 
    Collocated CoA disabled 
    Request GRE tunnel

Additional References

The following sections provide references related to the GRE for Mobile Networks feature.

Related Documents

Related Topic

Document Title

Mobile IP commands: complete command syntax, command mode, defaults, usage guidelines, and examples

Cisco IOS IP Command Reference, Volume 4 of 4: IP Mobility , Release 12.3 T

Mobile IP commands and configuration tasks related to mobile networks

Cisco Mobile Networks feature document, Release 12.2(4)T and 12.2(13)T

Additional information about GRE keepalives

Generic Routing Encapsulation (GRE) Tunnel Keepalive feature document, Release 12.2(8)T

Information on configuring quality of service (QoS) with GRE

Quality of Service Options on GRE Tunnel Interfaces

Standards

Standards

Title

No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.

--

MIBs

MIBs

MIBs Link

No new or modified MIBs are supported by this feature, and support for existing MIBs has not been modified by this feature.

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

RFCs

RFCs

Title

No new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature.

--

Technical Assistance

Description

Link

Technical Assistance Center (TAC) home page, containing 30,000 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/public/support/tac/home.shtml

Command Reference

The following commands are introduced or modified in the feature or features documented in this module. For information about these commands, see the Cisco IOS IP Mobility Command Reference at http://www.cisco.com/en/US/docs/ios/ipmobility/command/reference/imo_book.html. For information about all Cisco IOS commands, go to the Command Lookup Tool at http://tools.cisco.com/Support/CLILookup or to the Cisco IOS Master Commands List .

  • ip mobile router-service tunnel mode

  • show ip mobile router

  • show ip mobile router interface

  • tunnel mode gre

Glossary

agent advertisement --An advertisement message constructed by an attachment of a special extension to an ICMP Router Discovery Protocol (IRDP) to advertise mobility services to potential users.

agent discovery --The method by which a mobile node or mobile router determines whether it is currently connected to its home network or a foreign network and detects whether it has moved and the way it has moved. It is the mechanism by which mobile nodes or mobile routers query and discover mobility agents. Agent discovery is an extension to ICMP Router Discovery Protocol (IRDP) (RFC 1256), which includes a mechanism to advertise mobility services to potential users.

care-of address --The termination point of the tunnel to a mobile node or mobile router. This can be a collocated care-of address, by which the mobile node or mobile router acquires a local address and detunnels its own packets, or a foreign agent care-of address, by which a foreign agent detunnels packets and forwards them to the mobile node or mobile router.

FA --Foreign agent. A router on the visited network of a foreign network that provides routing services to the mobile node while registered. The foreign agent detunnels and delivers packets to the mobile node or mobile router that were tunneled by the home agent of the mobile node. For packets sent by a mobile node, the foreign agent may serve as a default router for registered mobile nodes.

GRE --generic routing encapsulation. Tunneling protocol that can encapsulate a wide variety of protocol packet types inside IP tunnels, creating a virtual point-to-point link to routers at remote points over an IP internetwork. By connecting multiprotocol subnetworks in a single-protocol backbone environment, IP tunneling using GRE allows network expansion across a single-protocol backbone environment.

HA --Home agent. A router on a home network of the mobile node that tunnels packets to the mobile node or mobile router while the mobile node or router is away from home. It keeps current location information for registered mobile nodes called a mobility binding .

mobile network --A network that moves with the mobile router. A mobile network is a collection of hosts and routes that are fixed with respect to each other but are mobile, as a unit, with respect to the rest of the Internet.

mobile router --A mobile node that is a router. It provides for the mobility of one or more entire networks moving together, perhaps on an airplane, a ship, a train, an automobile, a bicycle, or a kayak. The nodes connected to a network served by the mobile router may themselves be fixed nodes or mobile nodes or routers.

registration --The process by which the mobile node is associated with a care-of address on the home agent while it is away from home. Registration may happen directly from the mobile node to the home agent or through a foreign agent.

tunnel --The path followed by a packet while it is encapsulated from the home agent to the mobile node. The model is that, while the packet is encapsulated, it is routed to a knowledgeable decapsulating agent, which decapsulates the datagram and then correctly delivers it to its ultimate destination.


Note

Refer to Internetworking Terms and Acronyms for terms not included in this glossary.