ELI5: In computer networking, what is a port? - eviltoast

I often see that network settings have a field for logical port. What is this field.referring to?

  • Aceticon@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    1 year ago

    Imagine the computer as a shopping mall, which has a name and address (i.e the IP address).

    A port is a specific store in that mall, from were you can get specific things.

    The analogy even holds further in that for certain “stores”, the same store by name of certain chains (i.e. Burger King) will provide the same service in different malls if its present there (for example, port 80 is were the HTTP service is, by convention) and the same kind of service can be provided in other stores (nobody stops you from having an HTTP service on a different port).

    Were the analogy breaks is that unlike with chain store names (which are protected by trademark) there really is no enforcement that a certain port has a certain service (i.e. you can put whatever service you want on port 80 of a computer you control) and certain services being in certain ports is merely a convention.