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
vpn 0 interface interface-name tunnel-interface 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)
- 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
Create a GRE tunnel and direct voice traffic to it:
vpn 0 interface ge1/1 ip address 126.96.36.199/24 tunnel-interface 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 ! ! ! policy data-policy direct-voice-to-gre vpn-list voice-vpn-list sequence 10 match dscp 8 ! action accept set vpn 1 tloc 188.8.131.52 color blue encap gre ! ! ! default-action drop ! ! lists 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
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.