Overview

Configure a GRE tunnel via the Internet. This creates a virtual point-to-point connection between the two locations.

Network Diagram

Configure a GRE tunnel between R11 and R21 in the following network diagram. the GRE tunnel provides a virtual point-to-point connection between R11 and R21.

Fig. Example of GRE tunnel interface configuration
Fig. Example of GRE tunnel interface configuration

To configure the GRE tunnel interface, it is assumed that communication is available between R11 and R21.

Configuring and Verifying the GRE Tunnel Interface

Configuring GRE Tunnel Interface

Create a tunnel interface with R11 and R21. You can use any interface number, in this case 0. You can use the tunnel destination and tunnel source commands to specify the destination and source IP addresses of the IP headers for forwarding. You also need the IP address to send and receive IP packets on Tunnel0. Instead of configuring the IP address explicitly, we configure ip unnumbered to use the IP address of Loopback0.

R11

interface Tunnel0
 ip unnumbered Loopback0
 tunnel source Ethernet0/0
 tunnel destination 100.2.2.21

R21

interface Tunnel0
 ip unnumbered Loopback0
 tunnel source Ethernet0/0
 tunnel destination 100.1.1.11

Verifying GRE Tunnel Interface

The show interface tunnel0 command verifies the tunnel interface between R11 and R21. the output of show interface tunnel0 at R11 is as follows.

R11

R11#show interfaces tunnel 0
Tunnel0 is up, line protocol is up
  Hardware is Tunnel
  Interface is unnumbered. Using address of Loopback0 (10.1.0.11)
  MTU 1514 bytes, BW 9 Kbit/sec, DLY 500000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation TUNNEL, loopback not set
  Keepalive not set
  Tunnel source 100.1.1.11 (Ethernet0/0), destination 100.2.2.21
  Tunnel protocol/transport GRE/IP
    Key disabled, sequencing disabled
    Checksumming of packets disabled
  Tunnel TTL 255
  Fast tunneling enabled
  Tunnel transmit bandwidth 8000 (kbps)
  Tunnel receive bandwidth 8000 (kbps)
-- omitted --

Related articles