The limit is 4096 because of the limits of Ethernet. Additional switches / network cores can allow an another 4096, but they would be separate and distinct networks.

BTW, this is ridiculously easy to test. Just instantiate interfaces for vlan 1-4095. There is no actual need to even have the vlans live on the netwprk interface to see if the kernel lets you do this. If you set up two test boxes with a crossover cable, you couls put all of them into a live test setup, bind distinct 10. networks to each.

Many moons ago I used to write NIC drivers. There may be internal constraints based on the drivers themselves, as the drivers may rely on hardware features to mask which vlanids are responded to. Obviously in a trunking situation you don;t want to generate interrupts, or buffer packets for VLANs you don't care about. Some NIC implement this as a 4096-bit mask. Others as a list of tags. In the latter implementation, the tag lists are limited, so you may have issues trying to get the driver to allow that N'th vlanid.

With modern kernels, there is no limit, really, to the number of address aliases or sub interfaces. The limitations will come in with the driver authors not anticipating the need to support this, or support it "well." So if this is a physical machine, you may need to find NICs which like this setup. Obviously if the customer is already doing this, they will already know what works.

You may also see higher memory footprint to support this many IP's and interfaces. Plus your routing table will be enormous.

I have one box with all our vlans plumbed to it, about 120, it works. But you are upping that by potentially 40x....

-- Bob

-- Bob