TCP & UDP Flashcards

1
Q

What is the purpose of L4

A

Provide transparent transfer of data between hosts

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

What does “transparent data transfer between hosts” mean?

A

Hosts involved are not aware of L1-3 details of the underlying network

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

What are the services offered (or not, depending on TCP vs UDP) by L4?

A
  • Reliable data transfer
  • Error recovery
  • Data sequencing
  • Flow control
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the additional addressing system provided by L4?

A

Port numbers

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

What is an L4 session?

A

An exchange of data between two or more communicating devices

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

What does the L4 destination port identify?

A

The application layer (L5+) protocol

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

Is the L4 source port assigned or randomly selected?

A

Randomly selected

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

What does the L4 source port identify?

A

The L4 communication session

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

L4 addressing helps provide session _____

A

multiplexing

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

Port numbers 0 - 1023 are _____

A

Well-Known

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

Port numbers 1024 - 49151 are _____

A

Registered

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

Port numbers 49152 - 65535 are _____

A

Ephemeral / private / dynamic

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

Well known ports fall between ports ___ - ____

A

0 - 1023

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

Registered ports fall between ports ____ - ____

A

1024 - 49151

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

Ephemeral ports fall between ports ____ - ____

A

49152 - 65535

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

Before TCP can send data to a destination host, the two hosts must do what?

A

Establish a connection

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

Does TCP or UDP provide reliability?

A

TCP

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

Does TCP or UDP provide segment sequencing?

A

TCP

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

Does TCP or UDP provide flow control?

20
Q

What is L4 flow control?

A

A destination being able to dictate the rate that data is sent

21
Q

What flags in the TCP header are used to establish and terminate connections?

22
Q

What function does the window size field in the TCP header serve?

A

Used for flow control, adjusting the rate at which data is sent

23
Q

By which method does TCP establish connections between hosts?

A

TCP 3-way handshake

24
Q

Explain the different parts of the TCP 3-way handshake

A

Client sends SYN
Server sends SYN ACK
client sends ACK

25
By which method does TCP terminate connections between hosts?
TCP 4-way handshake
26
Explain the different parts of the TCP 4-way handshake
Client sends FIN Server sends ACK Server sends FIN Client sends ACK
27
Describe what TCP forward acknowledgement is
Indicates the sequence number of the next segment the host expects to receive
28
When a client sends the initial SYN message in the 3-way handshake, what is the initial sequence number?
Randomly chosen by the client
29
When a server sends the SYN-ACK message in the 3-way handshake, what are the sequence number and acknowledgement number set to?
The server picks its own random sequence number, and increments the sequence number sent by the client by 1, and uses that for the acknowledgement num
30
When a client sends the final ACK message in the TCP 3-way handshake, what are the sequence number and acknowledgement number set to?
Client flips what it received from the server. Sequence num will be the acknowledgement number the server sent on SYN-ACK, and the acknowledgement number is the sequence number the server sent on SYN-ACK plus one.
31
Explain what TCP sequencing allows
Allows the client/server to know what segment to expect next.
32
In layman's terms, what is contained within a TCP header that allows for sequencing?
Here's segment number X, I (client/server), expect segment number Y from you (server/client) next
33
The TCP header's window size field allows for what?
More data to be sent before an acknowledgement is required
34
What is the TCP sliding window?
Used to dynamically adjust how large the TCP window size is depending on various factors
35
Describe the reliability of UDP
There is none. Segments are sent on a best-effort basis
36
Does UDP establish connections before data is sent?
No
37
How does UDP provide segment sequencing?
It doesn't
38
How does UDP provide flow control?
It doesn't
39
For downloading a file, what L4 protocol is best used?
TCP
40
For real time voice and video, what L4 protocol is best used?
UDP
41
Is it possible for some applications to use both TCP and UDP?
Yes. DNS is an example
42
Which of the following is a well known port number? a) 1010 b) 2001 c) 4023 d) 65000
a) 1001 Well known are 0-1023
43
What range of port numbers should hosts select from when randomly selecting a source L4 port number? a) Well known b) Registered c) Ephemeral d) Reserved
c) Ephemeral Ports 49152 - 65535
44
Which of the following are features of TCP but not UDP (pick 3) a) L4 addressing b) Error recovery c) Session multiplexing d) Flow control e) Sequencing
b) Error recovery d) Flow control e) Sequencing
45
Which of the following application layer protocols use TCP to provide reliable communications? (pick 3) a) SMTP b) SNMP c) HTTPS d) DHCP e) Syslog f) SSH
a) SMTP c) HTTPS f) SSH
46
PC1 and SRV1 have an active TCP connection. SRV1 receives a TCP segment from PC1 with a sequence number of 27. When SRV1 acknowledges the segment, what will the value of the Acknowledgement field in the TCP header be? Assume a TCP window size of 1. a) 26 b) 27 c) 28
c) 28 TCP acknowledges that it receives the segment by stating the next segment it expects to receive (forward acknowledgement)
47
Routers in which states send HSRP hello messages?
Active, standby, and speak states