Now that we have IPv6 – do we need TCP/UDP port numbers anymore?
TCP/UDP port numbers are used to multiplex traffic to the same IP, so multiple services can be made reachable. I can't find docs when searching to understand if this is the only reason they exist but that is what I believe is their only purpose.
Recently I've started learning about Tor - you can make single service reachable through the Tor network with a Hidden Service address like: 3g2upl4pq6kufc4m.onion
Like IPv6, "Onion addresses" aren't starved for address space. With Onion addresses you can only host a single service behind the address. It's trivial to create and bring one up to host a service. I argue we can use IPv6 similarly.
Getting rid of TCP/UDP ports - the positives?:
1) We could chop off 4 bytes from TCP/UDP headers (2 x 16-bit for source/dest port)
2) Routing traffic to the right bound service in the kernel's networking stack might be made simpler.
3) Without ports you can't assume from an address what type of service is hosted there - with ports we assume port 80 is a webserver. People might start claiming addresses that end in ':BEEF]' to associate with webservers, though. WHERE"S THE BEEF?!
4) Port scans would become [EXHAUSTIVE] prefix/subnet scans, and it'd be harder to be sure you're fingerprinting the same host.
Some negatives:
1) People are used to reaching the same host at the same IP but when using a different port. This hasn't always been true with things like NAT and Haproxy, but if we got rid of ports you'd have to keep a note of which address hosts SSH. Ports make this less cumbersome.
2) Someone could maliciously try claiming every address in an advertised/routed/reachable prefix to starve other users of addresses - how possible is this? Any comment, NSA?
I don't think this will happen but I'd like to know other reasons why we need port numbers :>