TCP and UDP Flashcards

1
Q

Define TCP

A

TCP operates at the transport layer and is a connection-oriented protocol. Before any data is sent, a connection must be established first. The 3 characteristics of TCP are that it’s connection-oriented, uses sequencing and checksums, and incorporates flow control.

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

Three-way handshake

A

A three-step process used by TCP to establish a connection.

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

Define Checksum

A

A character string sent by TCP, which is then repeated by the destination host. The 2 checksums need to match, otherwise the destination host will ask the source to retransmit the data.

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

Flow Control

A

The process of gauging the appropriate rate of transmission based on how fast the receiver can accept data.

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

How are TCP headers constructed?

A

Constructed in groups of 32 bits called words. Each word consists of 4 bytes (blocks) of 8 bits each. The header consists of many fields, including source and destination ports, sequence number, checksum, etc.

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

Source and Destination ports

A

These indicate the ports at the source and destination nodes. Each are 16 bits in length. The port allows a process to be available for incoming/outgoing data.

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

Sequence Number

A

A 32-bit field that identifies the data segment’s position in the stream of data segments being sent.

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

Acknowledgement number

A

32-bit field that confirms receipt of data via a return message to the sender.

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

Flags

A

A 6-bit field that identifies a collection of 6 1-bit fields/flags that indicate special conditions about other fields in the header. Includes URG (urgent), ACK (acknowledgement), PSH (no buffering), RST (reset), SYN (synchronization), and FIN (last segment in sequence)

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

Sliding-window size

A

A 16-bit field that indicates how many bytes the sender can issue to a receiver before receiving acknowledgement.

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

Urgent Pointer

A

16-bit field, where urgent data is located.

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

Padding

A

A variable-length field that contains filler bits to ensure the size of the TCP header is a multiple of 32 bits.

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

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

A
  1. SYN - request for a connection. Source computer sends a random number to synchronize communication, with SYN bit set to 1.
  2. SYN/ACK - Response to the request. Receiving computer receives the message, responds with ACK and SYN bits set to 1 (Random number from step 1, plus 1)
  3. ACK - connection established. Source computer responds with the same sequence number, with ACK bit set to 1.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Initial Sequence Number (ISN)

A

The first sequence number used in a three-way handshake. It is calculated by a specific clock-based algorithm which varies by operating system. Because of its predictability, this is actually a security loophole that can be exploited by a hacker.

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

Define UDP

A

UDP = User Datagram Protocol. It is a connection-less protocol. Although faster and more efficient than TCP, it does not guarantee delivery of data. Does not have a 3-way handshake. Provides no error checking, sequencing, or flow control.

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

What 4 fields are contained in a UDP header

A

Source port, destination port, port length, and checksum.. Checksum field is optional for IPv4, but required for IPv6.

17
Q

What is UDP primarily used for?

A

Used for live audio and video transmissions via the Internet, and also more efficient for carrying messages that fit within a single data packet.

18
Q

What is RTP? Why is it significant in relation to UDP?

A

RTP = Real Time Protocol. Operates at the application layer and works in conjunction with UDP to emulate some of the benefits provided by TCP.