Skip to main content
Cisco SD-WAN
Product Documentation
Viptela Documentation


vpn 0 interface tunnel-interface encapsulation—Set the encapsulation for a tunnel interface (on vEdge routers only).

vManage Feature Template

For vEdge routers only:

Configuration ► Templates ► VPN Interface Cellular (for vEdge cellular wireless routers only)
Configuration ► Templates ► VPN Interface Ethernet
Configuration ► Templates ► VPN Interface PPP

Command Hierarchy

vpn 0
  interface interface-name
      encapsulation (gre | ipsec)
        preference number
        weight number


(gre | ipsec)
Set the encapsulation to use on the tunnel interface. This encapsulation is one of the TLOC properties associated with the tunnel, along with the IP address and the color. The default IP MTU for GRE is 1468 bytes, and for IPsec it is 1442 bytes because of the larger overhead.
For a single tunnel, you can configure both IPsec and GRE encapsulations, by including two encapsulation commands. The Viptela software then creates two TLOCs for the tunnel interface. Both TLOCs have the same IP address and color, but one has IPsec encapsulation while the other has GRE encapsulation.
Default: None. You must explicitly configure an encapsulation.
preference number
Preference for directing traffic to the tunnel. A higher value is preferred. When a vEdge router has multiple tunnels (that is, multiple TLOCs), only the TLOC or TLOCs with the highest preference are chosen to forward outbound traffic, in the absence of policy that overrides this choice. If all TLOCs have the same preference and no policy is applied that affects traffic flow, traffic flows are evenly distributed among the tunnels, using ECMP.
Range: 0 through 4294967295 (232 – 1)
Default: 0
weight number
Weight to use to balance traffic across multiple tunnels (that is, across multiple TLOCs). A higher value sends more traffic to the tunnel. You typically set the weight based on the bandwidth of the TLOC. When a vEdge router has multiple TLOCs, all with the highest preference, traffic distribution is weighted according to the configured weight value. For example, if TLOC A has weight 10, and TLOC B has weight 1, and both TLOCs have the same preference value, then roughly 10 flows are sent out TLOC A for every 1 flow sent out TLOC B.
Range: 1 through 255
Default: 1

Operational Commands

show control connections
show omp tlocs and show omp tlocs detail (see display the configured preference and weight values)


Create a GRE tunnel and direct voice traffic to it:

vpn 0
  interface ge1/1
    ip address
      encapsulation gre
      color blue
      allow-service dhcp
      allow-service dns
      allow-service icmp
      no allow-service sshd
      no allow-service ntp
      no allow-service stun
    no shutdown
  data-policy direct-voice-to-gre
    vpn-list voice-vpn-list
      sequence 10
          dscp 8
        action accept
            vpn 1
            tloc color blue encap gre
      default-action drop
    vpn-list voice-vpn-list
      vpn 1-10
    site-list voice-site-list
      site-id 100-102
apply-policy site-list voice-site-list data-policy direct-voice-to-gre all

Release Information

Command introduced in Viptela Software Release 14.1.​
In Release 15.1, preference and weight commands moved from under tunnel-interface to under encapsulation.
In Release 15.2, add GRE encapsulation.

Additional Information

See the Configuring Network Interfaces article for your software release.
​bfd color pmtu-discovery

  • Was this article helpful?