Flags

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Flags:

In a connection-oriented communication protocol, such as TCP (Transmission Control Protocol),


flags are used in the header of each data packet to provide control information about the
communication session between two devices.

 SYN: Synchronize sequence numbers. Used to initiate a connection between two


devices.
 ACK: Acknowledgment. Indicates that the receiving device has received and
successfully processed a packet.
 FIN: Finish. Used to terminate a connection between two devices.
 RST: Reset. Used to reset a connection in response to an error or security issue.
 PSH: Push. Indicates that the receiving device should pass the data to the
application layer as soon as possible, instead of buffering it.
 URG: Urgent. Indicates that the packet contains urgent data that should be
processed
BYTE STUFFING:
Byte stuffing is a technique used in data communication to prevent the loss of data or errors in
transmission when certain byte patterns are used. It is a method of inserting extra bytes into
data in order to change a sequence that would otherwise be misinterpreted as a control
character or end of data character.
The general idea of byte stuffing is to use a special byte sequence, called a "flag", to mark the
beginning and end of a block of data. When a flag is encountered in the data stream, a specific
byte sequence is inserted into the data to indicate that the flag is part of the data rather than a
control character or end-of-data marker.
BIT-ORIENTED FRAMING:

Bit-oriented framing is a method of dividing a data stream into discrete, fixed-length


frames for transmission over a digital communication channel. In bit-oriented framing,
each frame consists of a fixed number of bits, which are used to transmit data along
with control information, such as start and stop bits, to indicate the beginning and end
of each frame.

Bit-oriented framing is commonly used in telecommunications and computer


networking, where it is important to ensure that data is transmitted reliably and
efficiently over a digital communication channel.

SPECIAL 8-BIT PATTERN:

In bit-oriented framing, the special 8-bit pattern used to define the beginning and end
of a frame is called the "flag sequence"
The most commonly used flag sequence in networking and telecommunications
applications is the 8-bit sequence "01111110". This sequence is known as the HDLC flag
sequence

FLOW CONTROL:

Flow control is the process of managing the flow of data or instructions within a
program. It refers to the mechanisms and techniques that programmers use to control
the order in which instructions are executed or data is processed.

USE OF BUFFERS:

In networking, for example, buffers are used to store packets of data as they are being
transmitted between two devices. The receiving device will typically use a buffer to hold
incoming packets until they can be processed and acted upon. In file I/O, buffers are
used to temporarily store data that is being read from or written to a file. This can help
to optimize the transfer of data, especially when dealing with large files.

Cyclic redundancy check:

Error control at the data link layer uses in CRC in two ways:

Redundant bit:

A redundant bit is an extra bit added to a set of bits in a digital system, which is not
strictly necessary for representing the information but is used to detect and correct
errors that may occur during transmission or storage.

ERROR CONTROL:

1. Error detection: This involves adding redundant information to the data, which
can be used to detect errors that may have occurred during transmission or
storage. Examples of error detection techniques include checksums, cyclic
redundancy checks (CRC), and parity bits.
2. Error correction: This involves adding redundant information to the data,
which can be used to correct errors that may have occurred during transmission
or storage. Examples of error correction techniques include forward error
correction (FEC) and error-correcting codes (ECC).
3. Retransmission: This involves detecting errors and requesting that the sender
retransmit the data. This technique is commonly used in communication
systems, where a lost or corrupted packet can be requested to be retransmitted.
CONNECTIONLESS COMMUNICATION:

Connectionless communication: In connectionless communication, each data packet is


treated as an independent unit, and there is no need to establish a dedicated
connection between the sender and receiver before transmitting the data. Instead, each
packet is sent individually, and each packet contains all the necessary addressing
information to reach its destination.

This mode of communication is typically used in applications where low latency and
high speed are critical, such as in real-time multimedia streaming, online gaming, and
VoIP.

CONNECTION-ORIENTED:

In connection-oriented communication, a dedicated connection is first established


between the sender and receiver before any data is transmitted. This connection is
maintained throughout the duration of the communication session and is used to
ensure reliable and error-free transmission of data. This mode of communication is
typically used in applications where data integrity is critical, such as in file transfers,
email, and web browsing.

Multiplexing: is the technique of combining multiple data streams into a single, high-
capacity transmission channel. It is a method used in telecommunications and computer
networking to allow multiple devices to share a single communication resource, such as
a network connection, radio frequency channel, or optical fiber.

Payload: refers to the actual data that is being transmitted or stored. For example, in a
network packet, the payload would be the actual message being sent, while in a file, the
payload would be the contents of the file.

Padding:, on the other hand, refers to the additional data that is added to the payload
in order to meet certain requirements or constraints. For example, in cryptography,
padding may be added to a message to ensure that it meets a specific block size, or to
make it more difficult for an attacker to decipher the message.

You might also like