I try to add 8k IPs to my network interface with netplan, after adding all IPs to yaml netplan config and apply changes, I get the following error:

/run/systemd/network/10-netplan-enp5s0f0.network:1030: Failed to parse file: Argument list too long

it looks like at the moment netplan can't parse more than 1030 IPs, can anyone help me to resolve this issue ?

  • Crossposted: unix.stackexchange.com/questions/594004/… – steeldriver Jun 20 at 13:03
  • show us the exact command you used. If you used $ sudo bla bla then try $ sudo su followed by # bla bla Where the $ and the # are the command line prompts for regular user, $, and root, #. Why try this? Because the maximum argument length using sudo is pathetic. – Doug Smythies Jun 20 at 13:40
  • i execute the command "netplan apply" as root, so is not issue with user privileges ! – enso anis Jun 20 at 14:21
  • 1
    If it is just a netplan limitation, could you work around it by adding IP addresses from a script using ip addr add command instead? A script might be easier to maintain than an argument list of 1030 ip addresses. – jtessier72 Jun 20 at 15:38
  • there is still an argument list limit, even for root, it is just way bigger than the sudo limit. There is not a specific number, as it is a function of the per list string size. Try @jtessier72 's suggestion. – Doug Smythies Jun 20 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.