Transport Layer

studied byStudied by 3 people
5.0(1)
Get a hint
Hint

What is the difference between IP and TCP?

1 / 62

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

63 Terms

1

What is the difference between IP and TCP?

TCP is connection-oriented, meaning it needs traffic to be routable in both directions between 2 hosts

New cards
2

How are TCP connections uniquely identified?

Through sockets

New cards
3

How can TCP communicate?

Through ports and sockets

New cards
4

Multiplexing

2 hosts can have more than 1 conversation simultaneously

New cards
5

TCP flow

Identified by a 4-tuple

- Source IP address

- Source port number

- Destination IP address

- Destination port number

New cards
6

Socket

Combinations of an IP address, and a TCP port number

New cards
7

Who maintains the list of assigned TCP ports?

IANA

New cards
8

TCP header

- 32 bits wide

- Includes source and destination port

- Header has a mandatory 20 bytes as well as optional extensions

- Sequence number

- Acknowledgement number

- Window size

- Flags e.g SYN, ACK, FIN

<p>- 32 bits wide</p><p>- Includes source and destination port</p><p>- Header has a mandatory 20 bytes as well as optional extensions</p><p>- Sequence number</p><p>- Acknowledgement number</p><p>- Window size</p><p>- Flags e.g SYN, ACK, FIN</p>
New cards
9

How long is a port?

16 bits long

New cards
10

What is the maximum value a port can have?

2^16 - 1

New cards
11

What is the sequence number used for in a TCP message header?

- For order + reassembly

- It is the number assigned to the first data byte of a segment

New cards
12

What is the acknowledgement number used for in a TCP message header?

- For reliability

- It is next sequence number that the sender of the ACK message expects (or the sequence number + 1)

New cards
13

What is the window size used for in a TCP message header?

- For flow control

- It is the number of bytes a receiver can get

New cards
14

Where is a TCP message encapsulated in?

An IP message

New cards
15

What is the client/server model?

- A server is a host that is ready to accept communication on 1+ ports

- A client is a host that initiates communication with a server

<p>- A server is a host that is ready to accept communication on 1+ ports</p><p>- A client is a host that initiates communication with a server</p>
New cards
16

TCP connection setup/ 3-way handshake

1. Client synchronises with server (SYN)

2. Server acknowledges synchronise (SYN ACK)

3. Client acknowledges server acknowledgement (ACK)

4. Connection is set up

<p>1. Client synchronises with server (SYN)</p><p>2. Server acknowledges synchronise (SYN ACK)</p><p>3. Client acknowledges server acknowledgement (ACK)</p><p>4. Connection is set up</p>
New cards
17

TCP connection tear-down

1. Client sends finalise (FIN)

2. Server acknowledges finalise (ACK + FIN)

3. Client acknowledges acknowledgement (ACK)

4. Connection closes

<p>1. Client sends finalise (FIN)</p><p>2. Server acknowledges finalise (ACK + FIN)</p><p>3. Client acknowledges acknowledgement (ACK)</p><p>4. Connection closes</p>
New cards
18

TCP segment

Data that has been divided into chunks and had a TCP header added to it

New cards
19

What can a host do to avoid data fragmentation in the IP layer?

Add a maximum segment size to the TCP header

New cards
20

What is a maximum segment size?

The largest IP datagram a host can handle MINUS the IP and TCP header sizes

New cards
21

What is the equation that links MTU and MSS together?

MSS = MTU - 40

- 20 bytes for the IP header

- 20 bytes for the TCP header

<p>MSS = MTU - 40</p><p>- 20 bytes for the IP header</p><p>- 20 bytes for the TCP header</p>
New cards
22

In what types of segments is the MSS value sent?

In SYN segments

New cards
23

What is the default value for MSS?

536 bytes

New cards
24

Is the MSS value negotiated between hosts?

No! Each host dictates the MSS for its receiving direction of flow

New cards
25

Types of TCP reliability mechanisms

- Duplicate acknowledgement retransmission

- Timeout-based retransmission

New cards
26

Duplicate acknowledgement retransmission

- Acknowledgement numbers sent for each ACK segment are cumulative

- If a segment is lost, the receiver will acknowledge the same segment over and over again until the info in the lost segment is received

- The sender interprets this as packet loss

New cards
27

Timeout-based retransmission

- When a sender sends a segment, it starts a timer

- If the timer runs out before an ACK is received, the segment is sent again

New cards
28

What concept is associated with the window size header?

Sliding window approach

New cards
29

What is the sliding window approach?

- When a TCP segment is received, the window size value is read

- The sender cannot send any bytes past this window size until an ACK segment is received

- When an ACK segment is received, the window size is updated according to the receiver's capacity

New cards
30

What happens when TCP sequence numbers and window sizes overflow?

The number rolls back to 0

New cards
31

What happens when a sender receives a window size of 0?

The sender stops sending data

New cards
32

After a sender receives a window size of 0, what is the name of the timer that begins?

Persist timer

New cards
33

What is a persist timer?

- Used to time elapsed time after window size of 0 is sent

- Checks if 0 was sent on purpose or because of lost/corrupt segments

- When timer expires, small empty segment sent so that receiver sends another acknowledgement

New cards
34

What is congestion?

When the amount of traffic within a network overwhelms router buffers

New cards
35

Congestion vs flow control

Congestion concerns router buffers, whilst flow control concerns receiver buffers

New cards
36

What does congestion cause?

- Long delays

- Packet loss

- Decreased throughput due to more unneeded and duplicate retransmissions

New cards
37

Approaches to congestion control

- End-end (Do nothing)

- Network-assisted (Feedback to hosts)

New cards
38

What is a type of TCP congestion control?

Additive Increase Multiplicative Decrease (AIMD)

New cards
39

What is Additive Increase Multiplicative Decrease (AIMD)?

- Senders can increase sending rate slowly until segment loss occurs, in this case, decrease sending rate quickly to isolate issues

New cards
40

What is TCP Slow Start?

- An algorithm used to increase from initial sending rate of 1 MSS exponentially after every round trip until loss

- This occurs until a threshold amount, and then additive increase starts

New cards
41

When segment loss occurs, how does AIMD decrease sending rate?

AIMD cuts sending rate in half at each loss event

New cards
42

What is the rate of additive increase in AIMD?

1 MSS every round trip time (RTT)

New cards
43

Naming concerns

- TCP itself doesn't treat port numbers specially, but IANA sets well-known port numbers for different applications to be easily identifiable e.g http = 80, https = 443

- Ports 49152 - 65335 are unregistered for dynamic/private ports

New cards
44

Session/state concerns

- TCP is connection-oriented, meaning that a state transition machine captures both client and server states

- Messages can be sent as long as session is open

New cards
45

Security concerns

- No security features, all header and payload details are visible

- Transport Layer Security (TLS) aims for end-to-end security

- Attacks include TCP reset attacks, TCP connection hijacking, TCP SYN floods

New cards
46

Reliability concerns

- Considered reliable due to timeouts and acknowledgements meaning everything transmitted will be delivered eventually

- TCP checksums can detect errors in payload

New cards
47

Scalability concerns

- TCP benefits from IP scalability

- TCP connection setup time can affect performance

New cards
48

Management concerns

- No real management issue apart from applications being able to choose their own ports locally

New cards
49

Governance concerns

- Internet Engineering Task Force (IETF) standardise and govern TCP

- IANA maintain official assignments of port numbers

New cards
50

Description concerns

Transport layer is not self-describing nor queryable

New cards
51

What is User Datagram Protocol (UDP)?

- Second transport layer

- Used by apps that don't need guaranteed delivery of TCP

New cards
52

What does UDP do differently from TCP?

- Takes app data and creates UDP datagram and sends this to network layer

New cards
53

UDP header

Only 4 headers

- Source port

- Destination port

- Checksum

- Length

New cards
54

What are the properties of UDP?

- Connectionless

- Datagram service, meaning packets show up in no order

- Self-contained datagrams

- Unreliable delivery

New cards
55

HTTP request structure

1. Start line

2. Properties

<p>1. Start line</p><p>2. Properties</p>
New cards
56

HTTP response structure

1. Start line

2. Headers

3. Body

New cards
57

What is a URI?

- Uniform Resource Identifier

- Compact string of chars for identifying a resource

- Clients don't look at URI content

<p>- Uniform Resource Identifier</p><p>- Compact string of chars for identifying a resource</p><p>- Clients don't look at URI content</p>
New cards
58

Resource naming hierarchy

- Internationalised Resource Identifier (IRI) is the superset

- Uniform Resource Identifier (URI) is a subset of IRI and a general version of different naming conventions

- Uniform Resource Locator (URL) and Uniform Resource Name (URN) are subsets of URI

New cards
59

What is the web architecture?

A network of named resources

New cards
60

What is a resource?

- Anything with an identity

- Can be retrievable e.g a document, non-retrievable e.g a book, or abstract e.g relationships

New cards
61

What does the web architecture define?

An interface to interact with resources via HTTP

New cards
62

What is a representation?

- Information that is intended to reflect a past, current, or desired state of a given resource

- In a format that can be communicated via protocols

New cards
63

Relationship between resources and representations

- Named resources are represented by representations

- Representations are an abstraction needed to represent the state of a resource during communications

New cards

Explore top notes

note Note
studied byStudied by 4 people
... ago
5.0(1)
note Note
studied byStudied by 2 people
... ago
5.0(1)
note Note
studied byStudied by 10 people
... ago
5.0(1)
note Note
studied byStudied by 35 people
... ago
5.0(1)
note Note
studied byStudied by 5 people
... ago
5.0(1)
note Note
studied byStudied by 2 people
... ago
5.0(1)
note Note
studied byStudied by 5 people
... ago
5.0(1)
note Note
studied byStudied by 39 people
... ago
5.0(1)

Explore top flashcards

flashcards Flashcard (30)
studied byStudied by 5 people
... ago
5.0(1)
flashcards Flashcard (20)
studied byStudied by 40 people
... ago
5.0(5)
flashcards Flashcard (35)
studied byStudied by 54 people
... ago
5.0(1)
flashcards Flashcard (27)
studied byStudied by 7 people
... ago
5.0(1)
flashcards Flashcard (56)
studied byStudied by 13 people
... ago
5.0(1)
flashcards Flashcard (22)
studied byStudied by 4 people
... ago
5.0(1)
flashcards Flashcard (60)
studied byStudied by 53 people
... ago
5.0(1)
flashcards Flashcard (188)
studied byStudied by 5 people
... ago
5.0(1)
robot