Configuring a Tunnel

To configure a GRE tunnel, perform the following tasks.

Procedure

  1. Enter global configuration mode.
    device# configure terminal
  2. Use the interface tunnel command to enter interface configuration mode and configure a tunnel.
    device (config)# interface tunnel 5
    The range is from 1 through 1024.
  3. Use the mode gre ip command to configure GRE encapsulation over IP as mode.
    device(config-intf-tunnel-5)# mode gre ip
  4. Use the source command to configure the source IP address of the tunnel.
    device(config-intf-tunnel-5)# source 10.1.1.10
    The source IP address or interface that is configured will be used as the source of the GRE tunnel.
  5. Use the source command to configure source interface of the tunnel.
    device(config-intf-tunnel-5)# source ethernet ve 3
    Ethernet, loopback, and VE interfaces are supported. The maximum number of supported tunnel sources is 15 for SLX 9540 and SLX 9640 and 255 for SLX 9740.
    Note

    Note

    When the physical/ve interface is specified as the source of the GRE tunnel, the lowest IP address of that interface is used as the tunnel source IP address. If the smallest IP address is removed from the interface, the next smallest IP address is used as the tunnel source.
  6. Use the destination command to configure destination IP address.
    device(config-intf-tunnel-5)# destination 10.1.1.11
  7. Use router- interface command to configure a router interface for the tunnel.
    device(config-intf-tunnel-5)# router-interface ve 4

    The tunnel source VE and the router interface VE cannot be the same.

  8. Use the no shutdown command to configure the tunnel to remain up.
    device(config-intf-tunnel-5)# no shutdown

Example

The following example configures a GRE tunnel.

device# configure terminal
device (config)# interface ve 3
device(config-if-Ve-3)# ip address 50.50.50.5/24
device(config-if-Ve-3)# exit
device (config)# interface tunnel 5
device(config-intf-tunnel-5)# mode gre ip
device(config-intf-tunnel-5)# source 10.1.1.10
device(config-intf-tunnel-5)# source ve 4
device(config-intf-tunnel-5)# destination 10.1.1.11
device(config-intf-tunnel-5)# router-interface ve 3
device(config-intf-tunnel-5)# dscp-ttl-mode pipe
device(config-intf-tunnel-5)# no shutdown