You are on page 1of 11

TCP (Transmission Control Protocol) is one of the main protocols of the Internet

protocol suite. It lies between the Application and Network Layers which are
used in providing reliable delivery services. It is a connection-oriented protocol
for communications that helps in the exchange of messages between the
different devices over a network.

TCP/IP Layer

Working of TCP

To make sure that each message reaches its target location intact, the TCP/IP
model breaks down the data into small bundles and afterward reassembles the
bundles into the original message on the opposite end. Sending the information
in little bundles of information makes it simpler to maintain efficiency as
opposed to sending everything in one go.
After a particular message is broken down into bundles, these bundles may
travel along multiple routes if one route is jammed but the destination remains
the same.
We can see that the message is being broken down, then reassembled from a different order at the destination

For example, When a user requests a web page on the internet, somewhere in
the world, the server processes that request and sends back an HTML Page to
that user. The server makes use of a protocol called the HTTP Protocol. The
HTTP then requests the TCP layer to set the required connection and send the
HTML file.
Now, the TCP breaks the data into small packets and forwards it towards the
Internet Protocol (IP) layer. The packets are then sent to the destination through
different routes.
The TCP layer in the user’s system waits for the transmission to get finished
and acknowledges once all packets have been received.

Features of TCP/IP

Some of the most prominent features of Transmission control protocol are


1. Segment Numbering System
 TCP keeps track of the segments being transmitted or being received
by assigning numbers to each and every single one of them.
 A specific Byte Number is assigned to data bytes that are to be
transferred while segments are assigned sequence numbers.
 Acknowledgment Numbers are assigned to received segments.
2. Flow Control
 Flow control limits the rate at which a sender transfers data. This is
done to ensure reliable delivery.
 The receiver continually hints the sender on how much data can be
received (using a sliding window)
3. Error Control
 TCP implements an error control mechanism for reliable data transfer
 Error control is byte-oriented
 Segments are checked for error detection
 Error Control includes – Corrupted Segment & Lost Segment
Management, Out-of-order segments, Duplicate segments, etc.
4. Congestion Control
 TCP takes into account the level of congestion in the network
 Congestion level is determined by the amount of data sent by a sender
Advantages
 It is a reliable protocol
 It provides an error-checking mechanism as well as one for recovery
 It gives flow control
 It makes sure that the data reaches the proper destination in the exact
order that it was sent
 Open Protocol, not owned by any organization or individual
 It assigns an IP address to each computer on the network and a
domain name to each site thus making each device site to be
distinguishable over the network.
Disadvantages
 TCP is made for Wide Area Networks, thus its size can become an
issue for small networks with low resources
 TCP runs several layers so it can slow down the speed of the network
 It is not generic in nature. Meaning, it cannot represent any protocol
stack other than the TCP/IP suite. E.g., it cannot work with a Bluetooth
connection.
 No modifications since their development around 30 years ago.

1. User Datagram Protocol (UDP): UDP is a substitute communication protocol to


Transmission Control Protocol implemented primarily for creating loss-tolerating
and low-latency linking between different applications.
2. Post office Protocol (POP): POP3 is designed for receiving incoming E-mails.
3. Simple mail transport Protocol (SMTP): SMTP is designed to send and
distribute outgoing E-Mail.
4. File Transfer Protocol (FTP): FTP allows users to transfer files from one machine
to another. Types of files may include program files, multimedia files, text files,
and documents, etc.
5. Hyper Text Transfer Protocol (HTTP): HTTP is designed for transferring a
hypertext among two or more systems. HTML tags are used for creating links.
These links may be in any form like text or images. HTTP is designed on Client-
server principles which allow a client system for establishing a connection with
the server machine for making a request. The server acknowledges the request
initiated by the client and responds accordingly.
6. Hyper Text Transfer Protocol Secure (HTTPS): HTTPS is abbreviated as Hyper
Text Transfer Protocol Secure is a standard protocol to secure the communication
among two computers one using the browser and other fetching data from web
server. HTTP is used for transferring data between the client browser (request)
and the web server (response) in the hypertext format, same in case of HTTPS
except that the transferring of data is done in an encrypted format. So it can be
said that https thwart hackers from interpretation or modification of data
throughout the transfer of packets.
7. Telnet: Telnet is a set of rules designed for connecting one system with another.
The connecting process here is termed as remote login. The system which
requests for connection is the local computer, and the system which accepts the
connection is the remote computer.
8. Gopher: Gopher is a collection of rules implemented for searching, retrieving as
well as displaying documents from isolated sites. Gopher also works on the
client/server principle.
Serial Communication

Sources: wikipedia.org

Serial communication forms the basic data transmission method of


many integrated circuit devices. Essentially, data is transmitted in one
way, 1 bit at a time, from sender to receiver. To safeguard transmission
errors, the transmitted data can include error checking codes,
typically CRC. To ensure transmission success, the receiver can send
an acknowledge information.

Serial communication is preferred to parallel communication in cases


where the cost of having multiple connections (inlines, wires, cables
etc.) is too high because of distance or manufacturing costs. Until
today, serial communication is widely used to connect different types
of hardware with each other, forming the basis for very different
protocols.

1-Wire

Sources: wikipedia.org | maximnintegrated.com

With the 1-Wire protocol, a one-to-many connection between a server


and several clients can be made by using only one data
transmission/power wire1. The connection is half-duplex, bi-
directional, 16.3Khz transmission speed.
Typically, an open-drain MOSFET is used to connect the devices. The
connection between the server and the client is in high voltage state by
using a pull-up resistor. To transmit data, the pull-up resistor is
connected to ground, then a low-voltage connection between the server
and client is made for data transmission. The high voltage state is used
to charge a capacitor that provides power to the connected client.

Messages are 8bit MSB. A typical transaction works as follows:

 The server sends a reset pulse


 The clients send an acknowledge message
 The server sends an 8bit command
 Server and client exchange groups of 8bit data
 To safeguard against transmission errors, 8bit CRCs can be
used

I2C

Sources: wikipedia.org

I2C, Inter-Integrated-Circuit, is a 2-Wire protocol to enable many-to-


many connections between clients and servers: The two wires are serial
data (SDA) and serial clock (SCL). The connection is half-duplex,
bidirectional, with a fixed, configurable transmission speed of 0.1, 0.4,
1.0, 3.4 or 5.0 MBit.
The SDA and the SCL line are kept constantly in a High voltage stage,
where the SDA lines uses pull-up resistors. When a server starts its
transmission, it closes its MOSFET gate to drop the SDA line to a low
state. Then, by applying different voltages to the SDA and the SCL
lines, information is transmitted. A low voltage on the SDA lines also
signifies that one master node is communicating — keeping the others
quiet. A low voltage on the SCL lines signifies the same information for
the clients.

All devices in the I2C bus have 7bit addresses. To address devices, and
receive conformations, 2 bits are used. Therefore, all messages in I2C
are 9bits MSB. A typical transaction is:

 The server sends a 7-Bit address, and a read/write bit


 The addressed client acknowledges with a bit (thus
completing the 9bits message format)
 Depending on the message, server either sends write data to a
client, distinguishing the registers/buffers and the data to
write, or it expects the client to write its data at a designated
register/buffer from which the server reads
 The transmission is finished when both SDA and SCL are
again in the high state

The I2C system has a complex set of registers for capturing the global
state of the system and coordinate how different devices can interact.
The register addresses, and their data, is vendor and device specific.
SPI

Sources: wikipedia.org | byteparadigm.com

SPI, Serial Peripheral Interface, is a many-to-one connection protocol


of multiple clients to one server. It requires 4 wires: SCL for clock, SCS
for selecting a client, SDTS for data transmission of the server, SDTC
for data transmissions of the clients. The connection if full-duplex,
bidirectional, and has no limit for transmission speed (10MB or more
can be achieved).

The bit frame is configurable, usually 8bits, but also 12Bit or 16Bits are
used. Data is sent with LSB.

In the base state, SCS is high (using pull-up resistors), SCL, SDTS and
SDTC are low. When the server initiates communication, it pulls SCS
to low using a MOSFET gate, and sends data over SCL. Then, the
server uses SDTS and the selected client uses SDTC to communicate,
full-duplex, with each other.

A typical communication is as follows:

 The server determines the clock speed for connecting to a


client
 The server sets SCS to low voltage, and sends data over SDTS
 The addressed client responds on the SDTC line and in the
chosen clock speed
 Server and client exchange data
 Server sets SCS to high voltage, and SCL to low

SPI requires a dedicated SDTC wire for each connected client, which
has a strong impact on integrated circuit design. Therefore, daisy-
chaining can be used to design a circuit with only on SDTC wire, and
additional changes to the data transmission protocol. Interestingly,
there is no fixed standard of the SPI protocol, but several vendor-
specific implementations that follow the same guidelines.

UART and RS-232

Sources: UART wikipedia.org | RS-232 wikipedia.org

These two protocols govern the direct one-to-one connection between


two devices. Specifically, RS-232 defines the physical transmission
characteristics: electrical signals, their timing and meaning, as well as
the physical size of hardware pins and connectors. A minimal RS-232
connection can be achieved with just two wires: TXD for transmitting
data, and RXC for receiving data. On top of this physical standard.
UART defines the logical messaging, which is quite configurable:
simplex, half-duplex or full duplex, with varying communication
speeds of at least 115,2 KBit.

In the base state, both TXD and RXD lines are high. The sender
switches TXD to high and begins transmitting data immediately, while
the receiver uses RXD to acknowledge the data. Sender and receiver
also use these lines to synchronize their clock
Transmitted data is 7–11 bits LSB, including start and stop bits.

A typical message exchange is as follows:

 The sender sends a start bit, a 5- or 9-bit message, and the


stop bit
 The receiver buffers the incoming message in his shift register
 When no data is received anymore — e.g. a complete clock
cycle is in the logical low state — the data from the shift
transmitter is flushed to other parts of the integrated circuit

The UART standard is interesting in its historical meaning. Although


the early physical manifestations of RS-232 — COM ports — almost
vanished from todays end-consumer computers, the standard is
emulated in many microcontrollers to allow serial-over-usb
connections.

Comparison

The following table summarizes the characteristics of each protocol:


A notice: The characteristics of the SPI system depend on the overall
setup: Clock speed of the microprocessor, total amount of resistors etc.

You might also like