Lesson 2: Study Guide Flashcards
What does the transport layer provide?
provides an end-to-end connection between two applications running on different/same hosts.
What is a packet for the transport layer called?
segment
What are the two main protocols within the transport layer?
1) Transmission Control Protocol - TCP (reliability)
2) User Datagram Protocol - UDP (basic functionality)
What is multiplexing, and why is it necessary?
transport layer’s ability for a host to run multiple applications to use the network simultaneously, this is performed by using ports; each application opens socket and has own port number, which enables multiple applications on same IP address and same host
Describe the two types of multiplexing/demultiplexing.
1) Connectionless (UDP): The identifier of a UDP socket is a two-tuple that consists of a destination IP address and a destination port number. Transport layer encapsulates application message by appending source and destination port.
2) Connection-oriented (TCP): The identifier for a TCP socket is a four-tuple that consists of the source IP, source port, destination IP, and destination port. Client sends request from socket to server’s welcoming socket, 3-way handshake, then server creates a new socket for the connection. send and receive is enabled on this connection.
What are the differences between UDP and TCP?
UDP
- Connectionless (no 3-way handshake)
- Unreliable (no delivery guarantee)
- Basic functionality
- Relies on application layer to implement the other functionalities
- Less delay, better control over sending data
- NO transmission control (flow or congestion)
TCP
- Connection oriented (3-way handshake)
- Reliable, guarantees IN ORDER delivery without any loss
- Flow control, congestion control
- Goal of end-to-end communication
When would an application layer protocol choose UDP over TCP?
if application is senstive to delays, despite possible higher packet loss
Explain the TCP Three-way Handshake
- TCP client sends connection request, a special segment with no data (SYN = 1)
- Server sends back a special “connection-granted” segment (SYNACK)
- TCP client sends acknowledgement (SYN = 0)
the network layer is unreliable
Explain the TCP connection tear down.
- TCP client sends special segment with no data (FIN = 1).
- Server acknowledges the request to close connection (ACK).
- Server sends segment to indicate the connection is closed (FIN=1).
- TCP client sends acknowledgment to the server (ACK).
What is Automatic Repeat Request or ARQ?
method that uses acknowledgements and timeouts to determine if a segment was lost or not. Purpose is to achieve reliability
What is Stop and Wait ARQ?
Sender sends a packet and waits for acknowledgement from the receiver for a specified time (timeout period)
Simplest way to implement ARQ, but low performance
What is Go-back-N?
- Receiver notifies sender of a missing packet by sending an ACK for the most recently received packet
- Sender sends ALL packets from the most recently received packet, even if some have been sent before
- Receiver discards any out-of-order received packets
Can cause a lot of unnecessary retransmissions, so a sender can send AT MOST N segments without waiting for acknowledgements
What is selective ACKing?
- Sender retransmits only the packets it suspects were received in error
- Receiver acknowledges a correctly received packet, even if out of order
- Out of order packets are buffered until missing packets received
What is fast retransmit?
When a sender receives 3 duplicate ACKs for a packet from the receiver, the sender considers the packet to be lost and will retransmit instead of waiting for timeout
What is transmission control, and why do we need to control it?
controlling the transmission rate from one host to another. need it for fairness