Understanding the Physical Aspect of Networking Ports

networkingportport-forwarding

I stumbled across this article which, unlike any ambiguous article I've read, states that my

"pencil-thin network cable (or wireless network adapter) at the back of your computer contains 65,536 microscopic pathways inside it."

I've always been told that a port is just a number (not a wire) used to distinguish different virtual connections from each other, so how can these two explanations co-exist?

  • Also, this can't mean that some of the network cable isn't being used to transfer signals when a port isn't being used does it?

The article also said that

packets are required to stop at each network node and:

  1. Find an open port,
  2. Pass the identification test that will allow it through that port, and if not,
  3. Move to the next port and try again, until it is allowed to pass through the toll.
  • I thought packets contained a specific destination port, so why would they search for a new open port?
  • Finally, what does it take to pass an identification test?

Best Answer

I've always been told that a port is just a number (not a wire) used to distinguish different virtual connections from each other, so how can these two explanations co-exist?

The paragraph you quoted is heavy with metaphors. At transport layer, ports are just numbers in packets; they are not physical.

The physical, or 'link', layer, does not know anything about TCP/UDP ports, nor about IP addresses – it only transfers series of bits from one end to another.

Also, this can't mean that some of the network cable isn't being used to transfer signals when a port isn't being used does it?

No. The cable is being used exactly the same way, whether you have one connection or twenty. In wired Ethernet networks, there are only four pairs of wires – two pairs in older cables; definitely not 65536; all of them are used at the same time.

The article also said that <...> . I thought packets contained a specific destination port, so why would they search for a new open port?

At this point, the article is slowly crossing the line between "metaphor" and "bullsh "nonsense".

TCP port numbers are assigned when the connection is made, and only used by the two ends of that connection. Meanwhile, routing happens at the 'internet' layer, using only IP addresses and not paying any attention to the data contained in IP packets or modifying it in any way.

(The only exception is when NAPT is being performed – for example, by your home router, to make multiple computers share a single IP address. In this case, packets received by your computer may bave different TCP or UDP port numbers than those originally sent.)

The identification test might be a reference to network firewalls. But then, packets blocked by a firewall rule would not "go searching for the next port"; they would simply be discarded.

Related Question