Interface and Hardware Component Configuration Guide for Cisco NCS 560 Series Routers, IOS XR Release 7.10.x
Bias-Free Language
The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
Generic Routing Encapsulation (GRE) is a tunneling protocol that
provides a simple generic approach to transport packets of one protocol over
another protocol by means of encapsulation. This module provides information
about how to configure a GRE tunnel.
Configuring GRE
Tunnels
Generic Routing Encapsulation (GRE) is a tunneling protocol that
provides a simple generic approach to transport packets of one protocol over
another protocol by means of encapsulation. This module provides information
about how to configure a GRE tunnel.
Configuring GRE Tunnels
Tunneling provides a mechanism to transport packets of one protocol within another protocol. Generic Routing Encapsulation
(GRE) is a tunneling protocol that provides a simple generic approach to transport packets of one protocol over another protocol
with encapsulation. GRE encapsulates a payload, that is, an inner packet that needs to be delivered to a destination network
inside an outer IP packet. The GRE tunnel behave as virtual point-to-point link that have two endpoints identified by the
tunnel source and tunnel destination address. The tunnel endpoints send payloads through GRE tunnels by routing encapsulated
packets through intervening IP networks. Other IP routers along the way do not parse the payload (the inner packet); they
only parse the outer IP packet as they forward it towards the GRE tunnel endpoint. Upon reaching the tunnel endpoint, GRE
encapsulation is removed and the payload is forwarded to the packet's ultimate destination.
Guidelines and Restrictions for Configuring GRE Tunnels
The following restrictions apply while configuring GRE tunnels:
The router supports 1000 GRE tunnels without statistics, and 500 GRE tunnels with statistics on the router.
Only up to 16 unique source IP addresses are supported for the tunnel source.
2-pass to Single-pass migration, which means converting the same GRE tunnel, is not possible in a single configuration step.
You must first delete the 2-pass tunnel and then add the Single-pass tunnel.
Configurable MTU is not supported on Single-pass GRE interface, but supported on 2-pass GRE interface.
To use the outer IPv4 GRE header for IP tunnel decapsulation in the hashing algorithm for ECMP and bundle member selection,
use the hw-module profile load-balance algorithm command.
Configuration Example
Configuring a GRE tunnel involves creating a tunnel interface and defining the tunnel source and destination. This example
shows how to configure a GRE tunnel between Router1 and Router2. You need to configure tunnel interfaces on both the routers.
Tunnel source IP address on Router1 will be configured as the tunnel destination IP address on Router2. Tunnel destination
IP address on Router1 will be configured as the tunnel source IP address on Router2. In this example, OSPF is used as the
routing protocol between the two routers. You can also configure BGP or IS-IS as the routing protocol.
Encapsulation of
datagrams in a network is done for multiple reasons, such as when a source
server wants to influence the route that a packet takes to reach the
destination host. The source server is also known as the encapsulation server.
IP-in-IP encapsulation involves the insertion of an outer IP header over the existing IP header. The source and destination
address in the outer IP header point to the endpoints of the IP-in-IP tunnel. The stack of IP headers is used to direct the
packet over a predetermined path to the destination, provided the network administrator knows the loopback addresses of the
routers transporting the packet. This tunneling mechanism can be used for determining availability and latency for most network
architectures. It is to be noted that the entire path from source to the destination does not have to be included in the headers,
but a segment of the network can be chosen for directing the packets.
The following
illustration describes the basic IP-in-IP encapsulation and decapsulation
model.
Use Case: Configure IP-in-IP Decapsulation
The following topology describes a use case where IP-in-IP encapsulation and decapsulation are used for different segments
of the network from source to destination. The IP-in-IP tunnel consists of multiple routers that are used to decapsulate and
direct the packet through the data center fabric network.
The following
illustration shows how the stacked IPv4 headers are de-capsulated as they
traverse through the de-capsulating routers.
Stacked IP Header in an Encapsulated Packet
The encapsulated packet has an outer IPv4 header that is stacked over the original IPv4 header, as shown in the following
illustration.
Configuration
You can use the
following sample configuration on the routers to decapsulate the packet as it
traverses the IP-in-IP tunnel: