Page MenuHomeVyOS Platform

GRE tunnel source address 0.0.0.0 error
Closed, ResolvedPublicBUG

Description

Most likely GRE tunnel with local address 0.0.0.0 without remote address required a key.

No any tunnel

vyos@r1-roll# sudo ip tunnel show
[edit]
vyos@r1-roll#

Config:

set interfaces tunnel tun1 encapsulation gre
set interfaces tunnel tun1 source-address '0.0.0.0'
set interfaces tunnel tun1 address 10.10.10.1/30
set interfaces tunnel tun1 multicast 'enable'

Commit:

vyos@r1-roll# commit

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/interfaces-tunnel.py", line 155, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/interfaces-tunnel.py", line 145, in apply
    tun = TunnelIf(**tunnel)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/tunnel.py", line 109, in __init__
    super().__init__(ifname, **kargs)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 269, in __init__
    self._create()
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/tunnel.py", line 134, in _create
    self._cmd(cmd.format(**self.config))
  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 161, in cmd
    raise OSError(code, feedback)
PermissionError: [Errno 1] failed to run command: ip tunnel add tun1 mode gre local 0.0.0.0 tos inherit ttl 64
returned: 
exit code: 1

noteworthy:
cmd 'ip tunnel add tun1 mode gre local 0.0.0.0 tos inherit ttl 64'
returned (out):

returned (err):
add tunnel "gre0" failed: File exists

[[interfaces tunnel tun1]] failed
Commit failed
[edit]
vyos@r1-roll# 
[edit]
vyos@r1-roll# sudo ip tunnel show
gre0: gre/ip remote any local any ttl inherit nopmtudisc
[edit]
vyos@r1-roll#

Details

Difficulty level
Normal (likely a few hours)
Version
VyOS 1.4-rolling-202108300430, VyOS 1.3-beta-202108300342
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

Add key to successful commit.

set interfaces tunnel tun1 parameters ip key '1'
Viacheslav renamed this task from GRE tunnel source address 0.0.0.0 error to GRE tunnel source address without remote address error.Aug 30 2021, 3:01 PM
Viacheslav updated the task description. (Show Details)
Viacheslav renamed this task from GRE tunnel source address without remote address error to GRE tunnel source address 0.0.0.0 error.Aug 30 2021, 3:03 PM
Viacheslav updated the task description. (Show Details)

PR https://github.com/vyos/vyos-1x/pull/984

vyos@r1-roll# set interfaces tunnel tun1 encapsulation gre
[edit]
vyos@r1-roll# set interfaces tunnel tun1 source-address '0.0.0.0'
[edit]
vyos@r1-roll# set interfaces tunnel tun1 address 10.10.10.1/30
[edit]
vyos@r1-roll# set interfaces tunnel tun1 multicast 'enable'
[edit]
vyos@r1-roll# commit
[ interfaces tunnel tun1 ]
Tunnel parameters ip key must be set!
[[interfaces tunnel tun1]] failed
Commit failed
[edit]
vyos@r1-roll# set interfaces tunnel tun1 parameters ip key 55
[edit]
vyos@r1-roll# commit
[edit]
vyos@r1-roll#

This errors out on VyOS 1.2.8

[ interfaces tunnel tun1 ]
add tunnel "gre0" failed: File exists
interfaces tunnel tun1: error creating tunnel interface

[[interfaces tunnel tun1]] failed
Commit failed
[edit]

Can you also add this to 1.2.9?

syncer moved this task from Needs Triage to Finished on the VyOS 1.2 Crux (VyOS 1.2.9) board.