5

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

top 16 comments
sorted by: hot top controversial new old
[-] Brkdncr@kbin.social 3 points 1 year ago

If an ip address is a house number, then a port is an apartment number.

[-] DealBreaker@kbin.social 3 points 1 year ago

That's the only true ELI5 answer

[-] a_fancy_kiwi@lemmy.world 3 points 1 year ago* (last edited 1 year ago)

Imagine you need to go see your doctor. They work in a building with 65535 rooms. Some rooms are empty. Some rooms have people in them that provide different services. But you need your doctor so you look up their location.

You learn the building address (IP address) and the room number (port)

In practice, you attach services to specific ports so that other computers can access those services. Typically, http traffic is on port 80 and https is on port 443. So if you visit a website, you are likely connected to a server on one of those two ports. But it’s not a requirement. You could create a website and put it on port 2097, or 532, or 47210; it doesn’t matter.

[-] sebinspace@lemmy.world 1 points 1 year ago

And the best port of all, 25565

[-] 2dollarsim@lemmy.world 1 points 1 year ago

Haha knew that one sounded familiar but it's been a while

[-] Dran_Arcana@lemmy.world 0 points 1 year ago
[-] RGB3x3@lemmy.world 1 points 1 year ago

It's for Minecraft, haha

[-] Ignisnex@lemmy.world 1 points 1 year ago

It's the port for a Minecraft Java server.

[-] intensely_human@lemm.ee 2 points 1 month ago

A port is like an apartment number. Except instead of apartments, it’s just mailboxes. Bob’s mailbox is number 25. If you want to get a message to Bob, uou write “box 25” on the address.

A port number is just an additional piece of info that the operating system associates with a particular program. If something comes in on port 22, the sshd is going to handle it because it’s “listening on port 22”, meaning that it has registered itself with the OS as the recipient of anything that comes in marked “port 22”.

[-] Aceticon@lemmy.world 2 points 1 year ago* (last edited 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.

[-] takeda@lemmy.world 1 points 1 year ago* (last edited 1 year ago)

If you would compare a server to a building, with its own street address, then port would be an apartment number for every application (tenant) living there.

Ports are what allowing you to run multiple applications and all can communicate over the internet. Without ports you would need to have a dedicated computer for every application.

[-] zaggynl@lemmy.world 1 points 1 year ago

If IP addresses are streets, ports are mailboxes.

[-] Jajcus@kbin.social 1 points 1 year ago

Additionally to all the correct answers, a 'port' can also mean something completely different 'in networking'.

It can be a physical socket in a network equipment, like 'Ethernet port'. Or it can be a virtual equivalent of such, e.g. when connecting virtual machines on a host - that could be called a 'logical port'.

Those can sometimes be used interchangeably with 'interface' or 'device', but it depends on convention used in particular system or environment.

[-] rikudou@lemmings.world 1 points 1 year ago

Imagine your network card is a house. That house has an address (IP address in this case) and to get into the house you need doors (ports). The house is pretty big so it has exactly 65,535 doors (ports). But because the owner of the house is not insane, most of the doors are locked (firewall).

When something communicates with you (or you with something), you use a port. For example when you open a webpage, your browser sends a request to the server on port 80 or 443 (80 for http, 443 for https). Those are standardized ports which have a well-defined meaning, but in general you only need the client (browser, app, whatever) and server to use the same port for the service.

Let me know if that clears it up!

[-] linearchaos@lemmy.world 1 points 1 year ago

Your IP address is like the main office number for your computer. The ports are like internal extension numbers.

When you're setting up a program and it's asking you what logical port it should use, It's asking you which extension it should be using. Just like if you were dealing with phone numbers and phone systems you have to give it a number that's not already in use, and it probably makes sense to give it a number that is known for that type of service.

[-] kifujin@kbin.social -1 points 1 year ago

A TCP packet has a segment for a numerical descriptor which is metaphorically referred to as a port. A lot of networking hardware and software filters based on that packet segment, or directs it to particular software registered as 'listening' for that number.

this post was submitted on 28 Jun 2023
5 points (100.0% liked)

Explain Like I'm Five

14027 readers
28 users here now

Simplifying Complexity, One Answer at a Time!

Rules

  1. Be respectful and inclusive.
  2. No harassment, hate speech, or trolling.
  3. Engage in constructive discussions.
  4. Share relevant content.
  5. Follow guidelines and moderators' instructions.
  6. Use appropriate language and tone.
  7. Report violations.
  8. Foster a continuous learning environment.

founded 1 year ago
MODERATORS