VyOS doesn't appear to handle /31 addresses correctly.
admin@edge# set interfaces ethernet eth0 address 10.3.1.0/31 Invalid value Value validation failed Set failed [edit] admin@edge# set interfaces ethernet eth0 address 10.3.1.1/31 [edit] admin@edge# set interfaces ethernet eth0 address 10.3.1.2/31 Invalid value Value validation failed Set failed [edit]
Tracking it down, it goes back to the ipaddrcheck binary:
admin@edge# ipaddrcheck --is-any-host 10.3.1.0/31 --verbose 10.3.1.0/31 is a network address, not a host address
As far as I can tell, the fix would be adding /31 to:
https://github.com/vyos/ipaddrcheck/blob/8dc86262d85c26b54426f3fa41e1e281c1ad1910/src/ipaddrcheck.c#L314
https://github.com/vyos/ipaddrcheck/blob/8dc86262d85c26b54426f3fa41e1e281c1ad1910/src/ipaddrcheck.c#L489
I'm a bit scared to touch that though. I'm just not sure how nobody noticed /31s were broken in VyOS for a good long time.