Hello,
Well, as I said, this is a special setup. Actually I do want to share physical layer, as this is the simplest infrastructure in this case. What you have described is certenly how it should be in regular conditions, but far too complicated for this case. I need the simplest one. I don't need DHCP as all devices have fixed IP, security is no issue either. Just to make the case clear: each of the devices is preconfigured for a specific network where it will be installed at the end. But before, I have to install something on them. I know all of their IP/netmask/gateway setting beforehand. The infrastructure I want is a tool so I can automate the installation and do it in parallel on many devices, without the need to change addresses during the process.
Actually in smaller setup I am adding many IPs an interface in a Windows PC. And it does what I need. But now I need to be able to reach many more devices. This is why I intend to put a router inbetween and - if anything, - a linux box could be capable of this.
I made a test today with a CentOS7 virtual machine: I have added 100 addresses to the /etc/sysconfig/network-scripts/ifcfg-eth1 (eth0 is facing the "PC", eth1 is facing the switch with the devices) and I have enabled IP forwarding. And it works - I can ping the devices from the PC.
But it looks, that there are still limits, as when I added all 3469 addresses, even though the network service restarted slowly with 'OK', "ip a" shows only 256 addresses on eth1, and "route" as well. And there was no error message...
So maybe the kernel can handle that much addresses, but looks not to be a default feature...
As far as some internet resources can tell, old kernels had this limitation. But current ones does not. I will check if ifcfg-eth1:x kind of aliasing has this limitation too. Would be interesting if not...
[Update]
I have not tested file-based aliasing after all. I have generated a script with "ip add add" and "route add" commands. And that executes correctly and adds all addresses like a charm. And it works.
Thank you.