CompTIA A+ Core 1
Common TCP and UDP port numbers for A+ Core 1
Each network service listens on a port registered by IANA. The A+ set includes FTP 20 and 21, SSH 22, Telnet 23, SMTP 25, DNS 53, DHCP 67 and 68, HTTP 80, POP3 110, NetBIOS 137 to 139, IMAP 143, SNMP 161 and 162, LDAP 389, HTTPS 443, microsoft-ds 445 and ms-wbt-server 3389.
The registered ports
From the IANA service name and port number registry: 20 ftp-data (File Transfer, default data), 21 ftp (File Transfer Protocol, control), 22 ssh, 23 telnet, 25 smtp.
53 domain (Domain Name Server), 67 bootps and 68 bootpc (used by DHCP), 80 http, 110 pop3, 137 netbios-ns, 138 netbios-dgm, 139 netbios-ssn, 143 imap.
161 snmp, 162 snmptrap, 389 ldap, 427 svrloc (Server Location), 443 https (HTTP over TLS/SSL), 445 microsoft-ds, 548 afpovertcp (AFP over TCP), 3389 ms-wbt-server (MS WBT Server).
FTP uses two ports
RFC 959 keeps FTP commands and data on separate connections. Login and commands go over the control connection on port 21.
The server's default data port is the port next to the control port, L-1, which is port 20. The LIST command's output, a directory listing, travels over the data connection, not the control connection. So file names and file contents use port 20; the commands that asked for them use port 21.
DNS uses TCP as well as UDP
RFC 1035 says name servers accept TCP and UDP on port 53. UDP is the recommended method for standard queries.
RFC 1035 also says UDP is not acceptable for zone transfers. A secondary DNS server copying a whole zone from the primary therefore needs TCP port 53 open.
NetBIOS is three ports
IANA assigns 137 to the NETBIOS Name Service, 138 to the NETBIOS Datagram Service and 139 to the NETBIOS Session Service. Name lookups on 137, datagrams on 138 and sessions on 139 together mean NetBIOS over TCP/IP.
Where the exam catches people
- Believing a directory listing comes back on port 21: port 21 carries commands only, and RFC 959 sends LIST output over the data connection, port 20 by default.
- Believing DNS is UDP only: RFC 1035 rules out UDP for zone transfers, so they need TCP port 53.
- Believing a block on port 53 only affects mail or file sharing: it stops name resolution, so sites open by IP address but not by name.
- Believing 445 is one of the NetBIOS ports: IANA lists 137 to 139 as NetBIOS services and 445 separately as microsoft-ds.