Live data from Hacker News

65535 interfaces ought to be enough for anybody

aakinshin.net

41–50 of 82 posts

Re: 65535 interfaces ought to be enough for anybody

#41
post #22

Also: 65535 tcp-ports ought to be enough for anybody [1] 65534 hardlinks ought to be enough for anybody [2] [1] http://stackoverflow.com/questions/113224/what-is-the-larges... [2] http://unix.stackexchange.com/questions/5629/is-there-a-limi...

I find it extremely awkward that we actually use numbers for ports. Port 80 is typically used for HTTP, but there's nothing preventing another application from using port 80. Why not call the port "HTTP" instead. Better yet why not give it an integer range of ports to go along with the naming - Eg MyApp[1], MyApp[2]. If you want to hide a port from being probed then give it a GUID as a name. No more port scans.

Portmap[1] lets you use names instead of port numbers. A server just grabs an arbitrary port number and then registers itself with the portmap server. When you want to connect from a client, you first ask the portmap server for the port number.

[1] https://en.wikipedia.org/wiki/Portmap

Re: 65535 interfaces ought to be enough for anybody

#42
post #41

Earlier quoted context omitted.

I find it extremely awkward that we actually use numbers for ports. Port 80 is typically used for HTTP, but there's nothing preventing another application from using port 80. Why not call the port "HTTP" instead. Better yet why not give it an integer range of ports to go along with the naming - Eg MyApp[1], MyApp[2]. If you want to hide a port from being probed then give it a GUID as a name. No more port scans.

Portmap[1] lets you use names instead of port numbers. A server just grabs an arbitrary port number and then registers itself with the portmap server. When you want to connect from a client, you first ask the portmap server for the port number. [1] https://en.wikipedia.org/wiki/Portmap

As an alternative, predating Portmap by around 700 RFCs: tcpmux[0]. Everything connects to port 1 and asks for services by name.

[0]: https://tools.ietf.org/html/rfc1078

Re: 65535 interfaces ought to be enough for anybody

#46

File this under 'premature optimization bites after 12 years'.

Why makes you say it is "premature"? Isn't it possible that they hit that limit because the project is a monolithic monster? Or because it uses libraries that waste those resources?

Re: 65535 interfaces ought to be enough for anybody

#47

Earlier quoted context omitted.

0 Interfaces 1 Interface ... 65535 Interfaces

I can't tell if you're joking, but when you're counting a quantity, you don't start from 0.

Quantity as in great amount? Either way, sounds like the worst kind of premature optimization to save one bit's worth to lose the ability to ever have the quantity be zero.

Re: 65535 interfaces ought to be enough for anybody

#48

Earlier quoted context omitted.

Well, for counts 32 bits is enough, unless you count something really small, like every individual byte in something. And for counts 64 bits should be enough, since it's 20 billion billion.

For counts of things you have in memory, 32 bits is usually enough -- even if each thing is just 8 bytes, 2^32 of those objects would require 32 GB.

32GB isn't an exceptional amount of memory these days.

Re: 65535 interfaces ought to be enough for anybody

#49
post #39

Earlier quoted context omitted.

I find it extremely awkward that we actually use numbers for ports. Port 80 is typically used for HTTP, but there's nothing preventing another application from using port 80. Why not call the port "HTTP" instead. Better yet why not give it an integer range of ports to go along with the naming - Eg MyApp[1], MyApp[2]. If you want to hide a port from being probed then give it a GUID as a name. No more port scans.

Is it possible to file an RFC to IETF for these kinds of solutions? I see lot of great ideas but never see anybody proposing them anywhere, why?

This particular idea is bad.

Re: 65535 interfaces ought to be enough for anybody

#50

Earlier quoted context omitted.

The same is true of 32 bit numbers. 64 bits might finally be enough. crosses fingers

Well, for counts 32 bits is enough, unless you count something really small, like every individual byte in something. And for counts 64 bits should be enough, since it's 20 billion billion.

Well, for counts 16 bits is enough, unless you count something really small, like every individual byte in something. And for counts 32 bits should be enough, since it's 4 billion.

someone somewhere 20 years ago.

Post reply on HN