TCP Flashcards

1
Q

What are the 4 things that identify a TCP socket?

A

Source IP address
Source port number
Destination IP address
Destination port number

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

What are the 2 mechanisms TCP uses to recover from errors?

A

Acknowledgements and negative acknowledgements

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

What is a negative acknowledgement in TCP?

A

The receiver telling the sender that the packet they received had errors. The sender will then retransmit the packet.

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

What happens in TCP if the sender does not receive a acknowledgement?

A

The sender waits a reasonable amount of time before retransmitting the packet.

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

What is the sequence number on a TCP packet?

A

A unique number that identifies the packet.

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

What is a stop and wait TCP protocol?

A

One packet is sent at a time by the sender, they do not send the next packet until the sent packet has been acknowledged.

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

What is a pipelined TCP protocol?

A

The sender will allow up to N unacknowledged packets. Receiver only sends acknowledgment for correctly received in-order packet with the highest sequence number. Out of order packets are discarded. Sender has a timer for how long a packet can go unacknowledged, when this timer expires all unacknowledged packets are retransmitted.

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

What does TCP stand for?

A

Transmission control protocol

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

What is a selective repeat TCP protocol?

A

Receiver sends individual acknowledgements for all correctly received packets. Out of order packets are buffered and still acknowledged. The sender will allow up to N unacknowledged packets. Sender has a timer for how long a packet can go unacknowledged, when this timer expires all unacknowledged packets are retransmitted.

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

What will be the sequence number for the acknowledgement of a packet?

A

The sequence number of the packet plus the number of bytes of data in the packet. This is the next expected byte.

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

Describe the TCP 3 way handshake

A

Client sends a packet with the SYN flag set with the initial sequence number for client-to-server packets.
Server sends back a packet with both the SYN and ACK flags set, a the ACK number 1 more than the sequence number sent by the client and with the initial sequence number for server-to-client packets.
The client sends a packet with the ACK flag set and the ACK number 1 more than the sequence number sent by the server.

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

What is PAWS in TCP?

A

Protection Against Wrapped Sequence numbers
During large transmissions sequence numbers can wrap back round to the starting number causing duplicates. Each packet is also given a timestamp when it is sent, so you can determine which packet came first when there are duplicate sequence numbers.

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

What is slow start in TCP?

A

Once a connection has been established, sender starts by only sending one packet. Once that packet has been acknowledged, you increase the number sent (e.g. by one, double). This repeats until you are sending the full receive window.

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

Why is slow start needed in TCP?

A

LAN may be much faster than the WAN. Without slow start, after the connection is established, a large receive window will cause the sender will send large amounts of data. The local router may not have enough memory to buffer all of these packets, which will cause packets to be discarded. The sender will then retransmit these packets while the router still does not have enough space.

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

What is fast retransmit in TCP?

A

When you receive duplicate acknowledgements, you can infer that packets sent after the packet being acknowledged were lost. When this happens, immediately retransmit all the packets after the one being acknowledged.

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