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?

A

TCP

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?

A

ACK
SYN
FIN

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
Q

By which method does TCP terminate connections between hosts?

A

TCP 4-way handshake

26
Q

Explain the different parts of the TCP 4-way handshake

A

Client sends FIN
Server sends ACK
Server sends FIN
Client sends ACK

27
Q

Describe what TCP forward acknowledgement is

A

Indicates the sequence number of the next segment the host expects to receive

28
Q

When a client sends the initial SYN message in the 3-way handshake, what is the initial sequence number?

A

Randomly chosen by the client

29
Q

When a server sends the SYN-ACK message in the 3-way handshake, what are the sequence number and acknowledgement number set to?

A

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
Q

When a client sends the final ACK message in the TCP 3-way handshake, what are the sequence number and acknowledgement number set to?

A

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
Q

Explain what TCP sequencing allows

A

Allows the client/server to know what segment to expect next.

32
Q

In layman’s terms, what is contained within a TCP header that allows for sequencing?

A

Here’s segment number X, I (client/server), expect segment number Y from you (server/client) next

33
Q

The TCP header’s window size field allows for what?

A

More data to be sent before an acknowledgement is required

34
Q

What is the TCP sliding window?

A

Used to dynamically adjust how large the TCP window size is depending on various factors

35
Q

Describe the reliability of UDP

A

There is none. Segments are sent on a best-effort basis

36
Q

Does UDP establish connections before data is sent?

A

No

37
Q

How does UDP provide segment sequencing?

A

It doesn’t

38
Q

How does UDP provide flow control?

A

It doesn’t

39
Q

For downloading a file, what L4 protocol is best used?

A

TCP

40
Q

For real time voice and video, what L4 protocol is best used?

A

UDP

41
Q

Is it possible for some applications to use both TCP and UDP?

A

Yes. DNS is an example

42
Q

Which of the following is a well known port number?

a) 1010
b) 2001
c) 4023
d) 65000

A

a) 1001

Well known are 0-1023

43
Q

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

A

c) Ephemeral

Ports 49152 - 65535

44
Q

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

A

b) Error recovery
d) Flow control
e) Sequencing

45
Q

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

a) SMTP
c) HTTPS
f) SSH

46
Q

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

A

c) 28

TCP acknowledges that it receives the segment by stating the next segment it expects to receive (forward acknowledgement)

47
Q

Routers in which states send HSRP hello messages?

A

Active, standby, and speak states