Page MenuHomeVyOS Platform

vyos-container: cannot configure ethernet interface
Closed, ResolvedPublicBUG


Usually VyOS in a container utilized veth interfaces, and these interfaces don't have the same params as HW ethernet.

[email protected]# set interfaces ethernet eth0 address
[email protected]# commit
[ interfaces ethernet eth0 ]
VyOS had an issue completing a command.

We are sorry that you encountered a problem while using VyOS.
There are a few things you can do to help us (and yourself):
- Make sure you are running the latest version of the code available at
- Consult the forum to see how to handle this issue
- Join our community on slack where our users exchange help and advice

When reporting problems, please include as much information as possible:
- do not obfuscate any data (feel free to contact us privately if your 
  business policy requires it)
- and include all the information presented below

Report Time:      2020-05-26 09:31:52
Image Version:    VyOS 1.3-rolling-202005260117
Release Train:    equuleus

Built by:         [email protected]
Built on:         Tue 26 May 2020 01:17 UTC
Build UUID:       c9832ae0-9cab-4287-bb2d-5d9bdfa02312
Build Commit ID:  a29347ca9dd260

Architecture:     x86_64
Boot via:         installed image
System type:      VMware guest

Hardware vendor:  VMware, Inc.
Hardware model:   VMware Virtual Platform
Hardware S/N:     VMware-56 4d 1b 13 b4 a5 91 c2-cb d4 f9 d3 0d fc 09 51
Hardware UUID:    131b4d56-a5b4-c291-cbd4-f9d30dfc0951

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/", line 303, in <module>
  File "/usr/libexec/vyos/conf_mode/", line 247, in apply
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/", line 449, in add_ipv6_eui64_address
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/", line 679, in add_addr
    self._cmd(f'ip addr add "{addr}" dev "{self.ifname}"')
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/", line 48, in _cmd
    return cmd(command, self.debug)
  File "/usr/lib/python3/dist-packages/vyos/", line 178, in cmd
    raise OSError(code, feedback)
FileNotFoundError: [Errno 2] failed to run command: ip addr add "fe80::cc42:34ff:fede:d412/64" dev "eth0"
exit code: 2

cmd '/sbin/ethtool --show-pause eth0'
returned (out):
Pause parameters for eth0:
returned (err):
Cannot get device pause settings: Operation not supported
cmd 'ip addr add "fe80::cc42:34ff:fede:d412/64" dev "eth0"'
returned (out):

returned (err):
RTNETLINK answers: Permission denied

[[interfaces ethernet eth0]] failed
Commit failed

Reproducing steps:

  1. Create veth

ip link add vyos-r1-tmp type veth peer name vyos-r1-eth0

  1. Run VyOS container

docker run -d --name R1 --net=none --privileged -v /lib/modules:/lib/modules rolling:20200526 /sbin/init

  1. Attach network interface
ip link set netns `docker inspect --format '{{.State.Pid}}' R1` dev vyos-r1-tmp name eth0 up
ip link set vyos-r1-eth0 up
  1. Enter to the container and configure eth0 interface
docker exec -it R1 su vyos
set interfaces ethernet eth0 address


Difficulty level
Unknown (require assessment)
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

I'm seeing the same problem with Xen HVM guests, where the paravirtualized nic-driver "xen_netfront" doesn't seem to support "ethtool -g".. ref T3347

This should now work aswell with the latest vyos 1.3 versions!

erkin renamed this task from vyos-container: does not possible to configure ethernet interface to vyos-container: cannot configure ethernet interface.Aug 30 2021, 5:59 AM
erkin set Issue type to Bug (incorrect behavior).
erkin removed a subscriber: Active contributors.
Viacheslav changed the task status from Open to Needs testing.Jul 26 2022, 8:02 PM
Viacheslav changed the task status from Needs testing to In progress.Mon, Mar 13, 1:11 PM
Viacheslav claimed this task.

PR for 1.4

[email protected]# set interfaces ethernet eth0 address
[email protected]# commit
[ interfaces ethernet eth0 ]
sudo: unable to resolve host 91800359325b: System error

[email protected]# run show int
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0                         u/u  WAN
lo                            u/u  
[email protected]#

PR for 1.3