Unit 8: Transport Layer Flashcards
Transport layer is the communication between ______
Processes
a) Define Multiplexing at sender
b) What is created and by what process?
a) Handling data from mutltiple sockets, adding transport header and transporting these to the network layer
b) Segments are created by encapsulation
Define Demultiplexing at receiver
Receiving transport layer segments (from network layer), checking the header to find corresponding socket and delivering messages to app layer
How many bits make up UDP port header?
32
What uniquely identifies a socket in UDP?
Destination IP address + port
a) Define Connectionless Demultiplexing
b) What is an issue with this method and give an example of where this would cause issues?
a) IP datagrams with the same destination port but different source IP and/or port are directed to the same socket at destination
b) In telephony for example, different people could send audio signals at the same time to the same person
a) Define Connection-Oriented Demultiplexing
b) What protocol uses this?
c) What is an issue with this method and why?
a) Using both the source IP/port and destination IP/port to uniquely identify socket
b) TCP
c) Web servers have different sockets for each connecting client and in non-persistent HTTP, different socket for each request. This leads to large overhead
a) Define Multi-Threading and explain how it works
b) What type of connection is supported by multi-threading?
a) A server instance is run in a single process that deals with each client request in a single different thread. With each thread, the server creates a distinct socket associated to the TCP connection
b) Concurrent HTTP connections
a) Give 2 negative qualities of UDP
b) Give 2 reasons why it is connectionless
a) UDP segments may be lost and delivered out of order
b) There is no handshaking and each UDP segment is delivered independently
a) Give 2 real usages of UDP and why UDP suits these.
b) Give 4 sometimes useful qualities of UDP
a) Streaming multimedia - can tolerate lossy data. DNS - lower overhead than using TCP
b) (1) There is no connection overhead. (2) It is simple - no connection state at sender/receiver. (3) Small header size. (4) No congestion control means segments can be transmitted as fast as desired
Explain the steps to create a checksum
- Split body into 16-bit and add together
- Wraparound any leading 1s
- Invert
Define rdt 1.0 and the environment this is used in
Reliable transfer over a reliable channel where there are no bit errors or loss of packets
a) Define rdt 2.0 and the environment this is used in
b) What three features were brought in for rdt 2.0 to address this?
a) A channel with bit errors (flipping bits)
b) (1) ACKS - receiver tells sender packet was received ok. (2) NAKS - receiver tells sender packet had errors. (3) Checksums
What happens in an operation with no errors in rdt 2.0?
- Sender sends packet
- Receiver receives packet, responds with ACK.
- Sender receives ACK and moves on
What happens in an operation with errors in rdt 2.0?
- Sender sends packet
- Receiver receives corrupt packet and responds with NAK
- Sender receives NAK and retransmits packet
a) Define and explain rdt 2.1
b) What was feature was introduced?
a) Senders handle garbled ACK/NAKs by using a sequence number. If sender received corrupted ACK/NAK, sequence number is set to 1 to indicate duplicate packet. If receiver gets a sequence number that differs from expected i.e. a duplicate, packet is discarded and an ACK sent back
b) Sequence numbers
Why do 2 sequence numbers suffice in rdt 2.1?
0 indicates new packet, 1 indicates retransmission
a) Define rdt 2.2 and the difference between rdt 2.1
b) How does ACKing work?
c) What does a duplicate ACK at sender mean?
a) rdt 2.2 removed NAKs and instead sends an ACK to indicate the last packet was received ok
b) The receiver includes sequence number of packet being ACKed
c) There was an error at receiver so retransmit the packet
a) Define rdt 3.0 and the environment this is used in
b) What feature was introduced and why?
a) Channels with errors and loss in which ACKs may never be received
b) Timers to wait a reasonable amount of time for an ACK to come back. Upon timeout, retransmit packet. If packet or ACK is a retransmission, the sequence number indicates this
a) What happens in premature timeout?
b) What does this lead to?
a) The sender waits too short of a time for an ACK to return from the receiver when it is just delayed
b) The sender resends the packet after timeout and the receiver sees this as a duplicate, so retransmits the ACK. Meanwhile, the original ACK arrives at sender, so sender begins to transmit another packet. Upon arrival of second ACK, the sender now thinks this is a duplicate so resends the packet. The receiver sees the duplicate packet so retransmits ACK. This leads to unnecessary retransmissions
a) What can be done to avoid unnecessary timeouts?
b) What is still a problem with doing this?
a) Discarding duplicate ACKs at sender
b) The sender doesn’t know whether the duplicate ACK was caused by corruption of packet at receiver or by premature timeout
Give the formula for calculating Transmission Delay
L = packet length (bits). R = Bandwidth (bps)
Transmission delay = L/R
a) Give the formula for calculating Sender Utilisation via stop-and-wait
b) What does this represent?
a)
Transmission delay (L/R)
———————————–
RTT + Transmission delay
b) The fraction of time the sender is busy sending
a) How would you calculate Sender Utilisation when using Pipelining?
b) Define pipelining
a)
No. of packets pipelined * Transmission delay (L/R)
————————————————————————-
RTT + Transmission delay
b) Multiple ‘in-flight’ packets sent concurrently, don’t have to wait for packet to be received to send the next