Search code examples
operating-systemcomputer-sciencenetwork-security

Does a Computer has a physical component for each ports/sockets?


I'm sorry if my question is too easy or obvious. I'm Comp. Science Student (it's my 6.th term). I'm trying to combine the knowledges that I'm learning from 'Computer Networks and Security', 'Computer Organization' and 'Operating Systems' lectures in this term.

So, I cannot figure out that;

Does a computer or a phone has physical components for each 65535 ports/sockets?

Or

The machine has just one physical component. So that means port numbers are logical representations that can be shown as text-fields (like header entities or json attributes) of a request or something, to say to computer how to handle the request?

I used ports for connections of back-end and android and front-end. I know that a socket is a physical component, I worked 4 months as phone-repairer, I know these. But this makes me confused.

Thanks in advance..


Solution

  • Think of it this way: "the network interface is the phone system, IP-addresses are phone numbers, and socket/port numbers are like telephone extensions. (The network interface is the only physical device.)

    Network traffic is carried by so-called "packets" which have various fields which tell the network how they should be routed. The IP-address will get the packet to the proper destination, then the port/socket-number will specify exactly what software process at that destination should actually handle this packet.