View Single Post
  #3   (View Single Post)  
Old 5th December 2011
rocket357's Avatar
rocket357 rocket357 is offline
Real Name: Jonathon
Wannabe OpenBSD porter
 
Join Date: Jun 2010
Location: 127.0.0.1
Posts: 429
Default

Funny things like that happen in a base-2 world...

But seriously, 65536 is 2^16 (16 bits). Why 16? Because it's base 2, of course...so it's really 2^(2^4), which is 2^(2^(2^2)). (Ok, so I'm making that part up even if it is mathematically correct).

So why is the number of ports the same number minus one? Truth is, there aren't "more" ip addresses than ports. Ports are zero-based (port 0 is reserved), whereas the count of ip addresses is one-based. They hold the same number of items.
__________________
Linux/Network-Security Engineer by Profession. OpenBSD user by choice.
Reply With Quote