Chapter #8 - Tansport Layer

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/39

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 9:48 AM on 8/15/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

40 Terms

1
New cards

What is the primary goal of the transport layer?

Reliable, efficient, low-cost process-to-process (end-system-to-end-system) data transport, independent of the underlying network.

2
New cards

What are the two service types a transport layer can offer?

Connection-oriented (3 phases: setup, data transfer, disconnect) and connectionless (transfer of isolated units).

3
New cards

Why do we need both a network layer and a transport layer if both offer similar services?

The network service is fixed (not user-influenced); the transport layer improves its quality โ€” e.g., adding reliability on top of an unreliable network.

<p>The network service is fixed (not user-influenced); the transport layer <em>improves</em> its quality โ€” e.g., adding reliability on top of an unreliable network.</p>
4
New cards

Where is the transport entity typically implemented?

In the OS kernel (as a process or library).

5
New cards

What is a TPDU?

Transport Protocol Data Unit โ€” the data unit exchanged at the transport layer.

<p>Transport Protocol Data Unit โ€” the data unit exchanged at the transport layer.</p>
6
New cards

Data unit names per layer (Transport / Network / Data Link / Physical)?

TPDU / Packet / Frame / Bit-Byte (bitstream)

7
New cards

What is a TSAP?

Transport Service Access Point โ€” the generic term for a transport layer address; called a port in the Internet.

<p>Transport Service Access Point โ€” the generic term for a transport layer address; called a <strong>port</strong> in the Internet.</p>
8
New cards

What is the analogous address concept at the network layer?

NSAP (Network Service Access Point) โ€” e.g., an IP address.

9
New cards

What are the 3 approaches to finding a service provider's TSAP?

  • Well-known ports โ€” pre-defined TSAPs for common services (e.g., port 13 = time of day). Simple but wastes resources.

  • Initial connection protocol โ€” a process server listens on many ports, spawns the right service on demand. Good for on-demand servers.

  • Name server (directory server) โ€” client asks a name server for the TSAP of a service by name, then connects directly.

10
New cards

What is a key disadvantage of well-known ports?

Waste of resources (rarely used servers must stay active and listening); not suitable for user-specific processes.

<p>Waste of resources (rarely used servers must stay active and listening); not suitable for user-specific processes.</p>
11
New cards

What is a key disadvantage of the initial connection protocol?

Not suitable if the service exists independently on a different machine (e.g., a file server).

<p>Not suitable if the service exists independently on a different machine (e.g., a file server).</p>
12
New cards

How does addressing differ between DL and TL?

DL: outgoing router line identifies the next hop. TL: explicit addressing of the destination process is required.

13
New cards

How does connection establishment differ?

DL: the peer is always present (direct link). TL: reachability of the peer may be uncertain.

14
New cards

How does storage capacity in the subnet affect TL vs. DL?

DL: negligible storage in the medium. TL: packets can be stored anywhere and delivered much later โ€” a serious problem (duplicates).

15
New cards

How does flow control complexity differ?[DL & TL]

DL: few outgoing lines โ†’ simple buffer allocation. TL: potentially many dynamic connections โ†’ flexible schemes needed.

16
New cards

List the 8 Berkeley socket primitives and their meanings.

Primitive

Meaning

SOCKET

Create communication endpoint

BIND

Attach local address

LISTEN

Announce readiness to accept

ACCEPT

Block until connection arrives

CONNECT

Actively establish a connection

SEND

Send data

RECEIVE

Receive data

CLOSE

Release connection

17
New cards

What is a "duplicate" in transport layer context?

A packet that arrives at the receiver at an unintended later time โ€” caused by varying transit times, retransmissions after timeout, network storage, or packet replication.

<p>A packet that arrives at the receiver at an unintended later time โ€” caused by varying transit times, retransmissions after timeout, network storage, or packet replication.</p>
18
New cards

What is the core danger of duplicates?

The receiver cannot distinguish real data from duplicates โ†’ may re-execute a transaction (e.g., double bank transfer).

<p>The receiver cannot distinguish real data from duplicates โ†’ may re-execute a transaction (e.g., double bank transfer).</p>
19
New cards

How are duplicates within a connection handled?

Use consecutive sequence numbers from a sufficiently large range (TCP uses 32-bit sequence numbers).

20
New cards

Why is a 32-bit sequence number range potentially insufficient today?

At 10 Gbit/s, the sequence number space wraps around in ~3.4 seconds; old packets can still be in the network.

21
New cards

How are duplicates handled across consecutive connections or after a crash?

Choose the initial sequence number wisely, considering the maximum message lifetime (MSL).

22
New cards

How do you prevent a duplicate connection request from being accepted as a new connection?

Use the three-way handshake โ€” both sides must confirm each other's sequence numbers.

23
New cards

Why is a 2-message connection setup (CR + CC) insufficient?

delayed duplicate CR from an old session can cause the receiver to accept a new (unwanted) connection.

<p>delayed duplicate CR from an old session can cause the receiver to accept a new (unwanted) connection.</p>
24
New cards

Describe the three-way handshake steps. {Transport Layer Connection Establishment}

  • CR(X): Initiator A sends Connect Request with sequence number X.

  • CC(Y,X): Receiver B responds with its own random sequence number Y and echoes X.

  • ACK(X,Y): A acknowledges both X and Y; B accepts data only after receiving a valid ACK.

<ul><li><p><strong>CR(X):</strong> Initiator A sends Connect Request with sequence number X.</p></li><li><p><strong>CC(Y,X):</strong> Receiver B responds with its own random sequence number Y and echoes X.</p></li><li><p><strong>ACK(X,Y):</strong> A acknowledges both X and Y; B accepts data only after receiving a valid ACK.</p></li></ul><p></p>
25
New cards

In TCP, what does the ACK number actually acknowledge?

The next byte expected, not the last byte received โ€” so ACK = X+1, Y+1.

26
New cards

How does the three-way handshake handle a duplicate CR(X) with old data?

B sends CC(Y,X); A replies with ACK(X,Z) where Zโ‰ Y (old sequence number) โ†’ B discards it (DISCARD Zโ‰ Y).

27
New cards

What are the two disconnect variants?

Asymmetric: disconnect in one direction closes both. Symmetric: each direction is closed independently.

28
New cards

What is the risk of asymmetric disconnect?

Data loss โ€” data in transit when the disconnect request is sent is not delivered.

<p>Data loss โ€” data in transit when the disconnect request is sent is not delivered.</p>
29
New cards

How does symmetric disconnect avoid data loss?

A host that has sent a DISCONNECT can still receive data; both sides must independently send a disconnect.

<p>A host that has sent a DISCONNECT can still <em>receive</em> data; both sides must independently send a disconnect.</p>
30
New cards

When does symmetric disconnect fail?

When a host doesn't know how much data it will still receive after sending its disconnect.

31
New cards

How is disconnect made reliable using a three-way handshake?

  • A sends DR + starts timer.

  • B sends DR + starts timer.

  • A sends ACK โ†’ both release.

  • If last ACK is lost โ†’ B's timer disconnects it (no problem).

  • If B's DR is lost โ†’ A retransmits DR on timeout; B retransmits.

  • If all DRs lost โ†’ both sides disconnect by timeout (N timeouts).

<ul><li><p>A sends DR + starts timer.</p></li><li><p>B sends DR + starts timer.</p></li><li><p>A sends ACK โ†’ both release.</p></li><li><p>If last ACK is lost โ†’ B's timer disconnects it (no problem).</p></li><li><p>If B's DR is lost โ†’ A retransmits DR on timeout; B retransmits.</p></li><li><p>If all DRs lost โ†’ both sides disconnect by timeout (N timeouts).</p></li></ul><p></p>
32
New cards

What is a "half-open connection"?

When one side has disconnected but the other still has the connection state โ€” caused when all disconnect requests are lost.

33
New cards

How is a half-open connection prevented?

Activity strategy: if no TPDU arrives within a timeout, auto-disconnect. Keep-alive "Dummy-TPDUs" are sent to keep the connection active when no data is flowing.

34
New cards

What do TL and DL flow control have in common?

Both prevent a fast sender from flooding a slow receiver; both require the sender to buffer unacknowledged packets.

35
New cards

Name the 3 flow control strategies at the transport layer.

  • Sliding window / static buffer allocation

  • Sliding window / no buffer allocation

  • Credit mechanism / dynamic buffer allocation

36
New cards

Sliding window + static buffer allocation โ€” characteristics?

+Receiver reserves 2ยทw buffers per duplex connection.

-High buffer usage, poor utilization for low-throughput connections. โ†’ Best for high-throughput traffic.

37
New cards

Sliding window + no buffer allocation โ€” characteristics?

+Receiver allocates buffers on TPDU arrival; discards if no buffer available.

+Optimized memory use.

-High discard rate under heavy load. โ†’ Best for intermittent/bursty low-throughput traffic.

38
New cards

Credit mechanism โ€” how does it work?

Sender requests buffers; receiver grants credits dynamically. ACK = confirmation only; CREDIT = buffer grant. Sender blocks when credits exhausted. Receiver adjusts credits based on buffer situation, #connections, connection type.

39
New cards

In the credit mechanism, what is the difference between ACK and CREDIT?

ACK confirms receipt only (does not free sender to send more). CREDIT explicitly grants buffer slots the sender may use.

40
New cards

What type of traffic is the credit mechanism best suited for?

All types โ€” it dynamically adjusts: many buffers for high-throughput, few for low-throughput connections.