Netplan can't bind to more than 512 IPv4 addresses

Bug #1802897 reported by Martin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netplan
New
Undecided
Unassigned

Bug Description

As per title. Migrating a proxy server from 16.04 Ubuntu to 18.04 and hitting issues with netplan. I've had no issues binding to 900~ IPv4 addresses via interfaces.d on 16.04.

My netplan folder has two config files. One for the server static IP -

network:
  version: 2
  ethernets:
    eth0:
      addresses: [10.80.11.76/16]
      gateway4: 10.80.0.1
      nameservers:
        addresses: [10.80.0.11,10.80.0.12]

And then a secondary one that is generated by this bash script:

#!/bin/bash
cat << EOF
network:
  version: 2
  bridges:
EOF
 for i in {100..999}; do
  echo " br0:"
  echo " addresses: [10.70.${i::1}.$((10#${i:1:3}))/16]"
  echo " interfaces: [vlan1]"
 done
echo " vlans:"
cat << EOF
    vlan1:
      accept-ra: no
      id: 1
      link: eth0
EOF

This breaks upon reboot and binds to nothing instead.
Changing the for to only go from 100 to 600 (slightly below the 512 limit) works just fine.
As a note, this is done on an LXD container.

Testing the configuration gives no output in any case and just returns a status code 0 every time I tried it.

https://netplan.io/faq#test-a-configuration

Workaround: Make netplan only create the br0 interface and add the IPs via 'ip addr add' elsewhere.

Revision history for this message
Martin (c0rn3j) wrote :

Configs as an attachment since the tracker eats spaces and tabs.

Martin (c0rn3j)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.