hicaselectronics.files.wordpress.com … · web view, and synchronization of communication; the...
TRANSCRIPT
![Page 1: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/1.jpg)
UNIT IV
NETWORK ARCHITECTURE AND PROTOCOLS
LAYERED ARCHITECTURE
In telecommunications, a communications protocol is a system of digital rules for data exchange
within or between computers. Communicating systems use well-defined formats for exchanging
messages. Each message has an exact meaning intended to elicit a response from a range of
possible responses pre-determined for that particular situation. Thus, a protocol must define
the syntax, semantics, and synchronization of communication; the specified behavior is typically
independent of how it is to be implemented. A protocol can therefore be implemented as
hardware, software, or both. Communications protocols have to be agreed upon by the parties
involved. To reach agreement, a protocol may be developed into a technical standard.
Data communications refers to the transmission of this digital data between two or more
computers and a computer network or data network is a telecommunications network that allows
computers to exchange data. The physical connection between networked computing devices is
established using either cable media or wireless media. The best-known computer network is the
Internet.
OSI MODELS
As is always the case, English and computer-speak are not equivalent (or even necessarily
compatible) languages. Although descriptions and examples should make the meaning of the
networking jargon more apparent, sometimes terms are ambiguous. A common frame of
reference is necessary for understanding data communications terminology.
An architectural model developed by the International Standards Organization (ISO) is
frequently used to describe the structure and function of data communications protocols. This
architectural model, which is called the , provides a common reference for discussing
communications. The terms defined by this model are well understood and widely used in the
data communications community - so widely used, in fact, that it is difficult to discuss data
communications without using OSI's terminology.
The OSI Reference Model contains seven layers that define the functions of data
communications protocols. Each layer of the OSI model represents a function performed when
data is transferred between cooperating applications across an intervening network. The network
identifies each layer by name and provides a short functional description for it. Looking at this
![Page 2: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/2.jpg)
figure, the protocols are like a pile of building blocks stacked one upon another. Because of this
appearance, the structure is often called a stack or protocol stack.
Functions of layers
Application Layer
The Application Layer is the level of the protocol hierarchy where user-accessed network
processes reside. In this text, a TCP/IP application is any network process that occurs
above the Transport Layer. This includes all of the processes that users directly interact
with, as well as other processes at this level that users are not necessarily aware of.
Presentation Layer
For cooperating applications to exchange data, they must agree about how data is
represented. In OSI, this layer provides standard data presentation routines. This function
is frequently handled within the applications in TCP/IP, though increasingly TCP/IP
protocols such as XDR and MIME perform this function.
Session Layer
As with the Presentation Layer, the Session Layer is not identifiable as a separate layer in
the TCP/IP protocol hierarchy. The OSI Session Layer manages the sessions (connection)
between cooperating applications. In TCP/IP, this function largely occurs in the
Transport Layer, and the term "session" is not used. For TCP/IP, the terms "socket" and
"port" are used to describe the path over which cooperating applications communicate.
Transport Layer
Much of our discussion of TCP/IP is directed to the protocols that occur in the Transport
Layer. The Transport Layer in the OSI reference model guarantees that the receiver gets
the data exactly as it was sent. In TCP/IP this function is performed. However, TCP/IP
offers a second Transport Layer service, User Datagram Protocol (UDP), that does not
perform the end-to-end reliability checks.
Network Layer
The Network Layer manages connections across the network and isolates the upper layer
protocols from the details of the underlying network. The Internet Protocol (IP), which
isolates the upper layers from the underlying network and handles the addressing and
delivery of data, is usually described as TCP/IP's Network Layer.
Data Link Layer
The reliable delivery of data across the underlying physical network is handled by the
Data Link Layer. TCP/IP rarely creates protocols in the Data Link Layer. Most RFCs that
relate to the Data Link Layer discuss how IP can make use of existing data link protocols.
Physical Layer
![Page 3: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/3.jpg)
The Physical Layer defines the characteristics of the hardware needed to carry the data
transmission signal. Features such as voltage levels, and the number and location of
interface pins, are defined in this layer. Examples of standards at the Physical Layer are
interface connectors such as RS232C and V.35, and standards for local area network
wiring such as IEEE 802.3. TCP/IP does not define physical standards - it makes use of
existing standards.
The terminology of the OSI reference model helps us describe TCP/IP, but to fully understand it,
we must use an architectural model that more closely matches the structure of TCP/IP. The next
section introduces the protocol model we'll use to describe TCP/IP.
LAYERED TASKS
We use the concept of layers in our daily life. As an example, let us consider two friends who
communicate through postal mail. The process of sending a letter to a friend would be complex
if there were no services available from the post office. Figure shows the steps in this task.
OSI MODEL
The Open Systems Interconnection (OSI) protocols are a family of information exchange
standards developed jointly by the ISO and the ITU-T starting in 1977.
While the seven-layer OSI model is still often referenced, of the protocols themselves
only X.400, X.500, and IS-IS have had much lasting impact. The goal of a series of open, non-
proprietary network protocols is now met by the competing TCP/IP stack.
Layer 1: physical layer
This layer deals with the physical plugs and sockets and electrical specification of signals only.
![Page 4: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/4.jpg)
This is the medium over which the digital signals are transmitted. It can be twisted pair, coaxial
cable, optical fiber, wireless, or other transmission media.
Layer 2: data link layer
The data link layer packages raw bits from the physical layer into frames (logical, structured
packets for data). It is specified in ITU-T Rec. X.212 [ISO/IEC 8886], ITU-T Rec. X.222 and
others. This layer is responsible for transferring frames from one host to another. It might
perform error checking. This layer further consists of two sub layers: MAC and LLC
Layer 3: network layer
Connectionless Network Service (CLNS)
Connectionless Network Protocol
Connection-Oriented Network Service
Connection-Oriented Network Protocol
Network Fast Byte Protocol – ISO/IEC 14700
End System to Intermediate System Routing Exchange Protocol (ES-IS) -
Intermediate System to Intermediate System Intra-domain Routing Protocol
End System Routing Information Exchange Protocol for use with ISO/IEC 8878.
This level is in charge of transferring data between systems in a network, using network-layer
addresses of machines to keep track of destinations and sources. This layer uses routers and
switches to manage its traffic (control flow control, error check, routing etc.) So here it takes all
routing decisions, it deals with end to end data transmission.
Layer 4: transport layer
Transport Protocol Class 0 (TP0)
Transport Protocol Class 1 (TP1)
Transport Protocol Class 2 (TP2)
Transport Protocol Class 3 (TP3)
Transport Protocol Class 4 (TP4)
Transport Fast Byte Protocol – ISO 14699
The transport layer transfers data between source and destination processes. Generally, two
connection modes are recognized, connection-oriented or connectionless. Connection-oriented
service establishes a dedicated virtual circuit and offers various grades of guaranteed delivery,
ensuring that data received is identical to data transmitted. Connectionless mode provides only
best-effort service without the built-in ability to correct errors, which includes complete loss of
data without notifying the data source of the failure. No logical connection, and no persistent
state of the transaction exists between the endpoints, lending the connectionless mode low
overhead and potentially better real-time performance for timing-critical applications such as
voice and video transmissions.
![Page 5: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/5.jpg)
Layer 5: session layer
Session service
Connection-oriented Session protocol
Connectionless Session protocol
The session layer controls the dialogues (connections) between computers. It establishes,
manages and terminates the connections between the local and remote application. It
provides for full-duplex, and half-duplex or simplex operation, and establishes check
pointing, adjournment, termination, and restart procedures. The OSI model made this layer
responsible for graceful close of sessions, which is a property of the Transmission Control
Protocol, and also for session check pointing and recovery, which is not usually used in the
Internet Protocol Suite. The session layer is commonly implemented explicitly in application
environments that use remote procedure calls.
Layer 6: presentation layer
Presentation service
Connection-oriented Presentation protocol
Connectionless Presentation protocol
This layer defines and encrypts/decrypts data types from the application layer. Protocols such as
MIDI, MPEG, and GIF are presentation layer formats shared by different applications.
Layer 7: application layer
Reliable Transfer Service Element
Remote Operations Service Element Commitment, Concurrency, and Recovery service
element (CCRSE)
Security Exchange Service Element (SESE)
This keeps track of how each application talks to another application. Destination and source
addresses are linked to specific applications.
Application processes
Common management information protocol (CMIP) – ISO 9596 / X.700
Directory services (DS) – X.500, later modified for the TCP/IP stack as LDAP
File transfer, access, and management (FTAM)[1]
Message handling system (MHS) – X.400
Virtual terminal protocol (VT) - ISO 9040/9041
Remote Database Access (RDA)
Distributed Transaction Processing (OSI TP)
Interlibrary Loan Application Protocol (ILAP)
Document Transfer And Manipulation (DTAM)
Document Printing Application (DPA)
![Page 6: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/6.jpg)
Document Filing and Retrieval (DFR)
Data link control protocols
Data Link Control is the service provided by the Data Link Layer to provide reliable data transfer
over the physical medium. For example, In the half-duplex transmission mode, one device can
only transmit the data at a time. If both the devices at the end of the links transmit the data
simultaneously, they will collide and leads to the loss of the information. The Data link layer
provides the coordination among the devices so that no collision occurs.
The Data link layer provides three functions:
o Line discipline
o Flow Control
o Error Control
Line Discipline
o Line Discipline is a functionality of the Data link layer that provides the coordination
among the link systems. It determines which device can send, and when it can send the
data.
Line Discipline can be achieved in two ways:
o ENQ/ACK
o Poll/select
END/ACK
END/ACK stands for Enquiry/Acknowledgement is used when there is no wrong receiver
available on the link and having a dedicated path between the two devices so that the device
capable of receiving the transmission is the intended one.
END/ACK coordinates which device will start the transmission and whether the recipient is
ready or not.
Working of END/ACK
The transmitter transmits the frame called an Enquiry (ENQ) asking whether the receiver is
available to receive the data or not.
The receiver responses either with the positive acknowledgement(ACK) or with the negative
acknowledgement(NACK) where positive acknowledgement means that the receiver is ready to
receive the transmission and negative acknowledgement means that the receiver is unable to
accept the transmission.
Following are the responses of the receiver:
o If the response to the ENQ is positive, the sender will transmit its data, and once all of its
data has been transmitted, the device finishes its transmission with an EOT (END-of-
Transmission) frame.
![Page 7: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/7.jpg)
o If the response to the ENQ is negative, then the sender disconnects and restarts the
transmission at another time.
o If the response is neither negative nor positive, the sender assumes that the ENQ frame
was lost during the transmission and makes three attempts to establish a link before
giving up.
Poll/Select
The Poll/Select method of line discipline works with those topologies where one device is
designated as a primary station, and other devices are secondary stations.
Working of Poll/Select
o In this, the primary device and multiple secondary devices consist of a single
transmission line, and all the exchanges are made through the primary device even
though the destination is a secondary device.
![Page 8: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/8.jpg)
o The primary device has control over the communication link, and the secondary device
follows the instructions of the primary device.
o The primary device determines which device is allowed to use the communication
channel. Therefore, we can say that it is an initiator of the session.
o If the primary device wants to receive the data from the secondary device, it asks the
secondary device that they anything to send, this process is known as polling.
o If the primary device wants to send some data to the secondary device, then it tells the
target secondary to get ready to receive the data, this process is known as selecting.
Select
o The select mode is used when the primary device has something to send.
o When the primary device wants to send some data, then it alerts the secondary device for
the upcoming transmission by transmitting a Select (SEL) frame, one field of the frame
includes the address of the intended secondary device.
o When the secondary device receives the SEL frame, it sends an acknowledgement that
indicates the secondary ready status.
o If the secondary device is ready to accept the data, then the primary device sends two or
more data frames to the intended secondary device. Once the data has been transmitted,
the secondary sends an acknowledgement specifies that the data has been received.
Poll
![Page 9: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/9.jpg)
o The Poll mode is used when the primary device wants to receive some data from the
secondary device.
o When a primary device wants to receive the data, then it asks each device whether it has
anything to send.
o Firstly, the primary asks (poll) the first secondary device, if it responds with the NACK
(Negative Acknowledgement) means that it has nothing to send. Now, it approaches the
second secondary device, it responds with the ACK means that it has the data to send.
The secondary device can send more than one frame one after another or sometimes it
may be required to send ACK before sending each one, depending on the type of the
protocol being used.
ARQ
Automatic repeat request (ARQ), also known as automatic repeat query, is an error-
control method for data transmission that uses acknowledgements (messages sent by the receiver
indicating that it has correctly received a packet) and timeouts (specified periods of time allowed
to elapse before an acknowledgment is to be received) to achieve reliable data transmission over
an unreliable service. If the sender does not receive an acknowledgment before the timeout, it
usually re-transmits the packet until the sender receives an acknowledgment or exceeds a
predefined number of retransmissions.
![Page 10: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/10.jpg)
The types of ARQ protocols include Stop-and-wait ARQ, Go-Back-N ARQ, and Selective
Repeat ARQ/Selective Reject ARQ. All three protocols usually use some form of sliding
window protocol to tell the transmitter to determine which (if any) packets need to be
retransmitted. These protocols reside in the data link or transport layers (layers 2 and 4) of
the OSI model.
Flow Control
Flow Control is one important design issue for the Data Link Layer that controls the flow of data
between sender and receiver.
In Communication, there is communication medium between sender and receiver. When Sender
sends data to receiver then there can be problem in below case :
1) Sender sends data at higher rate and receive is too sluggish to support that data rate.
To solve the above problem, FLOW CONTROL is introduced in Data Link Layer. It also
works on several higher layers. The main concept of Flow Control is to
introduce EFFICIENCY in Computer Networks.
Approaches of Flow Control
1. Feed back based Flow Control
2. Rate based Flow Control
Feed back based Flow Control
In Feed back based Flow Control, Until sender receives feedback from the receiver, it will not
send next data.
Types of Feedback based Flow Control
A. Stop-and-Wait Protocol
B. Sliding Window Protocol
1. A One-Bit Sliding Window Protocol
2. A Protocol Using Go Back N
3. A Protocol Using Selective Repeat
STOP-AND-WAIT PROTOCOL
In this Protocol we have taken the following assumptions:
1. It provides unidirectional flow of data from sender to receiver.
2. The Communication channel is assumed to be error free.
In this Protocol the Sender simply sends data and waits for the acknowledgment from Receiver.
That's why it is called Stop-and-Wait Protocol.
This type is not so much efficient, but it is simplest way of Flow Control.
![Page 11: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/11.jpg)
In this scheme we take Communication Channel error free, but if the Channel has some errors
then receiver is not able to get the correct data from sender so it will not possible for sender to
send the next data (because it will not get acknowledge from receiver). So it will end the
communication, to solve this problem there are two new concepts were introduced.
1. TIMER, if sender was not able to get acknowledgment in the particular time than, it
sends the buffered data once again to receiver. When sender starts to send the data, it
starts timer.
2. SEQUENCE NUMBER, from this the sender sends the data with the specific sequence
number so after receiving the data, receiver sends the data with that sequence number,
and here at sender side it also expect the acknowledgment of the same sequence number.
This type of scheme is called Positive Acknowledgment with Retransmission (PAR).
SLIDING WINDOW PROTOCOL
Problems Stop –wait protocol In the last protocols sender must wait for either positive
acknowledgment from receiver or for time out to send the next frame to receiver. So if the sender
is ready to send the new data, it can not send. Sender is dependent on the receiver. Previous
protocols have only the flow of one sided, means only sender sends the data and receiver just
acknowledge it, so the twice bandwidth is used.
To solve the above problems the Sliding Window Protocol was introduce.
In this, the sender and receiver both use buffer, it’s of same size, so there is no necessary to wait
for the sender to send the second data, it can send one after one without wait of the receiver’s
acknowledgment.
And it also solve the problem of uses of more bandwidth, because in this scheme both sender and
receiver uses the channel to send the data and receiver just send the acknowledge with the data
which it want to send to sender, so there is no special bandwidth is used for acknowledgment, so
the bandwidth is saved, and this whole process is called PIGGYBACKING.
Types of Sliding Window Protocol
i. A One-Bit Sliding Window Protocol
ii. A Protocol Using Go Back N
iii. A Protocol Using Selective Repeat
A ONE-BIT SLIDING WINDOW PROTOCOL
![Page 12: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/12.jpg)
This protocol has buffer size of one bit, so only possibility for sender and receiver to send and
receive packet is only 0 and 1. This protocol includes Sequence, Acknowledge, and Packet
number.It uses full duplex channel so there is two possibilities:
1. Sender first start sending the data and receiver start sending data after it receive the data.
2. Receiver and sender both start sending packets simultaneously,
First case is simple and works perfectly, but there will be an error in the second one. That error
can be like duplication of the packet, without any transmission error.
Go Back N
The problem with pipelining is if sender sending 10 packets, but the problem occurs in 8th one
than it is needed to resend whole data. So the protocol called Go back N and Selective Repeat
were introduced to solve this problem.In this protocol, there are two possibility at the receiver’s
end, it may be with large window size or it may be with window size one.
The window size at the receiver end may be large or only of one. In the case of window size is
one at the receiver, as we can see in the figure (a), if sender wants to send the packet from one to
ten but suppose it has error in 2nd packet, so sender will start from zero, one, two, etc. here we
assume that sender has the time out interval with 8. So the time out will occur after the 8 packets,
up to that it will not wait for the acknowledgment. In this case at the receiver side the 2nd packet
![Page 13: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/13.jpg)
come with error, and other up to 8 were discarded by receiver. So in this case the loss of data is
more.
Whether in the other case with the large window size at receiver end as we can see in the figure
(b) if the 2nd packet comes with error than the receiver will accept the 3rd packet but it sends
NAK of 2 to the sender and buffer the 3rd packet. Receiver do the same thing in 4th and 5th
packet. When the sender receiver the NAK of 2nd packet it immediately send the 2nd packet to
the receiver. After receiving the 2nd packet, receiver send the ACK of 5th one as saying that it
received up to 5 packet. So there is no need to resend 3rd , 4th and 5th packet again, they are
buffered in the receiver side.
iii. A Protocol Using Selective Repeat
Protocol using Go back N is good when the errors are rare, but if the line is poor, it wastes a lot
of bandwidth on retransmitted frames. So to provide reliability, Selective repeat protocol was
introduced. In this protocol sender starts it's window size with 0 and grows to some predefined
maximum number. Receiver's window size is fixed and equal to the maximum number of
sender's window size. The receiver has a buffer reserved for each sequence number within its
fixed window.
Whenever a frame arrives, its sequence number is checked by the function to see if it falls within
the window, if so and if it has not already been received, it is accepted and stored. This action is
taken whether it is not expected by the network layer.
Here the buffer size of sender and receiver is 7 and as we can see in the figure (a), the sender
sends 7 frames to the receiver and starts timer. When a receiver gets the frames, it sends the
ACK back to the sender and it passes the frames to the Network Layer. After doing this, receiver
empties its buffer and increased sequence number and expects sequence number 7,0,1,2,3,4,5.
But if the ACK is lost, the sender will not receive the ACK. So when the timer expires, the
sender retransmits the original frames, 0 to 6 to the receiver. In this case the receiver accepts the
frames 0 to 5 (which are duplicated) and send it to the network layer. In this case protocol fails.
To solve the problem of duplication, the buffer size of sender and receiver should be (MAX SEQ
+ 1)/2 that is half of the frames to be send. As we can see in fig(c ), the sender sends the frames
from 0 to 3 as it's window size is 4. Receiver accepts the frames and sends acknowledgment to
the sender and passes the frames to the network layer and increases the expected sequence
number from 4 to 7. If the ACK is lost than sender will send 0 to 3 to receiver again but receiver
is expecting to 4 to 7, so it will not accept it. So this way the problem of duplication is solved.
![Page 14: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/14.jpg)
ASYNCHRONOUS PROTOCOLS
A number of Asynchronous Data Link protocols have been developed over the last
several decades. Now a day, these protocols are employed mainly in modems. Due to its inherent
slowness (stemming from the required additions of start and stop bits and extended spaces
between frames), Asynchronous transmission at this level is being replaced by higher-speed
synchronous mechanisms.
Asynchronous protocols are not complex and are inexpensive to implement. In
Asynchronous transmission a data unit is transmitted with no timing coordination between
sender and receiver. A receiver does not need to know exactly when a data unit is sent, It only
needs to recognize the beginning and the end of the unit. This is accomplished by using extra bits
(start and stop bits) to frame the data unit.
Asynchronous protocols used primarily in modems, feature start and stop bits and variable
length gaps between characters. A variety of Asynchronous data Link layer protocols have been
developed, we will discuss only a few of them.
X MODEM
In 1979 Ward Christiansen designed a file transfer protocol for telephone-line communication
between PCs. This protocol ,now known as XMODEM, is a half-duplex stop-and-wait ARQ
protocol. The frame with its fields is shown in Figure(2).
The first field is a one-byte start of header (SOH). The second field is a two-byte header. The
first header byte, sequence number, carries the frame number. The second header byte is used to
check the validity of the sequence number. The fixed data field holds 128 bytes of data(binary.
ASCII. Boolean, text, etc).
![Page 15: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/15.jpg)
The last field, CRC checks for errors in the data field only.
In this protocol, transmission begins with the sending of a NAK frame frame from the
receiver to the sender. Each time the sender sends a frame, it must wait for an acknowledgment
(ACK) before the next frame can be sent. If instead a NAK is received the received by the sender
after a specified amount of time. Besides a NAK or an ACK. the sender can receive a cancel
signal (CAN), which aborts the transmission.
Y MODEM
YMODEM is a protocol similar to XMODEM, with the following major differences :
The data unit is 1024 bytes
Two CANs are sent to abort a transmission.
ITU-T CRC-16 is used for error checking.
Multiple files can be sent simultaneously.
SYNCHRONOUS PROTOCOLS
The speed of Synchronous transmission makes it the better choice over Asynchronous
transmission. For both LAN, MAN and WAN technology, Protocols governing synchronous
transmission can be divided into two classes :
1.Character- Oriented protocols
2. Bit-Oriented protocols
Character - Oriented Protocols
For reasons, we will examine later in this section, the character-Oriented protocols are not as
efficient as bit-Oriented protocols and therefore are now seldom used. They are however is easy
to comprehend and employ the same logic and organization as the bit-Oriented protocols. An
understanding of character-Oriented protocols provides and essential foundation for an
examination of bit-oriented protocols.
In all Data Link protocols, the control information is inserted into the data stream either as
separate control frames or as additions to existing data frames. In character-Oriented discipline,
Flow control, and error control of the several existing character-Oriented protocols, the best
known is IBM's binary Syncronous communication (BSC).
BINARY SYNCRONOUS COMMUNICATION (BSC)
Binary Synchronous communication (BSC) is a popular character-Oriented Data Link protocol
developed by IBM in 1964. Usable in both point-to-point and multipoint configurations. It
supports half-duplex transmission using stop-and-wait ARQ flow control and error correction.
BSC does not support full-duplex transmission or sliding window protocol.
![Page 16: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/16.jpg)
A popular character-Oriented Data Link protocol is binary Synchronous communication
(BSC) which specified half-duplex transmission with stop-and-wait ARQ. I was developed by
IBM.
Control Characters
The below is a list of standard control characters used in a BSC frame. Note that the
character ACK is not used in this protocol. Remember that BSC uses stop-and-wait ARQ :
Acknowledgements must be either ACK 0 or ACK 1 to specify alternating data frames.
BSC Frames
The BSC protocol divides a transmission into frames. If a frame is used strictly for control
purposes. It is called a control frame, Control frames are used to exchange information between
communicating devices, for example : To establish the initial connection, to control the flow of
the transmission, to request error corrections, and to disconnect the devices at the close of a
session. If a frame contains part or all of the message data itself, It is called a data frame. Data
frames are used to transmit information, but may also contain control information application to
that information.
![Page 17: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/17.jpg)
Bit-Oriented Protocols
In character-Oriented protocols, bits are grouped into predefined patterns forming characters.
By comparison, Bit-Oriented protocols can pack more information into shorter frames and avoid
the transparent or problem of character information given the advantages of Bit-Oriented
protocols and the lack of any preexisting coding system (like ASCII) to tie them to, It is no under
that over the last two decade many different Bit-Oriented protocols have been developed. All
vying to become the standard, see in Figure (10). Most of these offerings have been proprietary,
designed the manufactures to support their own products. One of them, HDLC, is the design of
the ISO and has become the basis for all Bit-Oriented protocols in use today.
SDLC
In 1975, IBM pioneered the development of bit-oriented protocols with synchronous data link
control (SDLC), and lobbied the ISO to make SDLC the standard. In 1979, the ISO answered
with high-level data link control (HDLC), which was based on SDLC. Adoption of HDLC by the
ISO committees led to its adoption and extension be other organizations. The ITU-T was one of
the first organizations to embrace HDLC since 1981. ITU-T has developed a series of protocols
called link access protocol (LAPs : LAPB, LAPD, LAPM, LAPX, etc.), all based on HDLC.
Other protocols (Such as frame relay, PPP, etc.) developed by both ITU-T and ANSI also derive
from HDLC as do most LANs access control protocols. In short, all bit-oriented protocols in use
today either derive from or are sources for HDLC. Through HDLC, therefore, we have a basis
for understanding the others.
All bit-Oriented protocols are related to high-level data link control (HDLC), a bit-oriented
protocol published by ISO. HDLC supports both half-duplex and full-duplex modes in point.
HDLC
HDLC is a bit-oriented data link protocol designed to support both half-duplex and full-duplex
communication over point-to-point and multipoint links. Systems using HDLC can be
characterized by their station types, their configurations, and their response modes.
![Page 18: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/18.jpg)
Station Types
HLDC differentiates between three different types of stations : primary, Secondary, and
combined.
A primary station in HDLC functions in the same way as the primary devices in the
discussions of flow control in the last article. The primary is the device in either a point-to-point
or multipoint line configuration that has complete control of the link.
The primary sends commands to the secondary, A primary issues commands, a secondary issues
responses. An example of the relation of a primary to a secondary is that of computer to terminal.
A combined station can both command and respond. A combined station is one of a set of
connected peer devices programmed to behave either as a primary or as a secondary depending
on the nature and direction of the transmission.
Stations in HDLC are of three types: Primary , Secondary, and Combined. A primary station
sends commands, A secondary station sends responses, A Combined station sends commands
and responses.
Configurations
The word configuration refers to the relationship of hardware devices on a link, Devices may
be organized as primary and secondary or as peers. Peer devices must be able to act as both
primary or secondary, depending on the mode selected for the exchange (See the section Modes
of Communication. Primary, Secondary, and Combined stations can be configured in three ways:
Unbalanced, Symmetrical, and balanced. Any of these configurations can support both half-
duplex and full-duplex transmission.
An unbalanced configuration (also called a master/slave configuration) is one in which one
device is primary and the others are secondary. Unbalanced configurations can be point-to-point
if only two devices are involved : more often they are multipoint with one computer controlling
several peripherals. An example of an unbalanced configuration is a computer and one or more
terminals.
A symmetrical configuration is one in which each physical station on a link consists of two
logical stations, one a primary and the other a secondary. Separate lines link the primary aspect
of one physical station to the secondary aspect of another physical station. A symmetrical
configuration behaves like an unbalanced configuration except that control of the link can shift
between the two stations.
A balanced configuration is one in which both stations in a point-to-point topology are of the
combined type. The stations are linked by a single line that can be controlled by either station.
![Page 19: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/19.jpg)
Figure - HDLC Configurations
HDLC does not support balanced multipoint. This necessitated the invention of media access
protocols for LANs.
TCP/IP MODEL
In character-Oriented protocols, bits are grouped into predefined patterns forming characters.
By comparison, Bit-Oriented protocols can pack more information into shorter frames and avoid
the transparent or problem of character information given the advantages of Bit-Oriented
protocols and the lack of any preexisting coding system (like ASCII) to tie them to, It is no under
that over the last two decade many different Bit-Oriented protocols have been developed. All
vying to become the standard, see in Figure (10). Most of these offerings have been proprietary,
designed the manufactures to support their own products. One of them, HDLC, is the design of
the ISO and has become the basis for all Bit-Oriented protocols in use today.
![Page 20: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/20.jpg)
Bit-Oriented protocols
In 1975, IBM pioneered the development of bit-oriented protocols with synchronous data link
control (SDLC), and lobbied the ISO to make SDLC the standard. In 1979, the ISO answered
with high-level data link control (HDLC), which was based on SDLC. Adoption of HDLC by the
ISO committees led to its adoption and extension be other organizations. The ITU-T was one of
the first organizations to embrace HDLC since 1981. ITU-T has developed a series of protocols
called link access protocol (LAPs : LAPB, LAPD, LAPM, LAPX, etc.), all based on HDLC.
Other protocols (Such as frame relay, PPP, etc.) developed by both ITU-T and ANSI also derive
from HDLC as do most LANs access control protocols. In short, all bit-oriented protocols in use
today either derive from or are sources for HDLC. Through HDLC, therefore, we have a basis
for understanding the others. All bit-Oriented protocols are related to high-level data link control
(HDLC), a bit-oriented protocol published by ISO. HDLC supports both half-duplex and full-
duplex modes in point.
HDLC
HDLC is a bit-oriented data link protocol designed to support both half-duplex and full-duplex
communication over point-to-point and multipoint links. Systems using HDLC can be
characterized by their station types, their configurations, and their response modes.
Station Types
HLDC differentiates between three different types of stations: primary, Secondary, and
combined.
A primary station in HDLC functions in the same way as the primary devices in the
discussions of flow control in the last article. The primary is the device in either a point-to-point
or multipoint line configuration that has complete control of the link.
The primary sends commands to the secondary, A primary issues commands, a secondary issues
responses. An example of the relation of a primary to a secondary is that of computer to terminal.
A combined station can both command and respond. A combined station is one of a set of
connected peer devices programmed to behave either as a primary or as a secondary depending
on the nature and direction of the transmission.
![Page 21: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/21.jpg)
Stations in HDLC are of three types: Primary, Secondary, and Combined. A primary station
sends commands, A secondary station sends responses, A Combined station sends commands
and responses.
Configurations:
The word configuration refers to the relationship of hardware devices on a link, Devices may
be organized as primary and secondary or as peers. Peer devices must be able to act as both
primary or secondary, depending on the mode selected for the exchange (See the section Modes
of Communication. Primary, Secondary, and Combined stations can be configured in three
ways : Unbalanced, Symmetrical, and balanced. Any of these configurations can support both
half-duplex and full-duplex transmission.
An unbalanced configuration (also called a master/slave configuration) is one in which one
device is primary and the others are secondary. Unbalanced configurations can be point-to-point
if only two devices are involved: more often they are multipoint with one computer controlling
several peripherals. An example of an unbalanced configuration is a computer and one or more
terminals.
A symmetrical configuration is one in which each physical station on a link consists of two
logical stations, one a primary and the other a secondary. Separate lines link the primary aspect
of one physical station to the secondary aspect of another physical station. A symmetrical
configuration behaves like an unbalanced configuration except that control of the link can shift
between the two stations.
A balanced configuration is one in which both stations in a point-to-point topology are of the
combined type. The stations are linked by a single line that can be controlled by either station.
![Page 22: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/22.jpg)
HDLC Configurations
HDLC does not support balanced multipoint. This necessitated the invention of media access
protocols for LANs.
TCP/IP Model
The TCP/IP model is a concise version of the OSI model. It contains four layers, unlike seven
layers in the OSI model. The layers are:
1. Process/Application Layer
2. Host-to-Host/Transport Layer
3. Internet Layer
4. Network Access/Link Layer
Network Access Layer
This layer corresponds to the combination of Data Link Layer and Physical Layer of the OSI
model. It looks out for hardware addressing and the protocols present in this layer allows for the
physical transmission of data.
We just talked about ARP being a protocol of Internet layer, but there is a conflict about
declaring it as a protocol of Internet Layer or Network access layer. It is described as residing in
layer 3, being encapsulated by layer 2 protocols.
2. Internet Layer
This layer parallels the functions of OSI’s Network layer. It defines the protocols which are
responsible for logical transmission of data over the entire network. The main protocols residing
at this layer are :
1. IP – stands for Internet Protocol and it is responsible for delivering packets from the source
host to the destination host by looking at the IP addresses in the packet headers. IP has 2
versions:
1. IPv4 and IPv6. IPv4 is the one that most of the websites are using currently. But IPv6 is
growing as the number of IPv4 addresses are limited in number when compared to the
number of users.
2. ICMP – stands for Internet Control Message Protocol. It is encapsulated within IP
datagrams and is responsible for providing hosts with information about network problems.
![Page 23: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/23.jpg)
3. ARP – stands for Address Resolution Protocol. Its job is to find the hardware address of a
host from a known IP address. ARP has several types: Reverse ARP, Proxy ARP,
Gratuitous ARP and Inverse ARP.
3. Host-to-Host Layer
This layer is analogous to the transport layer of the OSI model. It is responsible for end-to-end
communication and error-free delivery of data. It shields the upper-layer applications from the
complexities of data. The two main protocols present in this layer are :
1. Transmission Control Protocol (TCP) – It is known to provide reliable and error-free
communication between end systems. It performs sequencing and segmentation of data. It
also has acknowledgment feature and controls the flow of the data through flow control
mechanism. It is a very effective protocol but has a lot of overhead due to such features.
Increased overhead leads to increased cost.
2. User Datagram Protocol (UDP) – On the other hand does not provide any such features.
It is the go-to protocol if your application does not require reliable transport as it is very
cost-effective. Unlike TCP, which is connection-oriented protocol, UDP is connectionless.
Application Layer
This layer performs the functions of top three layers of the OSI model: Application, Presentation
and Session Layer. It is responsible for node-to-node communication and controls user-interface
specifications. Some of the protocols present in this layer are: HTTP, HTTPS, FTP, TFTP,
Telnet, SSH, SMTP, SNMP, NTP, DNS, DHCP, NFS, X Window, LPD. Have a look
at Protocols in Application Layer for some information about these protocols. Protocols other
than those present in the linked article are :
1. HTTP and HTTPS – HTTP stands for Hypertext transfer protocol. It is used by the World
Wide Web to manage communications between web browsers and servers. HTTPS stands
for HTTP-Secure. It is a combination of HTTP with SSL(Secure Socket Layer). It is
efficient in cases where the browser need to fill out forms, sign in, authenticate and carry
out bank transactions.
2. SSH – SSH stands for Secure Shell. It is a terminal emulations software similar to Telnet.
The reason SSH is more preferred is because of its ability to maintain the encrypted
connection. It sets up a secure session over a TCP/IP connection.
3. NTP – NTP stands for Network Time Protocol. It is used to synchronize the clocks on our
computer to one standard time source. It is very useful in situations like bank transactions.
Assume the following situation without the presence of NTP. Suppose you carry out a
transaction, where your computer reads the time at 2:30 PM while the server records it at
2:28 PM. The server can crash very badly if it’s out of sync.
![Page 24: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/24.jpg)
SMTP
o SMTP stands for Simple Mail Transfer Protocol.
o SMTP is a set of communication guidelines that allow software to transmit an electronic
mail over the internet is called Simple Mail Transfer Protocol.
o It is a program used for sending messages to other computer users based on e-mail
addresses.
o It provides a mail exchange between users on the same or different computers, and it also
supports:
o It can send a single message to one or more recipients.
o Sending message can include text, voice, video or graphics.
o It can also send the messages on networks outside the internet.
o The main purpose of SMTP is used to set up communication rules between servers. The
servers have a way of identifying themselves and announcing what kind of
communication they are trying to perform. They also have a way of handling the errors
such as incorrect email address. For example, if the recipient address is wrong, then
receiving server reply with an error message of some kind.
Working of SMTP
1. Composition of Mail: A user sends an e-mail by composing an electronic mail message
using a Mail User Agent (MUA). Mail User Agent is a program which is used to send
and receive mail. The message contains two parts: body and header. The body is the main
part of the message while the header includes information such as the sender and
recipient address. The header also includes descriptive information such as the subject of
the message. In this case, the message body is like a letter and header is like an envelope
that contains the recipient's address.
2. Submission of Mail: After composing an email, the mail client then submits the
completed e-mail to the SMTP server by using SMTP on TCP port 25.
3. Delivery of Mail: E-mail addresses contain two parts: username of the recipient and
domain name. For example, [email protected], where "vivek" is the username of the
recipient and "gmail.com" is the domain name.
If the domain name of the recipient's email address is different from the sender's domain
name, then MSA will send the mail to the Mail Transfer Agent (MTA). To relay the
email, the MTA will find the target domain. It checks the MX record from Domain Name
System to obtain the target domain. The MX record contains the domain name and IP
address of the recipient's domain. Once the record is located, MTA connects to the
exchange server to relay the message.
![Page 25: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/25.jpg)
4. Receipt and Processing of Mail: Once the incoming message is received, the exchange
server delivers it to the incoming server (Mail Delivery Agent) which stores the e-mail
where it waits for the user to retrieve it.
5. Access and Retrieval of Mail: The stored email in MDA can be retrieved by using
MUA (Mail User Agent). MUA can be accessed by using login and password.
HTTP
o HTTP stands for HyperText Transfer Protocol.
o It is a protocol used to access the data on the World Wide Web (www).
o The HTTP protocol can be used to transfer the data in the form of plain text, hypertext,
audio, video, and so on.
o This protocol is known as HyperText Transfer Protocol because of its efficiency that
allows us to use in a hypertext environment where there are rapid jumps from one
document to another document.
o HTTP is similar to the FTP as it also transfers the files from one host to another host. But,
HTTP is simpler than FTP as HTTP uses only one connection, i.e., no control connection
to transfer the files.
o HTTP is used to carry the data in the form of MIME-like format.
o HTTP is similar to SMTP as the data is transferred between client and server. The HTTP
differs from the SMTP in the way the messages are sent from the client to the server and
from server to the client. SMTP messages are stored and forwarded while HTTP
messages are delivered immediately.
Features of HTTP:
o Connectionless protocol: HTTP is a connectionless protocol. HTTP client initiates a
request and waits for a response from the server. When the server receives the request,
the server processes the request and sends back the response to the HTTP client after
which the client disconnects the connection. The connection between client and server
exist only during the current request and response time only.
o Media independent: HTTP protocol is a media independent as data can be sent as long
as both the client and server know how to handle the data content. It is required for both
the client and server to specify the content type in MIME-type header.
o Stateless: HTTP is a stateless protocol as both the client and server know each other only
during the current request. Due to this nature of the protocol, both the client and server do
not retain the information between various requests of the web pages.
![Page 26: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/26.jpg)
HTTP Transactions
The above figure shows the HTTP transaction between client and server. The client initiates a
transaction by sending a request message to the server. The server replies to the request message
by sending a response message.
FTP
o FTP stands for File transfer protocol.
o FTP is a standard internet protocol provided by TCP/IP used for transmitting the files
from one host to another.
o It is mainly used for transferring the web page files from their creator to the computer
that acts as a server for other computers on the internet.
o It is also used for downloading the files to computer from other servers.
Objectives of FTP
o It provides the sharing of files.
o It is used to encourage the use of remote computers.
o It transfers the data more reliably and efficiently.
![Page 27: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/27.jpg)
The FTP client has three components: the user interface, control process, and data transfer
process. The server has two components: the server control process and the server data transfer
process.
There are two types of connections in FTP:
o Control Connection: The control connection uses very simple rules for communication.
Through control connection, we can transfer a line of command or line of response at a
time. The control connection is made between the control processes. The control
connection remains connected during the entire interactive FTP session.
o Data Connection: The Data Connection uses very complex rules as data types may vary.
The data connection is made between data transfer processes. The data connection opens
when a command comes for transferring the files and closes when the file is transferred.
FTP Clients
o FTP client is a program that implements a file transfer protocol which allows you to
transfer files between two hosts on the internet.
o It allows a user to connect to a remote host and upload or download the files.
o It has a set of commands that we can use to connect to a host, transfer the files between
you and your host and close the connection.
o The FTP program is also available as a built-in component in a Web browser. This GUI
based FTP client makes the file transfer very easy and also does not require to remember
the FTP commands.
Advantages of FTP:
o Speed: One of the biggest advantages of FTP is speed. The FTP is one of the fastest way
to transfer the files from one computer to another computer.
![Page 28: hicaselectronics.files.wordpress.com … · Web view, and synchronization of communication; the specified behavior is typically independent of how it is to be implemented. A protocol](https://reader033.vdocuments.mx/reader033/viewer/2022051904/5ff66c5c3b113417c6043757/html5/thumbnails/28.jpg)
o Efficient: It is more efficient as we do not need to complete all the operations to get the
entire file.
o Security: To access the FTP server, we need to login with the username and password.
Therefore, we can say that FTP is more secure.
o Back & forth movement: FTP allows us to transfer the files back and forth. Suppose
you are a manager of the company, you send some information to all the employees, and
they all send information back on the same server.
Disadvantages of FTP:
o The standard requirement of the industry is that all the FTP transmissions should be
encrypted. However, not all the FTP providers are equal and not all the providers offer
encryption. So, we will have to look out for the FTP providers that provides encryption.
o FTP serves two operations, i.e., to send and receive large files on a network. However,
the size limit of the file is 2GB that can be sent. It also doesn't allow you to run
simultaneous transfers to multiple receivers.
o Passwords and file contents are sent in clear text that allows unwanted eavesdropping.
So, it is quite possible that attackers can carry out the brute force attack by trying to guess
the FTP password.
o It is not compatible with every system.