What are the Service & Port?

Where the data goes?

βš™οΈ What is a Service?

Some common types of services:

  • 🌐 Webservers β€” serve websites (like Apache or Nginx)

  • πŸ“§ Mail servers β€” send and receive emails (SMTP, IMAP)

  • πŸ—‚οΈ File servers β€” transfer files (FTP, SFTP)

  • πŸ§‘β€πŸ’» Remote access β€” connect to or control other machines (SSH, Telnet)

Basically, any time your device talks to another system over the internet or local network, it's usually talking to a service running on a specific port.

πŸ”‘ What is a Port?

Essentially, the IP address indicates where you want to go, and the port number indicates who you want to communicate with once you arrive.

Port numbers range from 1 to 65535, and some are commonly assigned to specific services.

βš™οΈ Common Port Numbers and Services

Port
Protocol
Service
Use Case

21

FTP

File Transfer

Upload/download files

22

SSH

Secure Shell

Secure remote access to systems

23

Telnet

Remote Login

Unsecure remote access (rarely used now)

25

SMTP

Email Sending

Send emails

80

HTTP

Web Browsing

View websites (insecure)

110

POP3

Email Receiving

Download emails

🏒 How are IP and Port being used?

Imagine you want to send a bottle of milk tea to someone who lives in a large apartment building.

  • IP Address = the address of the building

  • Port Number = the apartment number inside the building

So to deliver your order correctly, you need both:

  • The building's address (IP)

  • The apartment number (Port)

Without both, your milk tea can't be delivered correctly.

In the world of networking and technology, when two devices communicate over the internet (or a local network), they use IP addresses to locate each other and ports to identify the specific application or service they wish to interact with.

For example, if you want to visit a website: https://example.com

  1. Your browser will look up the IP Address of example.com using DNS. Let's assume it gets 93.184.216.34

  2. It sends a request to IP: 93.184.216.34 with Port: 443 (443 = HTTPS).

  3. The server receives your request, and the web service (on port 443) responds with the website content.

βœ… You used both IP + Port to talk to the right service on the right machine.

🧠 TL;DR

  • IP address tells the data where to go (which device/server).

  • Port number tells the device which service to deliver data to.

Last updated