Page MenuHomeVyOS Platform

Does not possible to configure tunnel mode gre-bridge
Closed, ResolvedPublicBUG

Description

To create gretap we must to use ip link instead of ip tunnel. With ip tunnel command possible to create only limited interfaces

vyos@RTR1:~$ sudo ip tunnel help
Usage: ip tunnel { add | change | del | show | prl | 6rd } [ NAME ]
	 [ mode { ipip | gre | sit | isatap | vti } ] [ remote ADDR ] [ local ADDR ]
...

Reproducing steps:

set interfaces tunnel tun1 address '100.64.0.1/24'
set interfaces tunnel tun1 encapsulation 'gre-bridge'
set interfaces tunnel tun1 local-ip '192.168.255.35'
set interfaces tunnel tun1 remote-ip '192.168.255.61'
commit
Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/interfaces-tunnel.py", line 196, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/interfaces-tunnel.py", line 185, in apply
    tun = klass(tunnel['ifname'], **conf)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/tunnel.py", line 68, in __init__
    super().__init__(ifname, **config)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 264, in __init__
    self._create()
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/tunnel.py", line 76, in _create
    self._cmd('{} {}'.format(create.format(**self.config), options))
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 51, in _cmd
    return cmd(command, self.debug)
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 179, in cmd
    raise OSError(code, feedback)
OSError: [Errno 255] failed to run command: ip tunnel add tun1 mode gretap local 192.168.255.35 remote 192.168.255.61 ttl 255
returned: 
exit code: 255

noteworthy:
cmd 'ip tunnel add tun1 mode gretap local 192.168.255.35 remote 192.168.255.61 ttl 255'
returned (out):

returned (err):
Unknown tunnel mode "gretap"

[[interfaces tunnel tun1]] failed
Commit failed

Details

Difficulty level
Easy (less than an hour)
Version
1.3-beta-202101091250
Why the issue appeared?
Design mistake
Is it a breaking change?
Perfectly compatible

Event Timeline

c-po changed the task status from Open to In progress.Tue, Jan 12, 4:16 PM
c-po claimed this task.
c-po triaged this task as High priority.
c-po changed Difficulty level from Unknown (require assessment) to Easy (less than an hour).
c-po changed Why the issue appeared? from Will be filled on close to Design mistake.
c-po changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.