Intro to IP Flashcards
1
Q
TCP
A
Transmission Control Protocol
- Connection oriented, has a formal setup and close
- “Reliable” delivery (recovery from errors, can manage out-of-order messages or retransmissions)
- Flow control (the receiver can manage how much data is sent)
2
Q
UDP
A
User Datagram Protocol
- Connectionless, no formal open/close to the connection
- “Unreliable delivery” (no error recovery, no reordering of data or retransmissions)
- No flow control (sender determines the amount of data transmitted)
3
Q
Why would you ever use UDP?
A
- Realtime communication (there’s no way to stop and resend the data, time doesn’t stop for your network)
- Connectionless protocols (DHCP / TFTP)
4
Q
Why use TCP?
A
- Connection-oriented protocols prefer a “return receipt” (HTTPS, SSH)
- The application doesn’t worry about out-of-order frames or missing data (TCP handles the communication overhead, the app has one job)
5
Q
What’s an IPv4 socket?
A
- Server IP address, protocol, server application port number
- Client IP address, protocol, client port number
6
Q
What are non-ephemeral ports?
A
- Permanent port numbers
- Ports 0 - 1,023
- Usually on a server or service
7
Q
What are ephemeral ports?
A
- Temporary port numbers
- Ports 1,024 - 65,535
- Determined in real-time by the client
8
Q
What are port numbers?
A
- TCP and UDP ports
- Can be any number between 0 - 65,535
- Most servers use non-ephemeral port numbers, but that’s not always the case
- Port numbers are for communication, not security
- Service port numbers need to be “well known”
- TCP port numbers aren’t the same as UDP port numbers