Configuring a tunnel as next hop

To configure an IP static route with a tunnel as the next hop, follow these steps.
  1. Enter global configuration mode.
    device# configure terminal
    
  2. Configure the destination IP address, followed by the prefix length or address mask. On the same command line, enter the keyword tunnel followed by the tunnel ID.
    device(config)# ip route 10.128.2.71 255.255.255.0 tunnel 4
    

The following example configures an IP static route with a destination address of 10.128.2.71, a network mask of 255.255.255.0, and a tunnel gateway (tunnel 4) as the next hop.

device# configure terminal
device(config)# ip route 10.128.2.71 255.255.255.0 tunnel 4