Page MenuHomeVyOS Platform

Configuring invalid IPv6 EUI64 address results in "OSError: illegal IP address string passed to inet_pton"
Closed, ResolvedPublicBUG


Initiallly reported via:

cpo@LR1.wue3# set interfaces ethernet eth0 ipv6 address eui64 2006:ab00:abe1::2/127
cpo@LR1.wue3# 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 stable version of VyOS
  the code is available at
- Contact us using the online help desk
- 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:      2021-03-16 21:50:30
Image Version:    VyOS 1.4-vrf-202103141559
Release Train:    sagitta

Built by:
Built on:         Sun 14 Mar 2021 15:59 UTC
Build UUID:       63c7a3e8-be9d-4dee-b66f-d3b8cc8787c8
Build Commit ID:  52008c095db540

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

Hardware vendor:  VMware, Inc.
Hardware model:   VMware Virtual Platform
Hardware S/N:     VMware-42 3f 67 73 77 df c4 80-42 c9 42 af ff 15 de 0b
Hardware UUID:    73673f42-df77-80c4-42c9-42afff15de0b

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/", line 157, in <module>
  File "/usr/libexec/vyos/conf_mode/", line 146, in apply
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/", line 355, in update
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/", line 1232, in update
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/", line 550, in add_ipv6_eui64_address
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/", line 808, in add_addr
    elif not is_intf_addr_assigned(self.ifname, addr):
  File "/usr/lib/python3/dist-packages/vyos/", line 49, in is_intf_addr_assigned
    return _is_intf_addr_assigned(intf, ip, mask)
  File "/usr/lib/python3/dist-packages/vyos/", line 84, in _is_intf_addr_assigned
    if not _are_same_ip(address, ip_addr):
  File "/usr/lib/python3/dist-packages/vyos/", line 44, in _are_same_ip
    return inet_pton(f_one, one) == inet_pton(f_one, two)
OSError: illegal IP address string passed to inet_pton

cmd 'ethtool -K eth0 ufo off'
returned (out):

returned (err):
Cannot change udp-fragmentation-offload

[[interfaces ethernet eth0]] failed
Commit failed


Difficulty level
Normal (likely a few hours)
Why the issue appeared?
Design mistake
Is it a breaking change?
Stricter validation
Issue type
Bug (incorrect behavior)

Event Timeline

VyOS 1.2.7-rc1 reports:

[ interfaces ethernet eth0 ipv6 address eui64 2006:ab00:abe1::2/127 ]
Error: Prefix lenght is 127.  It must be 64.

On VyOS 1.3+ the eui64 node uses the ipv6-prefix validator, where /127 is a valid prefix - but we must only allow /64 prefixes.

Even worse, older systems allowed an eui64 prefix of eui64 2006:ab00:abe1::2/64 which is not a prefix but a host address.


  • short term: Add a custom (ipv6-FOOBAR) validator which allows any kind of IPv4 /64 address
  • long-term: Add a custom validator which only allows /64 prefixes without host bits and write a migration script that collects all eui64 prefixes and migrates them to the /64 prefix which belongs to the host address.

Ok so I need to allocate a /127 to the eth interfaces.

Ummm this is a no go for now?
What can I do to move this forward?

Assign it with set interfaces ethernet eth0 address 2006:ab00:abe1::2/127

Ok so the IP assignment of the p2p on eth0 needs to be


So how is this an invalid IP allocation?

I'm being told over and over that this is the IP I need to use.

i tried the following command as it still failed with OSError

set interfaces ethernet eth0 ipv6 address eui64 2606:ab00:abe1::2/127

Is it something with the eui64 in the syntax ?

I guess I'm totally confused at how this works.

I got it to grab an ipv6 address with

set interfaces ethernet eth0 ipv6 address eui64 2606:ab00:ab1:b::/64

But instead of having the IP address, I want that interface to have 2606:ab00:ab1:b::2 it now has


@juesor, please try my command; it doesn't have ipv6 or eui64 in it and I just double-checked that it works on 1.3.

@juesor there is a difference in an IPv6 address you explicitly mention as 2606:ab00:abe1::2/127 and an IPv6 EUI64 address.

EUI64 uses a bas /64 prefix - e.g. 2001:db8::/64 and then uses this base prefix to calculate the actual eui64 address upon it. See for more information.

You need the command that @stepler suggested: set interfaces ethernet eth0 address 2006:ab00:abe1::2/127

Nevertheless you have discovered a bug and we are thankful for this.

c-po changed Why the issue appeared? from Will be filled on close to Design mistake.
SrividyaA set Issue type to Bug (incorrect behavior).Aug 31 2021, 2:55 PM