summaryrefslogtreecommitdiff
path: root/docs/interfaces/tunnel.rst
blob: 8fa1c0d729fb3060c39fc084500c483317a8d41a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
.. _interfaces-tunnel:

Tunnel Interfaces
=================

Generic Routing Encapsulation (GRE)
-----------------------------------

A GRE tunnel requires a tunnel source (local-ip), a tunnel destination (remote-ip), 
an encapsulation type (gre), and an address (ipv4/ipv6).  Below is a configuration example 
taken from a VyOS router and a Cisco IOS router.

**VyOS Router:**

.. code-block:: sh

  set interfaces tunnel tun100 address '10.0.0.1/30'
  set interfaces tunnel tun100 encapsulation 'gre'
  set interfaces tunnel tun100 local-ip '198.18.0.2'
  set interfaces tunnel tun100 remote-ip '198.18.2.2'

**Cisco IOS Router:**

.. code-block:: sh

  interface Tunnel100
  ip address 10.0.0.2 255.255.255.252
  tunnel source 198.18.2.2
  tunnel destination 198.18.0.2

The main difference between these two configurations is that VyOS requires you explicitly 
configure your encapsulation type.  The Cisco router defaults to 'gre ip'.


Virtual Tunnel Interface (VTI)
------------------------------

Set Virtual Tunnel Interface

.. code-block:: sh

  set interfaces vti vti0 address 192.168.2.249/30
  set interfaces vti vti0 address 2001:db8:2::249/64

Results in:

.. code-block:: sh

  vyos@vyos# show interfaces vti
  vti vti0 {
      address 192.168.2.249/30
      address 2001:db8:2::249/64
      description "Description"
  }