this post was submitted on 28 Jun 2023
203 points (99.5% liked)

Explain Like I'm Five

14296 readers
3 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
 

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

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 8 points 1 year ago (3 children)

There's something important missing from most of the other answers. There's a lot of different kinds of network and internet traffic. Web browsing, email, instant messaging, online video games...

By formal standard, certain port numbers are designated for certain functions. Web traffic happens on port 80. Incoming email is sent on port 143, outgoing email is sent on port 456 or 587. Something like Discord will have a specific port it uses for both sending and receiving messages. Word of Warcraft has certain ports its uses for telling the server when you cast a spell, and for the server to tell your client when you take damage.

So yes, ports are like PO boxes at a post office, but the analogy doesn't quite capture it. Port 80 is always web traffic, and this is important, since your web browser requests pages on port 80, just as a web server returns web pages on port 80. The web server probably has other ports on it, like FTP (ports 20 and 21) or SFPT (port 22). If you connect to a web server on port 80, that means you're asking for its webpages. If you connect on 20, 21, or 22, it means you're trying to transfer files to it.

[–] [email protected] 2 points 1 year ago (2 children)

All true, except almost all web traffic nowadays is over port 443 (HTTPS) instead of 80.

[–] Stimmed 3 points 1 year ago (1 children)

Almost true. Port 80 is usually used for unencrypted web traffic. But anything can be ran on any port. Standards are standards, not requirements.

You can run https, ftp, virus communication, DNS, or anything else on port 80. People trying to connect to it might get confused though.

[–] Stimmed 4 points 1 year ago

I should give useful context though.

When you connect to a server, you send traffic to an IP address. That is like a street address with a letter. But when you send a letter in the mail, more than one person could live at a house, so you also include a name (or port number when sending to one service such as web traffic to a server that does many things). Usually that name corresponds to a person living there, like if you send a letter to John even though Sarah also lives there.

That is usually how it works, but not always. John and Sarah may have agreed that all letters should be named backwards, so John opens all letters to the name Sarah, and Sarah opens all letters to the name John. This would confuse anyone trying to send a letter to John unless John told them to use the name Sarah when sending a letter. Both could also agree that if a letter shows up for Bob, Sarah should open those as well (only Sarah's best friend would know to use the name Bob).

These exceptions are usually people either trying to obfuscate what is running on a port to pretend to be something different, it trying to make it hard to find the port associated with the server.