What is the transport layer?
The transport layer connect the network layer wit the application layer to provide data transport from a process of one station to another by providing the needed reliability independent of the physical conditions.
How does the logical communication of the network layer and the transport layer differ?
  • Network layer: logical communication between hosts (IP);
  • Transport layer: logical communication between processes (IP+port).

Why is flow control necessary in network communication?

Devices have different speed at which they process incoming data. The sender avoids buffer overflow at the destination.
Does UDP and TCP have congestion control?
No, only TCP. UDP has no built-in mechanism for flow control or congestion control.
Why is UDP faster than TCP?
TCP has more overhead as it has a larger header, congestion control and needs need for an acknowledgement for the sent packets.
What are two protocols for flow control used by the Transport- and Data Link Layer?
Sliding window protocol and atlernating bit (stop & wait).
What is congestion control?
To keep network ztilization high, hosts should react to congestion by adapting their send rates. It's all about ssharing the network with others.

What is the Sliding Window Protocol?

The sliding window protocol is that provides flow contro, reliability where needed, connection-oriented communication and multiplexing.
Sliding window method: When does the window slide over the remaining data and start to transmit the next packets of data?
After data is acknolwedged by the destination. The window size represents the maximum number of packets that can be sent without waiting for acknolwedgement.
Why is the alternating bit protocol a special case of the sliding window protocol?
Because the alternating bit protocol uses a window of 1 bit.
What is the difference between the alternating bit and sliding window method?
The window size for alternating bit is always 1 while in the sliding window protocol it can have any window size.
How does TCP ensure that the sender and receiver are in sync?
Through the use of the sliding window protocol.
What is RTT?
The Round Trip Time is the time (delay) that a packets needs from the source to the destination and back.
Sliding window: How does the sender determine whether a packet has been lost?
The sender uses timers to decide when to retransmit.
TCP: How is it the duration of the timer for a retransmit of non-acknowledged transmissions determined?
The timer is based on the round trip time (RTT). The RTT is constantly updated using the measurements of the timers.
Sliding window: What is the disadvantage of a too long or a too short timer?
A too short timer may cause extra traffic. And a too long timer can cause larger delays.
Flow control: When does TCP interrupt sending data temporarily?
When either the flow control or congestion window is full.
How are lost packets in TCP and UDP recognized?
TCP: With the sliding window protocol; UDP does not recognize lost packets.
What's different between the UDP and TCP checksum field?
For UDP the checksum is optional. However, both UDP and TCP are based on the IP protocol which has a checksum.
Why is UDP unreliable?
Because it's connectionless.

What is a network socket

A socket is an ednpoint that identifies a connection on the network for communication.
What are the socket primitives for TCP?
  • SOCKET: create a new endpoint
  • BIND an address to a newly created socket.
  • LISTEN: waiting to accept connections.
  • ACCEPT: establish an incoming connection.
  • CONNECT: attempt to establish a connection;
  • SEND: send data;
  • RECEIVE data;
  • CLOSE: release a connection.
What are some protocols that use UDP (User/Universal Datagram Protocol)
If one uses UDP and ordering is required, how can it be achieved?
Ordering would have to be managed by the application layer if required.
What header fields do both, TCP and UDP have incommon?
source port, destination port and checksum
What is the header size of UDP and TCP?
UDP 8 bytes and TCP 20 bytes.
TCP header: What is the urgent pointer field (URG)?
URG is set to 1 to indicate a byte offset from the current sequence number where urgent data is to be found. The idea is to use it instead of interrupt messages. However, this field is not often used.
TCP: When isthe ACK bit set to 1?
To indicate a valid acknowledgment. If not 1, the field is ignored.
TCP: What is the RST bit used for?
To indicate that the connection should be reset because of an error that can't be handled.
TCP: If the SYN bit is 1, does that always mean that a new connection is established?
No, it is used for a connection request and a connection accept (SYN = 1 and ACK = 1).
TCP header: What bit is used to release a connection?
The FIN bit indicates that the sender is finished with transmission.
How does demultiplexing work?
The received segments are delivered to the correct socket (of the application) using the IPs and port numbers.
How does multiplexing at the send host work?
The data is collected from multiple sockets.
Can a web server use a single socket for multiple connecting clients?
No, usually every connecting client has a different socket.
Why is UDP a "best effort" service?
Because segments may be lost and/or out of order.
What side of a TCP connection has a buffer?
The receiver has a buffer as the app process can be slow reding the data.
What type of errors can one detect with checksums and what types with sequence numbers?
  • Checksums: to detect corrupted packets;
  • Sequence numbers: to detect buffer overflow and packet loss.