Page MenuHomeVyOS Platform

Support tunnel source-interface
Closed, ResolvedPublicFEATURE REQUEST

Description

According to the iproute2 man page a tunnel can be instructed to only use one physical interface to send out data to its remote site.

http://man7.org/linux/man-pages/man8/ip-tunnel.8.html

dev NAME
    bind the tunnel to the device NAME so that tunneled
    packets will only be routed via this device and will
    not be able to escape to another device when the route
    to endpoint changes.

This can be handy if an IP tunnel is source from a different VRF then the VRF it is assigned to deliver the payload traffic to.

XML CLI syntax should be:

<leafNode name="source-interface">
  <properties>
    <help>Physical Interface used for underlaying traffic</help>
    <completionHelp>
      <script>${vyos_completion_dir}/list_interfaces.py</script>
    </completionHelp>
  </properties>
</leafNode>

Details

Difficulty level
Normal (likely a few hours)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Feature (new functionality)

Revisions and Commits

Related Objects

StatusSubtypeAssignedTask
ResolvedFEATURE REQUESTthomas-mangin
OpenFEATURE REQUESTNone

Event Timeline

c-po triaged this task as Normal priority.
c-po created this task.
c-po changed Difficulty level from Unknown (require assessment) to Normal (likely a few hours).

@cpo should another task be created to make sure we exclude the interfaces themself from source-interface (s) ?

Works for me ..

[ interfaces tunnel tun0 ]
DEBUG/IFCONFIG cmd 'ip tunnel add tun0 mode gre local 127.0.0.1 remote 1.1.1.1 dev eth0 ttl 255 tos inherit'

vyos@vyos# set interfaces tunnel tun0 source-interface 'eth1'
[edit]
vyos@vyos# commit
[ interfaces tunnel tun0 ]
DEBUG/IFCONFIG cmd 'ip tunnel cha tun0 local 127.0.0.1'
DEBUG/IFCONFIG cmd 'ip tunnel cha tun0 remote 1.1.1.1'
DEBUG/IFCONFIG cmd 'ip tunnel cha tun0 dev eth1'

11: tun0@eth1: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1476 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/gre 127.0.0.1 peer 1.1.1.1
thomas-mangin added a commit: Restricted Diffusion Commit.
erkin set Issue type to Feature (new functionality).Aug 30 2021, 7:46 AM
erkin removed a subscriber: Active contributors.