Datacommunication Module4
Datacommunication Module4
• Sending data in the form of signals over a transmission link within the network
requires much more than just the physical transmission link and the
synchronization and interfacing techniques, to control and manage the data
exchange for ensuring reliable data transfer across a physical link.
2. LINE DISCIPLINE
o Enquiry/Acknowledgement(ENQ/ACK)
o Poll/Select
Enquiry/Acknowledgement(ENQ/ACK)
• This method is used when there is dedicated link between sender and receiver.
• This method is used in point to point communication.
• It uses half duplex method.
• Enquiry/Acknowledgment (ENQ/ACK) is a relatively simple data-link-layer line
discipline protocol that works best in simple network environments where there
is no doubt as to which station is the intended receiver.
• ENQ/ACK line discipline procedures determine which device on a network can
initiate a transmission and whether the intended receiver is available and ready
to receive a message.
• Assuming all stations on the network have equal access to the transmission
medium, a data session can be initiated by any station using ENQ/ACK.
• The initiating station begins a session by transmitting a frame of data called
an enquiry (ENQ), which identifies the receiving station.
• The ENQ sequence solicits the receiving station to determine if it is ready to
receive a message.
• If the destination station is ready to receive, it responds with a positive
acknowledgment (ACK), and if it is not ready to receive, it responds with a
negative acknowledgment (NAK).
• After a specific time period (called the timeout ),the sender retransmits the
ENQ frame .
• A NAK transmitted by the destination station in response to an ENQ generally
indicates a temporary unavailability and the initiating station will simply attempt
to establish a session later
• An ACK from the destination station indicates that it is ready to receive data and
tells the initiating station that it is free to transmit its message.
• All transmitted message end with a special unique terminating sequence called
EOT(end of transmission).
• An ACK transmitted in response to a received message indicates the message
was received without errors, and a NAK indicates that the message was
received containing errors.
POLL/SELECT
3. FLOW CONTROL
• The simplest form of flow control, known as stop-and-wait flow control, works
as follows:
1. A sender transmits a frame.
2. After the receiver receives the frame, it indicates its willingness to accept
another frame by sending back an acknowledgment to the frame just
received.
3. After having sent a frame, the sender is required to wait until the
acknowledgement frame arrives before sending the next frame.
• The receiver can thus stop the flow of data simply by withholding
acknowledgment.
• This process of sending a frame and waiting for an acknowledgment
continues as long as the sender has data to send.
• To end up the transmission sender transmits an end of transmission (EOT)
frame.
• As part of error control, in the stop-and-wait protocol, when the sender does
not receive ACK for previous sent packet after a certain period of time, the
sender times out and retransmits that packet.
• There are two cases when the sender doesn't receive ACK: one is when the
ACK is lost and the other is when the frame itself is not transmitted.
• It works on half-duplex and the channel is capable of bidirectional
information transfer.
• The main advantage of stop & wait protocols is its accuracy.
• To improve efficiency while providing of network bandwidth reliability, sliding
window protocol has been introduced.
Sliding-window flow control
4. Error Control
• Since the underlying technology at the physical layer is not fully reliable, we
need to implement error control at the data-link layer to prevent the receiving
node from delivering corrupted packets to its network layer
• Error control refers to mechanisms to detect and correct errors that occur in
the transmission of frames.
• During the frame transmission, there is a possibility of occurring two types of
errors:
o Lost frame: A frame (data frame or acknowledgement frame) fails to
arrive at the other side. For example, a noise burst may damage a
frame to the extent that the receiver is not aware that a frame has been
transmitted.
o Damaged frame: A recognizable frame (data frame or
acknowledgement frame) does arrive, but some of the bits are in error
(have been altered during transmission).
• The most common techniques for error control are based on some or all of
the following components:
• Stop-and-wait ARQ
• Go-back-N ARQ
• Selective-reject ARQ
Stop-and-wait ARQ
Go-Back-N ARQ
• In Go-Back-N ARQ, a station may send a series of frames sequentially
numbered modulo some maximum value (called window size).
• The number of unacknowledged frames outstanding is determined by
window size.
• While no errors occur, the destination will acknowledge incoming frames as
usual.
• If the destination station detects an error in a, frame, it may send a negative
acknowledgment (REJ i) for that frame.
• The destination station will discard that frame and all future incoming
frames until the frame in error is correctly received.
• Thus, the source station, when it receives a REJ i, must retransmit the
frame in error (frame i) plus all succeeding frames (frame i + 1 onwards)
that were transmitted in the interim.
5. FRAMING
• The bit stream received by the Data Link layer is not guaranteed to be error
free. It is up to the Data Link layer to detect and, if necessary, correct errors.
• The usual approach is for the Data Link layer to break up the bit stream into
discrete frames, compute a short token called a checksum for each frame,
and include the checksum in the frame when it is transmitted.
• When a frame arrives at the destination, the checksum is recomputed.
• If the newly computed checksum is different from the one contained in the
frame, the Data Link layer knows that an error has occurred .
• Framing can be of two types:
o In fixed size framing, the size of the frame is fixed and so the frame
length acts as delimiter of the frame.
o In variable sized framing, the size of each frame to be transmitted may
be different. So additional mechanisms are kept to mark the end of one
frame and the beginning of the next frame.
• The methods used for breaking up a bit stream into variable sized frames
include:
o Byte Count.
• The Byte Count framing method uses a field in the header to specify the
number of bytes in the frame. When the data link layer at the destination
sees the byte count, it knows how many bytes follow and hence where the
end of the frame is.
o It will then be unable to locate the correct start of the next frame.
o Even if the checksum is incorrect and so the destination knows that
the frame is bad, it still has no way of telling where the next frame
starts.
• The Flag Byte method gets around the problem of resynchronization after
an error by having each frame start and end with special bytes.
o Flag byte, is used as both the starting and ending delimiter.
o Two consecutive flag bytes indicate the end of one frame and the start
of the next.
o Thus, if the receiver ever loses synchronization it can just search for
two flag bytes to find the end of the current frame and the start of the
next frame.
o A framing flag byte can be distinguished from one in the data by the
absence or presence of an escape byte before it
o The data link layer on the receiving end removes the escape bytes
before giving the data to the network layer. This technique is called
byte stuffing.
• The flag bit stuffing is an alternative to byte stuffing, which uses framing at
the bit level, so that frames can contain an arbitrary number of bits made up
of units of any size.
o In bit flag stuffing, each frame begins and ends with a special flag byte
bit pattern (01111110 or 0x7E in hexadecimal. This pattern is a flag
byte.
o Whenever the sender's data link layer encounters five consecutive 1s
in the data automatically stuffs a bit into the outgoing bit stream.
• The framing technique using Physical Layer Coding Violations is only
applicable to networks in which the encoding on the physical medium
contains some redundancy.
o we are using coding violations to delimit frames.
o The beauty of this scheme is that, because they are unused or
reserved signals, it is easy to find the start and end of frames and there
is no need to stuff the data.
6. DATA TRANSMISSION MODES
Parallel transmission
• Binary data, consisting of Is and 0s, may be organized into groups of n bits
each.
• By grouping, we can send data n bits at a time instead of 1. This is called
parallel transmission.
• The mechanism for parallel transmission involves use of n wires to send n
bits at one time.
• That way each bit has its own wire, and all n bits of one group can be
transmitted with each clock tick from one device to another.
• The advantage of parallel transmission is speed.
• Parallel transmission can increase the transfer speed by a factor of n over
serial transmission.
• But the cost of parallel transmission is significantly high as compared to
serial transmission.
• Parallel transmission is usually limited to short distances due to its high
expense.
Serial Transmission
• In serial transmission one bit follows another, thus it requires only one
communication channel rather than a to transmit data between two
communicating devices.
• Since communication within devices is parallel conversion devices are
required at the interface between the sender and the line (parallel-to-serial)
and between the line and the receiver (serial - to - parallel)
• Serial transmission occurs in one of two ways:
• A typical frame format for synchronous transmission is, the frame starts with a
preamble called a flag, which is 8 bits long.
o The same flag is used as a postamble.
o The receiver looks for the occurrence of the flag pattern to signal the
start of a frame.
o This is followed by some number of control fields (containing data link
control protocol information then a data field variable length for most
protocols more control fields, and finally the flag is repeated.
• If the sender wishes to send data in separate bursts, the gaps between bursts
must be filled with a special sequence of 0s and is that means idle.
• The receiver counts the bits as they arrive and groups them in 8-bit units.
• The advantage of synchronous transmission is speed.
• With no extra bits or gaps to introduce at the sending end and remove at the
receiving end, synchronous transmission is faster than asynchronous
transmission.
7. Link Access Procedures
• Network links can be divided into two categories those using point to-point
connections and those using broadcast channels.
• In point-to-point connection there exist a dedicated link between an individual pair
of sender and receiver. The capacity of the entire channel is reserved only for the
transmission of the packet between the sender and receiver.
• Point-to-point transmission with exactly one sender and one receiver is
sometimes called unicasting.
• Broadcast links (sometimes referred to as multiaccess channels or multipoint
channels or random access channels).
• The channel capacity is shared temporarily by every device connecting to the
link.
• The packet transmitted by the sender is received and processed by every device
on the link. But, by the address field in the packet, the receiver determines
whether the packet belongs to it or not, if not, it discards the packet, otherwise it
accepts and responds accordingly.
• It is the Media Access Control (MAC) sublayer of the Data Link layer that
determines who is allowed to access the media at any one time.
• Random-access protocols, such as ALOHA, CSMA CSMA/CD, and CSMA/CA.
• These protocols are mostly used in LANs and WANS
7.1. Random-Access Protocols
• In random-access or contention methods no station is superior to another station
and none is assigned control over another.
• At each instance, a station that has data to send uses a procedure defined by the
protocol to make a decision on whether or not to send. This decision depends on
the state of the medium (idle or busy).The 2 features of this protocol are:
7.1.1. ALOНА
1-persistent:
P-persistent:
O-persistent:
7.1.4. CSMA/CA
Contention Window.
Acknowledgment
• In controlled access, the stations consult one another to find which station has
the right to send.
• A station cannot send unless it has been authorized by other stations.
• Controlled-access protocols include:
o Reservation
o Polling
7.2.2 Polling
o When the response is positive (a data frame), the primary reads the
frame and returns an acknowledgment (ACK frame), verifying its
receipt.
• The drawback is that if the primary device fails, entire system fails.
• In 1985, the Computer Society of the IEEE (Institute of Electrical and Electronics
Engineers) started a project, called Project 802, to set standards to enable
intercommunication among equipment from a variety of manufacturers.
• The objectives of the Project 802 was to provide a way for specifying functions
of the physical layer and the data link layer of major LAN protocols.
• This standards are restricted to networks carrying variable-size packets.
• The IEEE 802 standard splits the OSI Data Link Layer into two sub layers named
Logical Link Control (LLC) and Media Acces Control (MAC).
• The LLC provides a single link-layer control protocol for all IEEE LANs.
• This means LLC protocol can provide interconnectivity between
different LANs because it makes the MAC sublayer transparent.
• The LLC layer performs flow control, error control, and part of the
framing duties.
• The Media Access Control that defines the specific access method for each
LAN.
• The MAC layer varies for different network types and is defined by different
standards.
• A part of the framing function is also handled by the MAC layer.
• The better known specifications include 802.3 Ethernet, 802.11 Wi-Fi (wireless
LAN), 802.15 Bluetooth (wireless Personal Area Network), and 802.16 Wireless
Metropolitan Area Networks.
IEEE 802.3:ETHERNET
• The services and protocols specified in IEEE 802.3 map to the lower two layers
(Data Link and Physical) of the seven-layer OSI networking reference model.
• The IEEE 802.3 splits the OS1 Data Link Layer into two sub-layers named
logical link control (LLC) and media access control (MAC).
• The LLC provides a single link-layer control protocol and can provide
interconnectivity between different LANs because it makes the MAC sublayer
transparent.
• The original 10BASE5 Ethernet used coaxial cable as a shared medium, while
the newer Ethernet variants use twisted pair and fibreoptic links in conjunction
with switches.
• At the sender, data are converted to a digital signal using the Manchester
scheme, at the receiver, the received signal is interpreted as Manchester and
decoded into data.
• The four most common physical layer implementations are
• Token bus is a network implementing the token ring protocol over a virtual ring
on a coaxial cable.
• A token is passed around the network nodes and only the node possessing the
token may transmit.
• If a node doesn't have anything to send, the token is passed on to the next
node on the virtual ring.
• Each node must know the address of its neighbour in the ring, so a special
protocol is needed to notify the other nodes of connections to, and
disconnections from, the ring
• When the logical ring is initialized, the highest numbered station may send the
first frame.
• The token are passed from one station to another following the numeric
sequence of the station addresses
2. When a computer has a message to send, it seizes the token The computer
will then be able to send the frame
4. When the frame gets back to the originator, it sees that the token has been
changed to 0 and that the message has been copied and received. It
removes the message from the frame.
• FDDI is a set of ANSI and ISO standards for data transmission on fibre optic
lines in a LAN that can extend in range up to 200 km (124 miles)
• FDDI uses optical fibre as its standard underlying physical medium.
• If the physical medium is copper cable, in which case it may be called CDDI
(Copper Distributed Data Interface) standardized as TP-PMD (Twisted-Pair
Physical Medium-Dependent), also referred to as TP-DDI (Twisted-Pair
Distributed Data Interface).
• The protocol used is derived from the IEEE 802.4 token bus timed token
protocol.
• In addition to covering large geographical areas, FDDI local area networks
can support thousands of users.
• FDDI offers both a Dual-Attached Station (DAS), counter-rotating token ring
topology and a Single-Attached Station (SAS), token bus passing ring
topology.
• An FDDI network contains two token rings, one for possible backup in case
the primary ring fails.
• The primary ring offers up to 100 Mbps capacity. If the secondary ring is not
needed for backup, it can also carry data, extending capacity to 200 Mbps.
• The single ring can extend the maximum distance, a dual ring can extend
100 km (62 miles)
3. Usually, the network is not fully connected, that is, there is not a direct link
between every possible pair of nodes .
• It is always desirable to have more than one possible path through the
network for each pair of stations.
• This enhances the reliability of the network
Circuit Switching.
Packet Switching,
Message Switching.
CIRCUIT SWITCHED NETWORK
• Circuit Establishment
• Data Transfer
• Circuit Disconnect
2. Data Transfer. Data can now be transmitted from station A through the
network to E. The transmission may be analogue or digital, depending on
the nature of the network. Generally, the connection is full duplex.
• channel capacity must be reserved between each pair of nodes in the path, and
each node must have available internal switching capacity to handle the
requested connection.
• The switches must have the intelligence to make these allocations and to devise
a route through the network.
• In terms of performance, there is a delay prior to signal transfer for call
establishment.
• However, once the circuit is established, the network is effectively transparent
to the users.
Node delay: The time it takes for a node to perform the necessary processing
as it switches data
• Once the connection is established between two parties, it will be available till
end of the conversation. This guarantees reliable connection in terms of
constant data rate and availability of resources
• Once the circuit is established, data is transmitted without any delay as there is
no waiting time at each switch.
Disadvantages of Circuit :
• Prior to actual data transfer, the time required to establish a physical link
between the two stations is too long.
Packet-Switching Network
• More robust than the circuit switched systems and more suitable for transmitting
the binary data.
• More faults tolerant as the packets can be routed to bypass the malfunctioning
components of the network as packets can follow different routes to the
destination.
• More efficient as packet switching reduces network bandwidth wastage.
• Destination information is contained in each packet, so numerous messages
can be sent quickly to many different destinations.
• Computers at each node allow dynamic data routing.
• Throughput and efficiency might be maximized.
• Ability to emulate a circuit switched network.
• A damaged packet can be resent. No need to resent an entire message.
• It allows multiplexing. Many users can share the same channel simultaneously.
Hence packet switching makes use of available bandwidth efficiently.
• Bill users only on the basis of duration of connectivity
• It uses a digital network. This method enables digital data to be directly
transmitted to a destination, and is therefore appropriate for data
communication systems.
• Delay in delivery of packets is less, since packets are sent as soon as they are
available.
• Switching devices don't require massive storage, since they don't have to store
the entire messages before forwarding them to the next node.
• They are unsuitable for applications that cannot afford delays in communication
like high quality voice calls.
• Packets may be lost on their route, so sequence numbers are required to
identify missing packets.
• Switching nodes requires more processing power as the packet switching
protocols are more complex
• Switching nodes for packet switching require large amount of RAM to handle
large quantities of packets.
• A significant data transmission delay occurs because of the use of store and
forward method .
• Network problems may introduce errors in packets, delay in delivery of packets
Nd loss of packets. If properly handled this may lead to loss of critical
information.
• There are 2 types of packet switching networks:
o Datagram networks
Datagram network
MESSAGE SWITCHING
Advantages:
• As more devices share the same channel simultaneously for message transfer,
it has higher channel efficiency compared to circuit switching.
• In this type, messages are stored temporarily en-route and hence congestion
can be reduced to greater extent.
• It is possible to incorporate priorities to the messages as they use store and
forward technique for delivery.
• It supports message lengths of unlimited size.
• It does not require physical connection between source and destination devices
unlike circuit switching.
• Broadcasting of single message can be done to multiple receivers by appending
broadcast address to the message.
Disadvantages:
• The method is costly as store and forward devices are expensive.
• It can lead to security issues if hacked by intruders.
• Message switching type does not establish dedicated path between the
devices. As there is no direct link between sender and receiver, it is not reliable
communication.
• Because the messages are fully packaged and saved indefinitely at every
intermediate node, the nodes demand substantial storage capacity.
• Message-switched networks are very slow as the processing takes place in
each and every node, which may result in poor performance.
• This switching type is not compatible for interactive applications such as voice
and video. This is due to longer message delivery time.
ISDN
• ISDN was born out of necessity Analogue phone networks failed constantly and
proved to be unreliable for long-distance connections
• The system began to change over to a packet-based, digital switching system.
The UN-based International Telecommunications Union, or ITU, started
recommending ISDN in 1988 as a new system for operating companies to
deliver data.
• By the 1990s, the National ISDN 1 was created.
• Today, ISDN has been replaced by broadband internet access connections like
DSL, WAN, and cable modems.
• It is still used as a backup when the main lines fail.
ISDN Channels, Access and Interfaces
Primary Access: Primary access (also called 30B + D access, PARA Primary
Rate Access or PRI - Primary Rate Interface), offers the user 30 B channels and a
64 kbps D channel, thus providing a bandwidth of up to 2,048 Kbps.
• It allows to establish up to thirty simultaneous communications at 64Kbps
without currently planning to use the capacity of the D-channel for data
transmission.
• You can also use other combinations of channels B, HO, H11 and H12, but
always respecting the speed limit of 2,048 Kbps.
• The main application of this type of access is the connection to ISDN of small
digital exchanges, multi-line systems, and local area networks of medium and
large capacity.
ISDN SERVICES
An ISDN user device obtains a network connection by requesting service over the
D-channel. The requested message over the D channel contains a set of
parameters identifying the desired service. The Services are:
Bearer Services: Bearer Services are those which allow user to send information
from one device on the network to another. They allow information transfer and
involve the lower 3 layers of the OSI model, depending on the service Users may
agree to use any of the higher layer protocols and is transparent to ISDN.