slides21 Flashcards

1
Q

who came first tcp or udp

A

tcp

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

header of udp

A

16 bit source port
16 bit destination port
16 bit UDP length
16 bit UDP checksum

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

is checksum important in UDP

A

no, unreliable so fine

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

how does udp compare with other headers

A

much slimmer

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

where is udp useful

A

single request and reply
Where a fast response is required
Where speed is more important than accuracy

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

what is the procedure when a udp is lost

A

up to application

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

tcp challenge

A

create reliability over unreliability

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

what is ACK

A

The basis of the reliability is the use of acknowledgement (ACK) packets for every packet sent
If host A sends host B a packet, B must send an ACK packet back to A to inform it of the safe arrival of the packet
If A does not get an ACK, it resends the packet

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

Two Armies Problem

A

infinite exchange of acks

TCP avoids the Two Armies Problem by using timeouts and packet retransmissions

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

Problems to solve with acks

A

how long to wait before a resend?
how many times to resend before giving up? how long B should wait before sending the ACK?
IP datagrams can arrive out of order

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

Problems to solve with tcp

A

how to maintain order in the data
how to manage duplicates
flow control

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

TCP packets are often called…

A

segments

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

what are the most important headers of tcp

A

sequence and acknowledgement 32bits each

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

given Every byte in a TCP connection is numbered, how is data “counted”

A

The 32 bit sequence number starts at some random value and increases by 1 for each byte sent
So if a segment contains 10 bytes of data, the sequence number on the next segment sent will be 10 greater

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

how does tcp implement full duplex

A

by keeping independent sequence numbers and flow control

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

Acknowledgment number

A
Acknowledgment number (32 bits)
If the ACK flag is set then the value of this field is the next sequence number that the sender of the ACK is expecting. This acknowledges receipt of all prior bytes (if any). The first ACK sent by each end acknowledges the other end's initial sequence number itself, but no data.
17
Q

Sequence number

A

Sequence number (32 bits)
Has a dual role:
If the SYN flag is set (1), then this is the initial sequence number. The sequence number of the actual first data byte and the acknowledged number in the corresponding ACK are then this sequence number plus 1.
If the SYN flag is clear (0), then this is the accumulated sequence number of the first data byte of this segment for the current session.

18
Q

what is an obstacle to TCP

A

fragmentation

In this case TCP must wait for all the fragments and reconstruct the segment before it can send the ACK

19
Q

give an example of the ack number chosen by the receiver after having received some data

A

The returning ACK field contains the sequence number of the next byte the destination expects to receive, e.g., if the sequence number is 20000 and 14 bytes are received it returns 20015 in the ACK field

20
Q

PAWS and tcp

A

PAWS uses the same TCP Timestamps option as the RTTM mechanism described earlier, and assumes that every received TCP segment (including data and ACK segments) contains a timestamp SEG.TSval whose values are monotone non-decreasing in time. The basic idea is that a segment can be discarded as an old duplicate if it is received with a timestamp SEG.TSval less than some timestamp recently received on this connection.

21
Q

list all tcp flags

A
  • URG: urgent data
  • ACK: the acknowledgement field is active
  • PSH: push this data to the application as fast as possible • RST: reset (break) the connection
  • SYN: synchronise a new connection
  • FIN: finish a connection
  • ECE: congestion notification
  • CWR: congestion window reduced
  • 4 reserved bits, set to 0