Well-Known Port Numbers 🚀

beginner
9 min

Well-Known Port Numbers 🚀

Welcome to our comprehensive tutorial on Well-Known Port Numbers! In this lesson, we'll explore the world of computer networking, diving deep into the concept of port numbers and their significance. Let's get started! 🎯

What are Port Numbers? 📝

Port numbers are a crucial part of the Internet Protocol (IP). They help in identifying the specific applications running on a networked computer. Each application on a networked computer uses a unique port number for communication.

Well-Known Port Numbers 💡

The Internet Assigned Numbers Authority (IANA) assigns specific port numbers to well-known services, making it easier for computers to communicate effectively. These well-known port numbers are divided into three ranges:

  1. Well Known Ports (0 - 1023): These are reserved for system processes and standardized network services.

  2. Registered Ports (1024 - 49151): These are assigned to private and less-common network services.

  3. Dynamic or Private Ports (49152 - 65535): These are used for ephemeral (temporary) connections and may vary for each session.

In this tutorial, we'll focus on Well-Known Ports.

List of Well-Known Ports 📝

Here's a list of some common well-known port numbers and the services they represent:

  • Port 20 (FTP - File Transfer Protocol)
  • Port 21 (FTP - Control)
  • Port 22 (SSH - Secure Shell)
  • Port 23 (Telnet)
  • Port 25 (SMTP - Simple Mail Transfer Protocol)
  • Port 53 (DNS - Domain Name System)
  • Port 80 (HTTP - Hypertext Transfer Protocol)
  • Port 443 (HTTPS - Hypertext Transfer Protocol Secure)
  • Port 110 (POP3 - Post Office Protocol version 3)
  • Port 143 (IMAP - Internet Message Access Protocol)

Practical Example 💻

Let's consider an example where you're connecting to a website using HTTP (Port 80). Here's a simple Python script that demonstrates this:

python
import socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(('www.google.com', 80)) print(s.recv(1024)) s.close()

In this example, we create a socket object, connect to 'www.google.com' on port 80, and receive the server's response.

Quiz 🎯

Quick Quiz
Question 1 of 1

What range of port numbers are reserved for system processes and standardized network services?


Stay tuned for more! In our next lesson, we'll dive deeper into understanding how these well-known port numbers are used in real-world scenarios, and how to interact with them using various programming languages.

Happy learning, and remember, every networked computer in the world shares a common language - port numbers! 🎉