Skip to main content
N10-009 objective 1.4

CompTIA Network+ ports and protocols

Network+ lists 20 ports and protocols to know: the number, whether it runs over TCP or UDP, and what it does. They're in one table below, grouped by job. The cleartext ones are marked, and there's a quiz at the end.

The same ports drill is free in the course, with all of Domain 1.

Every port on the N10-009 list

CompTIA Network+ ports and protocols, grouped by job
PortProtocolTCP or UDPWhat it's for
Web
80HTTPHypertext Transfer ProtocolCleartextTCPUnencrypted web traffic. Anyone on the path can read it, which is why sites redirect to HTTPS.
443HTTPSHypertext Transfer Protocol SecureEncryptedTCPHTTP encrypted with TLS. The default for web traffic, and the port most firewalls leave open outbound.
Email
25SMTPSimple Mail Transfer ProtocolCleartextTCPRelays mail between mail servers. Without TLS on top, messages cross the network in clear text.
587SMTPSSimple Mail Transfer Protocol SecureEncryptedTCPMail submission from a client to its own server, authenticated and encrypted with STARTTLS.
File transfer
20/21FTPFile Transfer ProtocolCleartextTCP21 carries commands and 20 carries data in active mode. Credentials cross in clear text.
22SFTPSecure File Transfer ProtocolEncryptedTCPFile transfer that runs inside an SSH session, which is why it shares port 22 with SSH.
69TFTPTrivial File Transfer ProtocolCleartextUDPNo logins and no directory listing. Used to push configs and firmware to network devices and to boot over PXE.
File and print sharing
445SMBServer Message BlockTCPWindows file and printer sharing and mapped drives, straight over TCP. Never expose it to the internet.
Remote access
22SSHSecure ShellEncryptedTCPEncrypted command-line access to a server or a switch. Replaces Telnet for device management.
23TelnetTelnetCleartextTCPRemote command line with everything, passwords included, in clear text. Use SSH instead.
3389RDPRemote Desktop ProtocolEncryptedTCPThe graphical Windows remote desktop. Encrypted, but a common attack target when exposed directly.
Name and address services
53DNSDomain Name SystemTCP/UDPResolves names to IP addresses. Queries use UDP; zone transfers and large replies use TCP.
67/68DHCPDynamic Host Configuration ProtocolUDPThe server listens on 67 and clients on 68. A relay (IP helper) forwards requests across routers.
Directory services
389LDAPLightweight Directory Access ProtocolCleartextTCPQueries and updates a directory such as Active Directory. Binds travel in clear text unless secured.
636LDAPSLightweight Directory Access Protocol over SSLEncryptedTCPLDAP inside a TLS session, so directory lookups and binds are encrypted.
Network management
161/162SNMPSimple Network Management ProtocolUDPThe manager polls devices on 161 and devices send traps to it on 162. Only SNMPv3 adds authentication and encryption.
514SyslogSyslogUDPShips log messages from devices to a central collector or SIEM. Classic syslog is UDP and unencrypted.
123NTPNetwork Time ProtocolUDPKeeps clocks in step. Log correlation, certificates and Kerberos all break when clocks drift.
Database
1433SQL ServerMicrosoft SQL ServerTCPThe default port for Microsoft SQL Server connections. Keep it reachable only from the servers that need it.
Voice and video
5060/5061SIPSession Initiation ProtocolTCP/UDPSets up and tears down VoIP calls. 5060 is unencrypted signaling; 5061 is SIP over TLS.

Cleartext protocols and their secure replacements

When a scenario asks for an encrypted connection, the answer is usually the secure half of one of these pairs.

CleartextSecure replacementWhat changes
HTTP 80HTTPS 443Encrypt web traffic with TLS.
Telnet 23SSH 22Replace clear-text remote shells with SSH.
FTP 20/21SFTP 22Move files over SSH instead of clear-text FTP.
LDAP 389LDAPS 636Wrap directory queries and binds in TLS.
SMTP 25SMTPS 587Submit mail over an authenticated, encrypted session.

Ports that are easy to mix up

  • SNMP uses two ports: agents listen on UDP 161 for the manager, and the manager listens on UDP 162 for traps.
  • SSH and SFTP both use 22, because SFTP runs inside an SSH session. FTP uses 21 for commands and 20 for data in active mode.
  • TFTP (UDP 69) has no login and no encryption. Switches and IP phones use it to pull firmware and config files; anything that needs a login uses FTP or SFTP.
  • LDAP is 389 and LDAPS is 636. SMTP relays mail between servers on 25, and SMTPS submits it over an encrypted session on 587.
  • Syslog (UDP 514) carries log messages to a collector, and NTP (UDP 123) keeps the clocks those logs depend on in step.
  • SIP sets up calls on 5060, or 5061 with TLS. The voice itself travels separately, so a SIP problem and a choppy call are different faults.

Port number ranges

Well-known ports run from 0 to 1023, registered ports from 1024 to 49151, and dynamic (private) ports from 49152 to 65535. A client opens its side of a connection on a random dynamic port, so a firewall rule for a service is written against the destination port. On this list, SQL Server (1433), RDP (3389) and SIP (5060 and 5061) sit in the registered range.

Drill mode

Quiz yourself on the Network+ ports

Ten quick questions on the 20 ports above, or a run through all of them in random order. They ask both ways: the port a protocol uses, and the protocol behind a port.

Questions about the Network+ ports

  • How many ports do I need to know for Network+ N10-009?
    20, all under objective 1.4. SSH and SFTP share port 22, so that comes to 19 distinct port numbers or ranges.
  • Which Network+ ports use UDP?
    TFTP on 69, DHCP on 67/68, SNMP on 161/162, Syslog on 514 and NTP on 123 run over UDP. DNS on 53 and SIP on 5060/5061 use both: DNS answers ordinary lookups over UDP and moves zone transfers and large replies over TCP. Everything else on the list is TCP.
  • What are the secure versions of the cleartext Network+ protocols?
    HTTPS (443) for HTTP (80), SSH (22) for Telnet (23), SFTP (22) for FTP (20/21), LDAPS (636) for LDAP (389) and SMTPS (587) for SMTP (25). If a question asks for an encrypted replacement, it is usually one of those pairs.
  • What is the difference between SNMP ports 161 and 162?
    The agent on each managed device listens on UDP 161 for the manager's requests. The manager listens on UDP 162 for traps, the alerts devices send on their own when something happens.
  • What's the best way to memorize the Network+ ports?
    Learn them in groups by job, such as email, remote access or network management, so related numbers stick together. Then practice both directions: the port for a protocol, and the protocol for a port. The quiz on this page asks both ways, and NetPlus Mastery has the same drill.

Learn the rest of Domain 1 free

Ports are objective 1.4 of Networking Concepts, and the whole domain is free in NetPlus Mastery: a lesson, a quiz and practice questions for each objective, plus this drill.

Keep studying: the free practice test, subnetting practice, PBQ practice, and the full course.