Page MenuHomeVyOS Platform

Cannot add multiple pseudo-ethernet interfaces with the same mac and anycast-gateway option
Open, HighPublicBUG

Description

Cannot add multiple pseudo-ethernet interfaces with the same mac and anycast-gateway option.
Existing configuration:

set interfaces bridge br0 enable-vlan
set interfaces bridge br0 member interface vxlan1 disable-learning
set interfaces bridge br0 vif 200 vrf 'RED'
set interfaces bridge br0 vif 201 vrf 'RED'
set interfaces bridge br0 vif 202 vrf 'RED'
set interfaces bridge br0 vif 203 vrf 'RED'
set interfaces bridge br0 vif 204 vrf 'RED'
set interfaces bridge br0 vif 205 vrf 'RED'
set interfaces bridge br0 vif 206 vrf 'RED'
set interfaces bridge br0 vif 207 vrf 'RED'

set interfaces vxlan vxlan1 parameters external
set interfaces vxlan vxlan1 parameters nolearning
set interfaces vxlan vxlan1 parameters vni-filter
set interfaces vxlan vxlan1 source-address '3.3.3.3'
set interfaces vxlan vxlan1 vlan-to-vni 200 vni '10200'
set interfaces vxlan vxlan1 vlan-to-vni 201 vni '10201'
set interfaces vxlan vxlan1 vlan-to-vni 202 vni '10202'
set interfaces vxlan vxlan1 vlan-to-vni 203 vni '10203'
set interfaces vxlan vxlan1 vlan-to-vni 204 vni '10204'
set interfaces vxlan vxlan1 vlan-to-vni 205 vni '10205'
set interfaces vxlan vxlan1 vlan-to-vni 206 vni '10206'
set interfaces vxlan vxlan1 vlan-to-vni 207 vni '10207'

set interfaces pseudo-ethernet peth200 address '192.168.201.1/24'
set interfaces pseudo-ethernet peth200 anycast-gateway
set interfaces pseudo-ethernet peth200 ip enable-arp-accept
set interfaces pseudo-ethernet peth200 mac '00:aa:aa:aa:aa:aa'
set interfaces pseudo-ethernet peth200 source-interface 'br0.200'
set interfaces pseudo-ethernet peth200 vrf 'RED'

Commands to add:

set interfaces pseudo-ethernet peth201 address '192.168.211.1/24'
set interfaces pseudo-ethernet peth201 anycast-gateway
set interfaces pseudo-ethernet peth201 ip enable-arp-accept
set interfaces pseudo-ethernet peth201 mac '00:aa:aa:aa:aa:aa'
set interfaces pseudo-ethernet peth201 source-interface 'br0.201'
set interfaces pseudo-ethernet peth201 vrf 'RED'

set interfaces pseudo-ethernet peth202 address '192.168.212.1/24'
set interfaces pseudo-ethernet peth202 anycast-gateway
set interfaces pseudo-ethernet peth202 ip enable-arp-accept
set interfaces pseudo-ethernet peth202 mac '00:aa:aa:aa:aa:aa'
set interfaces pseudo-ethernet peth202 source-interface 'br0.202'
set interfaces pseudo-ethernet peth202 vrf 'RED'


set interfaces pseudo-ethernet peth203 address '192.168.213.1/24'
set interfaces pseudo-ethernet peth203 anycast-gateway
set interfaces pseudo-ethernet peth203 ip enable-arp-accept
set interfaces pseudo-ethernet peth203 mac '00:aa:aa:aa:aa:aa'
set interfaces pseudo-ethernet peth203 source-interface 'br0.203'
set interfaces pseudo-ethernet peth203 vrf 'RED'


set interfaces pseudo-ethernet peth204 address '192.168.214.1/24'
set interfaces pseudo-ethernet peth204 anycast-gateway
set interfaces pseudo-ethernet peth204 ip enable-arp-accept
set interfaces pseudo-ethernet peth204 mac '00:aa:aa:aa:aa:aa'
set interfaces pseudo-ethernet peth204 source-interface 'br0.204'
set interfaces pseudo-ethernet peth204 vrf 'RED'


set interfaces pseudo-ethernet peth205 address '192.168.215.1/24'
set interfaces pseudo-ethernet peth205 anycast-gateway
set interfaces pseudo-ethernet peth205 ip enable-arp-accept
set interfaces pseudo-ethernet peth205 mac '00:aa:aa:aa:aa:aa'
set interfaces pseudo-ethernet peth205 source-interface 'br0.205'
set interfaces pseudo-ethernet peth205 vrf 'RED'


set interfaces pseudo-ethernet peth206 address '192.168.216.1/24'
set interfaces pseudo-ethernet peth206 anycast-gateway
set interfaces pseudo-ethernet peth206 ip enable-arp-accept
set interfaces pseudo-ethernet peth206 mac '00:aa:aa:aa:aa:aa'
set interfaces pseudo-ethernet peth206 source-interface 'br0.206'
set interfaces pseudo-ethernet peth206 vrf 'RED'


set interfaces pseudo-ethernet peth207 address '192.168.217.1/24'
set interfaces pseudo-ethernet peth207 anycast-gateway
set interfaces pseudo-ethernet peth207 ip enable-arp-accept
set interfaces pseudo-ethernet peth207 mac '00:aa:aa:aa:aa:aa'
set interfaces pseudo-ethernet peth207 source-interface 'br0.207'
set interfaces pseudo-ethernet peth207 vrf 'RED'

After commit the system throughs errors

vyos@vyos# commit
[ interfaces pseudo-ethernet peth202 ]
Traceback (most recent call last):
  File "/usr/libexec/vyos/services/vyos-configd", line 109, in run_script
    config_manager.apply(script_name, c)
  File "/usr/lib/python3/dist-packages/vyos/configmanager.py", line 136, in apply
    mod.apply(config_dict)
  File "/usr/libexec/vyos/conf_mode/interfaces_pseudo-ethernet.py", line 137, in apply
    p.update(peth)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/macvlan.py", line 97, in update
    self._create_anycast_gateway(
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/macvlan.py", line 72, in _create_anycast_gateway
    bridge.add_local_fdb_entry(mac)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/bridge.py", line 303, in add_local_fdb_entry
    self.set_interface('add_local_fdb_entry', mac_address.lower())
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 196, in set_interface
    return self._set_command(self.config, name, value)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 123, in _set_command
    return self._command_set[name].get('format', lambda _: _)(self._cmdl(shlex.split(cmd)))
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 65, in _cmdl
    return cmdl(command, self.debug, env=env, netns=netns, vrf=vrf)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/utils/process.py", line 217, in cmdl
    raise OSError(code, feedback)
OSError: [Errno 255] failed to run command: bridge fdb add 00:aa:aa:aa:aa:aa dev br0 self local
returned:
exit code: 255

[[interfaces pseudo-ethernet peth202]] failed
[ interfaces pseudo-ethernet peth206 ]
Traceback (most recent call last):
  File "/usr/libexec/vyos/services/vyos-configd", line 109, in run_script
    config_manager.apply(script_name, c)
  File "/usr/lib/python3/dist-packages/vyos/configmanager.py", line 136, in apply
    mod.apply(config_dict)
  File "/usr/libexec/vyos/conf_mode/interfaces_pseudo-ethernet.py", line 137, in apply
    p.update(peth)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/macvlan.py", line 97, in update
    self._create_anycast_gateway(
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/macvlan.py", line 72, in _create_anycast_gateway
    bridge.add_local_fdb_entry(mac)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/bridge.py", line 303, in add_local_fdb_entry
    self.set_interface('add_local_fdb_entry', mac_address.lower())
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 196, in set_interface
    return self._set_command(self.config, name, value)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 123, in _set_command
    return self._command_set[name].get('format', lambda _: _)(self._cmdl(shlex.split(cmd)))
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 65, in _cmdl
    return cmdl(command, self.debug, env=env, netns=netns, vrf=vrf)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/utils/process.py", line 217, in cmdl
    raise OSError(code, feedback)
OSError: [Errno 255] failed to run command: bridge fdb add 00:aa:aa:aa:aa:aa dev br0 self local
returned:
exit code: 255

[[interfaces pseudo-ethernet peth206]] failed
[ interfaces pseudo-ethernet peth205 ]
Traceback (most recent call last):
  File "/usr/libexec/vyos/services/vyos-configd", line 109, in run_script
    config_manager.apply(script_name, c)
  File "/usr/lib/python3/dist-packages/vyos/configmanager.py", line 136, in apply
    mod.apply(config_dict)
  File "/usr/libexec/vyos/conf_mode/interfaces_pseudo-ethernet.py", line 137, in apply
    p.update(peth)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/macvlan.py", line 97, in update
    self._create_anycast_gateway(
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/macvlan.py", line 72, in _create_anycast_gateway
    bridge.add_local_fdb_entry(mac)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/bridge.py", line 303, in add_local_fdb_entry
    self.set_interface('add_local_fdb_entry', mac_address.lower())
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 196, in set_interface
    return self._set_command(self.config, name, value)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 123, in _set_command
    return self._command_set[name].get('format', lambda _: _)(self._cmdl(shlex.split(cmd)))
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 65, in _cmdl
    return cmdl(command, self.debug, env=env, netns=netns, vrf=vrf)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/utils/process.py", line 217, in cmdl
    raise OSError(code, feedback)
OSError: [Errno 255] failed to run command: bridge fdb add 00:aa:aa:aa:aa:aa dev br0 self local
returned:
exit code: 255

[[interfaces pseudo-ethernet peth205]] failed
[ interfaces pseudo-ethernet peth207 ]
Traceback (most recent call last):
  File "/usr/libexec/vyos/services/vyos-configd", line 109, in run_script
    config_manager.apply(script_name, c)
  File "/usr/lib/python3/dist-packages/vyos/configmanager.py", line 136, in apply
    mod.apply(config_dict)
  File "/usr/libexec/vyos/conf_mode/interfaces_pseudo-ethernet.py", line 137, in apply
    p.update(peth)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/macvlan.py", line 97, in update
    self._create_anycast_gateway(
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/macvlan.py", line 72, in _create_anycast_gateway
    bridge.add_local_fdb_entry(mac)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/bridge.py", line 303, in add_local_fdb_entry
    self.set_interface('add_local_fdb_entry', mac_address.lower())
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 196, in set_interface
    return self._set_command(self.config, name, value)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 123, in _set_command
    return self._command_set[name].get('format', lambda _: _)(self._cmdl(shlex.split(cmd)))
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 65, in _cmdl
    return cmdl(command, self.debug, env=env, netns=netns, vrf=vrf)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/utils/process.py", line 217, in cmdl
    raise OSError(code, feedback)
OSError: [Errno 255] failed to run command: bridge fdb add 00:aa:aa:aa:aa:aa dev br0 self local
returned:
exit code: 255

[[interfaces pseudo-ethernet peth207]] failed
[ interfaces pseudo-ethernet peth204 ]
Traceback (most recent call last):
  File "/usr/libexec/vyos/services/vyos-configd", line 109, in run_script
    config_manager.apply(script_name, c)
  File "/usr/lib/python3/dist-packages/vyos/configmanager.py", line 136, in apply
    mod.apply(config_dict)
  File "/usr/libexec/vyos/conf_mode/interfaces_pseudo-ethernet.py", line 137, in apply
    p.update(peth)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/macvlan.py", line 97, in update
    self._create_anycast_gateway(
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/macvlan.py", line 72, in _create_anycast_gateway
    bridge.add_local_fdb_entry(mac)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/bridge.py", line 303, in add_local_fdb_entry
    self.set_interface('add_local_fdb_entry', mac_address.lower())
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 196, in set_interface
    return self._set_command(self.config, name, value)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 123, in _set_command
    return self._command_set[name].get('format', lambda _: _)(self._cmdl(shlex.split(cmd)))
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 65, in _cmdl
    return cmdl(command, self.debug, env=env, netns=netns, vrf=vrf)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/utils/process.py", line 217, in cmdl
    raise OSError(code, feedback)
OSError: [Errno 255] failed to run command: bridge fdb add 00:aa:aa:aa:aa:aa dev br0 self local
returned:
exit code: 255

[[interfaces pseudo-ethernet peth204]] failed
[ interfaces pseudo-ethernet peth201 ]
Traceback (most recent call last):
  File "/usr/libexec/vyos/services/vyos-configd", line 109, in run_script
    config_manager.apply(script_name, c)
  File "/usr/lib/python3/dist-packages/vyos/configmanager.py", line 136, in apply
    mod.apply(config_dict)
  File "/usr/libexec/vyos/conf_mode/interfaces_pseudo-ethernet.py", line 137, in apply
    p.update(peth)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/macvlan.py", line 97, in update
    self._create_anycast_gateway(
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/macvlan.py", line 72, in _create_anycast_gateway
    bridge.add_local_fdb_entry(mac)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/bridge.py", line 303, in add_local_fdb_entry
    self.set_interface('add_local_fdb_entry', mac_address.lower())
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 196, in set_interface
    return self._set_command(self.config, name, value)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 123, in _set_command
    return self._command_set[name].get('format', lambda _: _)(self._cmdl(shlex.split(cmd)))
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 65, in _cmdl
    return cmdl(command, self.debug, env=env, netns=netns, vrf=vrf)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/utils/process.py", line 217, in cmdl
    raise OSError(code, feedback)
OSError: [Errno 255] failed to run command: bridge fdb add 00:aa:aa:aa:aa:aa dev br0 self local
returned:
exit code: 255

[[interfaces pseudo-ethernet peth201]] failed
[ interfaces pseudo-ethernet peth203 ]
Traceback (most recent call last):
  File "/usr/libexec/vyos/services/vyos-configd", line 109, in run_script
    config_manager.apply(script_name, c)
  File "/usr/lib/python3/dist-packages/vyos/configmanager.py", line 136, in apply
    mod.apply(config_dict)
  File "/usr/libexec/vyos/conf_mode/interfaces_pseudo-ethernet.py", line 137, in apply
    p.update(peth)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/macvlan.py", line 97, in update
    self._create_anycast_gateway(
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/macvlan.py", line 72, in _create_anycast_gateway
    bridge.add_local_fdb_entry(mac)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/bridge.py", line 303, in add_local_fdb_entry
    self.set_interface('add_local_fdb_entry', mac_address.lower())
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 196, in set_interface
    return self._set_command(self.config, name, value)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 123, in _set_command
    return self._command_set[name].get('format', lambda _: _)(self._cmdl(shlex.split(cmd)))
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 65, in _cmdl
    return cmdl(command, self.debug, env=env, netns=netns, vrf=vrf)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/utils/process.py", line 217, in cmdl
    raise OSError(code, feedback)
OSError: [Errno 255] failed to run command: bridge fdb add 00:aa:aa:aa:aa:aa dev br0 self local
returned:
exit code: 255

[[interfaces pseudo-ethernet peth203]] failed
Commit failed
[edit]
vyos@vyos#

The second commit success. But after reboot only one pseudo-ethernet exists. Also bgp show commands shows that bgp configuration is clear but it exists.
This bug was found by our community.
https://forum.vyos.io/t/boot-configuration-fails-when-multiple-pseudo-ethernet-anycast-gateways-share-the-same-mac/17644
I tested this solution and it works. But need to investigate how to solve it correctly.

Details

Version
VyOS 2026.08.27-0133-rolling
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

a.apostoliuk triaged this task as High priority.