Week 2 Transport layer Flashcards

1
Q

What is multiplexing

A

2 hosts being able to communicate simultaneously

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

aim of tcp

A

.deliver packets between processes
. segmentation
. reliable delivery
. flow control

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

What key components are inside the TCP message header?

A

Key Components of the TCP Header:

Source Port: Identifies the sender’s port.

Destination Port: Identifies the receiver’s port.

Sequence Number: Number assigned to the first byte of the current data segment — used for ordering.

Acknowledgment Number: Indicates the next byte expected by the receiver (1 + last byte acknowledged) — used for reliability.

Window Size: Number of bytes the receiver is prepared to accept — used for flow control.

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

What are the features of tcp that allow it to get to its function

A

Function Segmentation - segments broken down according to Maximum segment size

RELIABILITY - acknowledgement no - allows us to determine the last byte received which is useful when detecting lost packets and corruption etc

flow control - window size tells us how much more data receivers buffer can handle

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

2 main ways TCP Handles packet Loss

A

. Duplicate ACK
. timeout

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

explain duplicate ack

there is an example there too

A

Duplicate ACKs occur when the receiver receives segments out of order or a segment is lost.

The receiver sends an ACK for the last in-sequence byte it received correctly.

When the sender receives 3 duplicate ACKs (4 total ACKs for the same sequence number), it triggers Fast Retransmit and immediately retransmits the missing segment.

EXAMPLE:

Sender sends 4 segments (each 1000 bytes):
Segment 1 (Seq 1,000–1,999),
Segment 2 (Seq 2,000–2,999),
Segment 3 (Seq 3,000–3,999),
Segment 4 (Seq 4,000–4,999).

Segment 2 is lost (Seq 2,000–2,999).

Receiver gets Segment 1, 3, and 4, but since Segment 2 is missing:
First ACK for 2,000 (expected byte).
Duplicate ACK 1: ACK 2,000 (after Segment 3).
Duplicate ACK 2: ACK 2,000 (after Segment 4).
Duplicate ACK 3: ACK 2,000 (still waiting for Segment 2).
Sender receives 3 duplicate ACKs (4 ACKs in total for Seq 2,000) and retransmits Segment 2 immediately.

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

explain time out

There is an example there too

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

What is TCP

A

TCP (Transmission Control Protocol) provides reliable, ordered, and error-checked delivery of a byte stream between applications. It breaks the data into segments, each less than or equal to the Maximum Transmission Unit (MTU), ensuring efficient transmission. If any segments are lost during transmission, TCP retransmits them to maintain data integrity.

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

Why do you need to distinguish TCP connections

A

due to the concept of multiplexity , TCP connections can be sent simultaneously ( need to be able to distinguish)

fun fact lets say you are sending a request to the same server
since we know the way to distinguish involves source socket(source IP and source port) and destination socket pair(destination IP and destination port)
TCP automatically makes the source port unique ( to be able to distinguish what is essentially the same request)

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

what is a socket

A

pair of ip address and port

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

How to distinguish TCP connections

A

source socket(source IP and source port) and destination socket pair(destination IP and destination port)
uniquely distinguishes connections

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

functionality of transport layer

A

Deliver packets between
two processes
* Reliable delivery
* Segment packets
* Flow control

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

what is sequence number

A

Sequence number:
each byte of data assigned unique sequence number in ascending order, indicating position in byte stream. Each TCP segment carries a sequence number that corresponds to the first byte of data it contains, allowing the receiver to properly reassemble segments and ensure the correct order of all bytes, even if they arrive out of sequence.

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

Example of how sequence number works

A

0 1 2 3 4 5 6 7 8 9 10 11
“H E L L O , W O R L D !”

Byte Sequence Numbers:

Byte 1: ‘H’
Byte 2: ‘e’
Byte 3: ‘l’
Byte 4: ‘l’
Byte 5: ‘o’
Byte 6: ‘,’
Byte 7: ‘ ‘ (space)
Byte 8: ‘W’
Byte 9: ‘o’
Byte 10: ‘r’
Byte 11: ‘l’
Byte 12: ‘d’
Byte 13: ‘!’

TCP may segment the data into smaller pieces:
Segment 1: Contains bytes 1 to 8 (“Hello, W”)
- segment’s sequence number would be 1 [ first byte of the segment]

Segment 2: Contains bytes 9 to 13 (“orld!”)
* Sequence Number: 9 (indicating the first byte of this segment)

The segments may arrive in different order but TCP will order according to segments sequence number ( bytes in segment 1 followed by bytes in segment 2)

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

acknowledgement number

A

Acknowdgement number- indicates the next byte we need to receive
= 1 plus the byte that just came through

sequence numbers 1 to 1000.
the receiver will send an ACK with an acknowledgment number of 1001, meaning “I’ve received bytes 1 to 1000, and I’m ready to receive byte 1001 next.”

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

Window size

A

window size is how much data it can receive until buffer becomes full

17
Q

Ports help distinguish between different applications running on the same host.

18
Q

2.3 What role do routers play in a TCP connection?

A

Routers do not track individual TCP connections. They are stateless regarding the connection. They forward IP packets based on the IP header without knowing or caring about TCP ports.

19
Q

what port is http

20
Q

what port is https

21
Q

Latency refers to the time it takes for data to travel from the sender to the receiver across a network.