Posts

What Transport Protocol ?

As promised in a previous post I am going to talk about the main differences between TCP, UDP, and SCTP. here is a  brief description of each:

The TCP

The TCP is an acronym for Transmission Control Protocol. This protocol provides a reliable transmission mechanism. The TCP connection occurs between a TCP client and a TCP server. The Client sends a request to open up a socket with the server, the server replies with an agreement. This handshake enables them to open a full duplex reliable connection. The connection is full duplex because data can flow in both directions. It is also reliable because you are assured that your packet is sent. The client provides the server with a sequence number and the server replies with an acknowledgment number. These numbers are used to make sure sent packets are received and provide the ability of packet switching. In other words data can be transferred using different routes and received not in the order sent. Even though   routing is the responsibility of the network layer, this protocol provides the connectivity and error checking…the network layer doesn’t provide with error checking nor is does it provide a reliable delivery service.

UDP

The UDP, or the User Datagram Protocol, is considered to be a connectionless and unreliable service. This protocol doesn’t divide the message, and it is the responsibility of the program to divide up the message. Each message is called a datagram, hence its name. The server sends each datagram independently and it is up for the client to discover if there was an error to request the datagrams to be sent again. This protocol is faster because it doesn’t take into consideration data correction. This is useful in video streaming, take for example Youtube; when streaming a video the datagrams of the video are sent simultaneously and if you, the user, realize that a later part of the video is displayed first no matter how many times you replay the video that would be the sequence of the clip. However if you refresh the page, requesting the page to reload you might fix the problem and receive all the datagrams in the order intended.

SCTP

Stream Control Transmission Protocol is similar to TCP however it includes the ability to send the multiple messages via the same connection. Theoretically the SCTP could replace the TCP; however it is currently only used in applications.

TCP/IP Network Model

In this post I will talk about the 5 different layers used in the TCP/IP network model. The TCP/IP is a set of protocols that are used for communication between several computers. It consists of five major layers, in each layer the data is isolated in such a way that the only relevant information is used. The layers are as follows:

Layer 5: Application Layer

All users are able to associate with the application layer. It is user friendly and consists of the message. An example of an address at its application layer is any URL for a given website. For example http://www.bentley.edu . Also the port number can be specified at the end of the application layer, although is more thought to be implemented at the beginning of the transport layer. With HTTP (hyper text transfer protocol) the standard port number is 80; however some websites use 8080 in order to secure some data, or make it unavailable for all users. There is more than one way to specify a port number. The easy way when using http is by adding a colon followed by the port number at the end of the URL. For example http://www.domainName.com:8080/

Layer 4: Transport Layer

This layer is responsible for the packetization of messages. Where the message is broken up into packets and put into “envelops” stamping it with address of the final destination.  This layer also is responsible for all end-to-end communication whether the message is sent using TCP, UDP, or SCTP protocols. I will elaborate more on the previous protocols in a later post.

Layer 3: Network Layer

In simple terms this layer is responsible for sending the message to the next address. Sometimes it is also referred to the IP layer. The protocol used here uses an unreliable best effort delivery service. In other words deliver is not guaranteed. One of the reasons it uses this services is because the error correction is found in the Transport Layer, and error checking at this state would “waste” time.

Layer 2: Data Link Layer

The data link layer is considered to be a physical layer. This layer is responsible for the reliable transmission of the message to the next node. It converts IP addresses to MAC addresses (medium access control). Every device has its own MAC address; as a matter of fact a personal computer has at least three MAC addresses, one for Ethernet, one for wifi and one for Bluetooth. This layer makes it possible to transmit data from one node to another. The packets at this layer are called frames.

Layer 1:  Physical Layer

This is where the transmission of the message actually takes place. This layer is implemented via hardware. Depending on the type of device connected to the network different methods are used. This is primarily why both the physical and data link layers are not defined by the TCP/IP and is depended on the underlying network.