views:

248

answers:

2

Are there different limitations as to how many connections (sockets) that can be created and use it for data transfer? Does it matter if there is a presence of a home router or a commercial grade router?

For example, different users have different experience with Linksys, D-link, or Netgear routers. Some may be more easily down or "get jammed", especially if they are running network intensive programs (need to unplug the power cord to the router and plug in again). Is it due to the creations of too many sockets or otherwise using too much resource that the router can support?

+4  A: 

Routers that perform Network Address Translation need to maintain a mapping between the internal IP addresses/port numbers and external port numbers for each connection that's active. If the table for these connections becomes full, this can cause problems such as crashing, interruption of existing connections, or failure to establish new connections.

Routers that do not perform NAT - and all of the core Internet routers do no NAT - are generally not susceptible to this, as they are not aware of what connections are passing through them, and handle each packet individually.

bdonlan
+5  A: 

Routers, by themselves, do not care about sockets, unless they are state-ful routers, such as a NAT gateway.

If it is a stateful router, then each connection will take some space in the RAM of the router, and when the RAM runs out, it has to drop old records (or it crashes and, if you're lucky, re-boots, depending on what vendor it is...)

A "connection," in IP terms, is a TCP session (which is identified by source IP, source port, destination IP, destination port, and a sequence number agreement). UDP, or ICMP and friends, don't have "connections" per se, but stateful routers/firewalls usually fake it by assuming that a source IP, source port, destination IP, destination port tuple is a "connection" with some timeout. When no traffic is seen on that connection for some time, it's assumed to die. That timeout may be set between 30 seconds and a day, depending on the firewall/router.

Yes, in general commercial routers/firewalls are beefier, and thus can track more connections when stateful. The best router you can get is often a $400 Linux or xBSD x86 box with a gig of RAM or two and a small flash disk to boot from...

Jon Watte
so i wonder if it is the $60 Linksys wireless router (or D-Link or NetGear), how much RAM do they usually have?
Michelle Lee
Residential routers are weak by almost all means of the word. If you're having trouble, chances are, that's your problem.
Jon Watte