CH 3 Transport Layer (Part 1)



Q-1 Discus the transport layer multiplexing and DE-multiplexing concept.
Multiplexing and De-multiplexing are the two very important functions of the transport layer
Transport layer at the sender side receives data from different applications, encapsulates every packet with a transport layer header and pass it on to the underlying Network Layer. This job of transport layer is known as Multiplexing.
At the receiver’s side the transport layer gathers the data, examines it socket and passes the data to the correct application. This is known as De-Multiplexing.
Sockets are the door between Transport and Application Layer. Let us take a very simple example that will make you clear with all these terms.
Suppose that there are two houses. One is in India and other is in America. In the house in India, lives a person James along with his 5 children. And in the house in America, lives a person Steve along with his 4 children. Now all 5 children of James write a letter to every children of Steve on every Sunday. Therefore total number of letters will be 20. Thus, all the children writes the letter, out them in envelopes and hand over it to James. Then James write source house address and the destination house address on the envelope and give it to postal service of India. Now the postal service of India puts some other addresses corresponding to the envelopes and will deliver those 20 letters to the Steve House. Steve collects the letter form the postman and after considering the name of his respective children on the envelopes, he gives the letter to each of them.
In this example we have processes and layers like mentioned below,
Processes=children
Application layer messages=envelopes
Hosts=the two houses
Transport layer protocol=James and Steve
Network layer protocol=postal service
When James collects all the letters from his children, he multiplexes all and encapsulates them with respective children name on the letter and house address and give it to the Indian postal service.
On the receiving side, Steve collects all the letters form postal service of America and DE-multiplexes them to see, which letter is for which child and delivers it respectively

Q2 Explain connection less transport protocol UDP with popular Internet applications.
The User Data-gram Protocol (UDP) is a transport layer protocol defined for use with the IP network layer protocol. It is defied by RFC 768 written by John Postal. It provides a best effort data-gram service to an End system
The service provided by UDP is an unreliable service that provides no guarantees for delivery and no protection from duplication. The simplicity of UDP reduces the overhead from using the protocol and the services may be adequate in many cases.
UDP provides a minimal, unreliable, best effort, message-passing transport to applications and upper-layer protocols. Compared to other transport protocols, UDP and its UDP-Lite variant are unique in that they do not establish end to end connections between communicating end systems. UDP communications consequently does not incur connection establishment and tear-down overheads and there is minimal associated end system state. Because of these characteristics, UDP can offer a very efficient communication transport to some applications, but has no inherent congestion control or reliability. A second unique characteristic of UDP is that it provides no inherent on many platforms, applications can send UDP data-grams at the line ate of the link interface, which is often much greater than the available path capacity, and doing so would contribute to congestion along the path, application therefore need to be designed responsibly.
One increasingly popular use of UDP is as a tunneling protocol, where a tunnel endpoint encapsulates the packets of another protocol inside UDP data-grams and transmits them to another tunnel endpoint, which DE-encapsulates the UDP data-grams and forwards the original packets contained in the payload. Tunnels establish virtual links that appear to directly connect locations that are distant in the physical Internet topology, and can be used to create virtual networks. Using UDP as a tunneling protocol is attractive when the payload protocol is not supported by middle boxes that may exist along the path, because many middle boxes support UDP transmissions.
UDP is also used in Media Streaming games and local broadcast mechanisms.

Q3 Explain rdt2.0 with FSM diagram
 A more realistic model of the underlying channel is one in which bits in a packet may be corrupted. Such bit errors typically occur in the physical components of a network as a packet is transmitted, propagates, or is buffered. We'll continue to assume for the moment that all transmitted packets are received (although their bits may be corrupted) in the order in which they were sent.
Before developing a protocol for reliably communicating over such a channel, first consider how people might deal with such a situation. Consider how you yourself might dictate a long message over the phone. In a typical scenario, the message taker might say ``OK'' after each sentence has been heard, understood, and recorded. If the message taker hears a garbled sentence, you're asked to repeat the garbled sentence. This message dictation protocol uses both positive acknowledgements (``OK'') and negative acknowledgements (``Please repeat that''). These control messages allow the receiver to let the sender know what has been received correctly, and what has been received in error and thus requires repeating. In a computer network setting, reliable data transfer protocols based on such re-transmission are known ARQ (Automatic Repeat request) protocols.
Figure shows the FSM representation of rdt2.0, a data transfer protocol employing error detection, positive acknowledgements (ACKs), and negative acknowledgements (NAKs).
The send side of rdt2.0 has two states. In one state, the send-side protocol is waiting for data to be passed down from the upper layer. In the other state, the sender protocol is waiting for an ACK or a NAK packet from the receiver. If an ACK packet is received (the notation rdt_rcv(rcvpkt) && isACK(rcvpkt) in Figure corresponds to this event), the sender knows the most recently transmitted packet has been received correctly and thus the protocol returns to the state of waiting for data from the upper layer. If a NAK is received, the protocol re-transmits the last packet and waits for an ACK or NAK to be returned by the receiver in response to the re-transmitted data packet. It is important to note that when the receiver is in the wait-for-ACK-or-NAK state, it can not get more data from the upper layer; that will only happen after the sender receives an ACK and leaves this state. Thus, the sender will not send a new piece of data until it is sure that the receiver has correctly received the current packet. Because of this behavior, protocols such as rdt2.0 are known as stop-and-wait protocols.
The receiver-side FSM for rdt2.0 still has a single state. On packet arrival, the receiver replies with either an ACK or a NAK, depending on whether or not the received packet is corrupted. In Figure the notation rdt_rcv(rcvpkt) && corrupt(rcvpkt)corresponds to the event where a packet is received and is found to be in error. 

Protocol rdt2.0 may look as if it works but unfortunately has a fatal flaw. In particular, we haven't accounted for the possibility that the ACK or NAK packet could be corrupted! (Before proceeding on, you should think about how this problem may be fixed.) Unfortunately, our slight oversight is not as innocuous as it may seem. Minimally, we will need to add checksum bits to ACK/NAK packets in order to detect such errors. The more difficult question is how the protocol should recover from errors in ACK or NAK packets. The difficulty here is that if an ACK or NAK is corrupted, the sender has no way of knowing whether or not the receiver has correctly received the last piece of transmitted data.
 
Q4 Explain the services provided by transport layer. What is socket? Explain its importance at transport layer protocols.

The services provided by transport layer is listed below.
1.     Connection setup and multiplexing
2.     Flow control mechanisms
3.     Slow start and congestion control
4.     Reliability services
Socket:-
A socket is the interface through which a process communicates with the transport layer. Each process can potentially use many sockets. The transport layer in a receiving machine receives a sequence of segments from its network layer. Delivering segments to the correct socket is called De-multiplexing.
Client machines run multiple processes while browsing multiple web pages at the same time
To communicate over TCP, the source process and destination process establish a connection to one another
Every TCP connection can be uniquely identified by its two endpoints
Data transfer from source to destination host needs IP address and Physical Addresses of Connection End points
Ports and sockets are connection End Points
Each process binds a socket to its end of the connection
The source and destination each reads from and writes to the socket bound to the connection
TCP multiplexes multiple connections to a single internet host using ports and sockets
Above mentioned are all the reasons why sockets are important in Transport layer protocols

 

Comments

Post a Comment

Popular posts from this blog

Computer Networking Exam preparation material.

Let's Get to shell scripting

Lets Prepare for Object Oriented Programming with C++