Ports And Protocols Flashcards

1
Q

What is a port?

A

A logical entry or exit point used by applications to exchange information.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a protocol?

A

A set of rules for data exchange between devices, ensuring structured and predictable communication.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How many ports are available?

A

Ports range from 0 to 65,535.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the three categories of ports?

A
  1. Well-Known Ports: 0–1,023 (reserved for standard services). 2. Registered Ports: 1,024–49,151 (assigned to specific applications by IANA). 3. Ephemeral Ports: 49,152–65,535 (temporary ports used for dynamic communication).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What port does HTTP use?

A

Port 80.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What port does HTTPS use?

A

Port 443.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Name three email protocols and their ports.

A
  1. SMTP: Port 25 (unsecured), Port 587 (secure). 2. POP3: Port 110. 3. IMAP: Port 143.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the ports for FTP?

A

Ports 20 (data transfer) and 21 (control commands).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What port does SFTP use?

A

Port 22 (uses SSH).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What ports are used for DNS?

A

Port 53.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What ports are used for DHCP?

A

Port 67 (server) and Port 68 (client).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What port does SSH use?

A

Port 22.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What port does Telnet use?

A

Port 23.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What port does RDP (Remote Desktop Protocol) use?

A

Port 3389.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the ports for SNMP?

A

Port 161 (queries) and Port 162 (notifications/traps).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is TCP?

A

Transmission Control Protocol, ensuring reliable and ordered data delivery at the Transport Layer (Layer 4).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What are the steps in the TCP three-way handshake?

A
  1. SYN: Client sends a synchronization request. 2. SYN-ACK: Server acknowledges and signals readiness. 3. ACK: Client confirms and establishes a connection.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What mechanisms does TCP use for reliability?

A
  • Error Checking: Sequence numbers and acknowledgments. - Retransmission: Requests resend of lost/corrupted packets. - Flow Control: Dynamically adjusts data flow with windowing.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

How are TCP connections identified?

A

By a combination of: - Source IP and Source Port. - Destination IP and Destination Port.

20
Q

What happens when a client accesses a website?

A
  • Request: Source IP uses an ephemeral port; Destination IP uses Port 80 (HTTP) or Port 443 (HTTPS). - Response: Server responds using its listening port and the client’s ephemeral port.
21
Q

What is the purpose of ephemeral ports?

A

Temporary ports used by clients for dynamic communication during a session.

22
Q

How do ports allow multiple services on a single device?

A

By assigning different port numbers to each service or application.

23
Q

What is Nmap?

A

A network mapping tool used to scan and identify open ports and services, often for vulnerability assessments.

24
Q

Why is understanding ports important for network troubleshooting?

A

It helps identify specific services or applications causing issues and ensures proper communication paths.

25
Q

What are the three categories of ports?

A
  1. Well-Known Ports (0–1,023): Reserved for standard services (e.g., HTTP, FTP).
  2. Registered Ports (1,024–49,151): Assigned to specific applications by IANA.
  3. Ephemeral Ports (49,152–65,535): Temporary ports for client-side communication.
26
Q

What are the default ports for HTTP and HTTPS?

A

HTTP: Port 80.
HTTPS: Port 443.

27
Q

Name three email-related ports and protocols.

A
  1. SMTP: Port 25 (unsecured), 465/587 (secured).
  2. POP3: Port 110 (unsecured), 995 (secured).
  3. IMAP: Port 143 (unsecured), 993 (secured).
28
Q

What is UDP?

A

A connectionless, lightweight protocol prioritizing speed over reliability.

29
Q

What is the size of a UDP header, and why is it efficient?

A

8 bytes, making UDP faster due to lower overhead compared to TCP’s 20–60 bytes.

30
Q

Give three common use cases for UDP.

A
  1. Streaming Media (e.g., live video, VoIP).
  2. Online Gaming.
  3. DNS Lookups.
31
Q

How does UDP differ from TCP?

A

Feature | UDP | TCP |
|———————|—————————|——————————-|
| Connection Type | Connectionless | Connection-oriented |
| Reliability | Unreliable (no ACKs) | Reliable (ACKs, retransmissions)|
| Header Size | 8 bytes | 20–60 bytes |
| Use Cases | Streaming, gaming, VoIP | Web browsing, file transfers |

32
Q

What is ICMP used for?

A

Diagnostics, error reporting, and troubleshooting (e.g., ping, traceroute).

33
Q

How does ping work?

A

Sends an ICMP Echo Request; if the host is reachable, it replies with an ICMP Echo Reply.

34
Q

What are two common ICMP vulnerabilities?

A
  1. ICMP Flood Attack: Overwhelms a system with Echo Requests (DoS attack).
  2. Ping of Death: Sends oversized packets, causing crashes in vulnerable systems.
35
Q

What ports do FTP and SFTP use?

A

FTP: Ports 20 (data transfer) and 21 (control).
SFTP: Port 22 (uses SSH for security).

36
Q

What is the main difference between FTP and SFTP?

A

FTP sends data in plain text, while SFTP encrypts data for secure transfers.

37
Q

What is TFTP, and what port does it use?

A

Trivial File Transfer Protocol (basic, unsecured file transfers) uses Port 69.

38
Q

What are the ports for SSH, Telnet, and RDP?

A

SSH: Port 22.
Telnet: Port 23.
RDP: Port 3389.

39
Q

Why is SSH preferred over Telnet?

A

SSH provides encrypted communication, while Telnet transmits data in plain text, making it insecure.

40
Q

What port does DNS use?

A

Port 53 (UDP for standard queries, TCP for larger transfers).

41
Q

What ports do DHCP servers and clients use?

A

DHCP Server: Port 67.
DHCP Client: Port 68.

42
Q

What is the purpose of NTP, and what port does it use?

A

Synchronizes device clocks; uses Port 123 (UDP).

43
Q

What are the secure and unsecured ports for LDAP?

A

LDAP (Unsecured): Port 389.
LDAPS (Secured): Port 636.

44
Q

What is Nmap used for?

A

Scanning networks to identify open ports, services, and potential vulnerabilities.

45
Q

What is Zenmap?

A

A graphical interface for Nmap, simplifying network scans and visualizing results.

46
Q

Give an example of an Nmap command.

A

nmap -ss -O 192.168.1.1
- -ss: SYN scan (identifies open ports).
- -O: Detects the operating system.