GNS3 / gns3-server

GNS3 server
GNU General Public License v3.0
804 stars 263 forks source link

Very low limit of docker container ports #593

Closed ddompe closed 8 years ago

ddompe commented 8 years ago

With containers it is possible to create datacenter simulation topologies with many ports, (given enough memory you can have large clos networks). However currently you cannot allocate more than 99 ports for containers since the naming convention for the veth pairs surpass the limit of the size for naming interfaces with 99 (https://github.com/GNS3/gns3-server/blob/1.5/gns3server/modules/docker/docker_vm.py#L626) and see also the bug #15 on ubridge. Something like gns3-ext (remove the veth) could make more sense (a power user can find the interface is a veth always by using ethtool).

Also in https://github.com/GNS3/gns3-server/blob/1.5/gns3server/modules/docker/docker_vm.py#L625 there is a limit in 128 docker ports that seems low to me for no reason. The kernel can support thousand of interfaces these days. Something like 4096 won't kill nobody.

julien-duponchelle commented 8 years ago

We need to rollback the removal of veth it's mandatory otherwise it's conflict with network manager see #440 and 59c1e125d3240b2275da7293bebd4ea00a6c7cfd

ddompe commented 8 years ago

Ok, so we need to re-open this bug...

I don't completely follow why network manager ignores interfaces with veth-gns3- prefix... why it wasn't working when was called veth-gns3XXXX? Does network manager looks for double dash?

One quick workaround that would allow us to reach at least 4096 ports would be to use the numbering part in hex instead of decimal.

julien-duponchelle commented 8 years ago

I have revert only the part about veth.

The issue is veth- is hardcoded in Network Manager otherwise he will try to listen for dhcp on this interface

ddompe commented 8 years ago

Yes, but leaving with veth-gns3-ext{} still you will hit the name too long limitation at 99 interfaces.... so the bug is still there

Should it be veth-gns3-e{} and veth-gns3-i{} if you want to keep decimal values....

julien-duponchelle commented 8 years ago

Should be better

julien-duponchelle commented 8 years ago

Thanks for the idea