Sunday 22 December 2019

networking - Are routers limited to number of devices?


I'm going to buy a new router, but, I've just realised that for nearly all routers I've looked at (Belkin, Netgear, D-Link) don't state the maximum number of devices which can connect concurrently.


I have a D600 and have now looked on their website, and through the manual and also find no mention of the limit (which I really need to know if there is one due to debugging another issue).


The new router will be a gift for a friend... The issue is, they have 12 devices in their house, all of which will require WiFi and another 3 devices which are to be hard wired.


Since the router websites don't mention any limitations, can I assume there is a general limit on what the number of concurrent connected devices can do or is the issue more about understanding the more devices connected, the less the performance will be due to the sharing of the resource?


My question is, without trying to determine the limit my self manually (plugging in devices until it's maxed out), is there any way to know that a certain device will work with a given number of concurrent connected devices?



Answer



There's a (theoretical) absolute limit of 65535 concurrent connections. When using SNAT or MASQUERADE, that is. As such, the maximum feasible number of devices would be somewhere near 800, to account for closing and opening connections.


A TCP connection is uniquely defined by local and remote host and port. As such, the router could establish up to 65,535 connections to the same host and port. At the same time, it could establish another 65,535 connections to another host and port.


That means you can have an overall amount of (local addresses) * (local ports = 65,535) * (remote addresses) * (remote ports = 65,535). Of course, some local ports may not be available (services hosted or port forwarding). However, it’s still more than you’ll ever need.


Naturally, this would require a network larger than /24, which poses no problem with OpenWrt and the like. Without aftermarket firmware, most routers are limited to a /24 network, leaving 253 IP addresses for hosts. Wireless connectivity might be further limited, sometimes greatly.


However, you’ll most likely run into resource exhaustion before you’ll get anywhere near these limits. Connection tracking is very hard.


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...