Understanding Port Numbers and Protocols

Feb 6, 2025

Lecture Notes: Understanding Port Numbers and Protocols

Importance of Port Numbers

  • Well-known port numbers: Used by services for communication.
  • Server and client knowledge: Both need to know the port numbers for effective communication.
  • Firewalls: Use port numbers to allow or disallow traffic.
  • Exam relevance: Understanding which port number is used by specific applications is crucial.

Key Protocols and Port Numbers

File Transfer Protocol (FTP)

  • Purpose: Transfers files between devices.
  • Ports:
    • TCP port 20 for data transfers.
    • TCP port 21 for control.
  • Features:
    • Requires authentication (username/password).
    • Allows file management functions.

Secure Shell (SSH)

  • Purpose: Provides terminal connection to remote devices.
  • Port: TCP port 22.
  • Security: Encrypted communication.

Telnet

  • Purpose: Connects to remote devices using text-based console.
  • Port: TCP port 23.
  • Security: Non-encrypted communication; not recommended for production networks.

Simple Mail Transfer Protocol (SMTP)

  • Purpose: Communication between email servers and clients.
  • Port: TCP port 25.
  • Usage: Sending emails; receiving emails uses IMAP or POP3.

Domain Name System (DNS)

  • Purpose: Resolves domain names to IP addresses.
  • Port: UDP port 53.

Dynamic Host Configuration Protocol (DHCP)

  • Purpose: Assigns IP addresses automatically.
  • Ports:
    • UDP port 67.
    • UDP port 68.
  • Functionality: Pools IP addresses; uses leasing system.

Hypertext Transfer Protocol (HTTP/HTTPS)

  • HTTP:
    • Purpose: Non-encrypted web browsing.
    • Port: TCP port 80.
  • HTTPS:
    • Purpose: Encrypted web browsing.
    • Port: TCP port 443.

Post Office Protocol (POP3) and Internet Message Access Protocol (IMAP)

  • POP3:
    • Purpose: Retrieves emails.
    • Port: TCP port 110.
  • IMAP:
    • Purpose: Synchronizes email across devices.
    • Port: TCP port 143.

Server Message Block (SMB)

  • Purpose: File and print services on Windows.
  • Ports:
    • NetBIOS over TCP/IP: UDP port 137, TCP port 139.
    • Direct SMB: TCP port 445.

Simple Network Management Protocol (SNMP)

  • Purpose: Network management and monitoring.
  • Ports:
    • UDP port 161 for queries.
    • UDP port 162 for traps.
  • Versions:
    • SNMPv1 and SNMPv2: Non-encrypted.
    • SNMPv3: Includes encryption and security.

Lightweight Directory Access Protocol (LDAP)

  • Purpose: Directory querying protocol.
  • Port: TCP port 389.
  • Example: Microsoft Active Directory.

Remote Desktop Protocol (RDP)

  • Purpose: Remote desktop communication.
  • Port: TCP port 3389.
  • Compatibility: Available across various operating systems including Windows, Linux, macOS, Android.

Conclusion

Understanding these port numbers and protocols is essential for effective network communication and security management, especially for network administrators and IT professionals.