Chapter 5
Chapter 5
Layer
By - Sneha Nandanwar
PHYSICAL LAYER
⚫ Physical layer in the OSI model plays the role of interacting with actual hardware
and signaling mechanism.
⚫ Physical layer is the only layer of OSI network model which actually deals with the
physical connectivity of two different stations.
⚫ This layer defines the hardware equipment, cabling, wiring, frequencies, pulses used
to represent binary signals etc.
⚫ Physical layer provides its services to Data-link layer. Data-link layer hands over
frames to physical layer.
⚫ Physical layer converts them to electrical pulses, which represent binary data.
⚫ The binary data is then sent over the wired or wireless media.
GUIDED MEDIA
For any networking to be effective, raw stream of data is to be
transported from one device to other over some medium. Various
transmission media can be used for transfer of data. These
transmission media may be of two types −
⚫ However, if two or more wires are lying together, they can interfere with each
other’s signals.
⚫ Each twisted pair and then all the pairs are shielded.
⚫ Such twisted pairs are called shielded twisted pair (STP) cables.
⚫ The wires that are not shielded but simply bundled together in a protective
sheath are called unshielded twisted pair (UTP) cables. These cables can
have maximum length of 100 metres.
⚫ Shielding makes the cable bulky, so UTP are more popular than STP. UTP
cables are used as the last mile network connection in homes and offices.
COAXIAL CABLES
⚫ Coaxial cables are copper cables with better shielding than twisted
pair cables, so that transmitted signals may travel longer distances at
higher speeds. A coaxial cable consists of these layers, starting from
the innermost −
⚫ Stiff copper wire as core
⚫ Insulating material surrounding the core
⚫ Closely woven braided mesh of conducting material
surrounding the insulator
⚫ Protective plastic sheath encasing the wire
⚫ Coaxial cables are widely used for cable TV connections and LANs.
COAXIAL CABLES
COAXIAL CABLES
Advantages of Coaxial Cables
⚫ These are the advantages of coaxial cables −
⚫ Excellent noise immunity
⚫ Signals can travel longer distances at higher speeds, e.g. 1 to 2 Gbps
for 1 Km cable
⚫ Can be used for both analog and digital signals
⚫ Inexpensive as compared to fibre optic cables
⚫ Easy to install and maintain
Disadvantages of Coaxial Cables
⚫ These are some of the disadvantages of coaxial cables −
⚫ Expensive as compared to twisted pair cables
⚫ Not compatible with twisted pair cables
FIBER OPTIC CABLE
⚫ Thin glass or plastic threads used to transmit data using light waves are
called optical fibre. Light Emitting Diodes (LEDs) or Laser Diodes
(LDs) emit light waves at the source, which is read by a detector at the
other end.
⚫ Optical fibre cable has a bundle of such threads or fibres bundled
together in a protective covering. Each fibre is made up of these three
layers, starting with the innermost layer −
□ Core made of high quality silica glass or plastic
□ Cladding made of high quality silica glass or plastic, with a lower
refractive index than the core
□ Protective outer covering called buffer
⚫ Note that both core and cladding are made of similar material.
However, as refractive index of the cladding is lower, any stray light
wave trying to escape the core is reflected back due to total internal
reflection.
FIBER OPTIC CABLE
Advantages of Optical Fibre
⚫ Optical fibre is fast replacing copper wires because of these advantages
that it offers −
⚫ High bandwidth
⚫ Immune to electromagnetic interference
⚫ Suitable for industrial and noisy areas
⚫ Signals carrying data can travel long distances without weakening
Disadvantages of Optical Fibre
⚫ Despite long segment lengths and high bandwidth, using optical fibre
may not be a viable option for every one due to these disadvantages −
⚫ Optical fibre cables are expensive
⚫ Sophisticated technology required for manufacturing,
installing and maintaining optical fibre cables
⚫ Light waves are unidirectional, so two frequencies are required for full
duplex transmission
WIRELESS TRAMSIMISSION
⚫ The electromagnetic spectrum is the range of all possible
frequencies of electromagnetic waves.
⚫ The spectrum is broken into regions/ranges and classified by
frequency and/or wavelength.
⚫ The frequency (f ) of an electromagnetic wave is a measure of
how rapidly it oscillates.
⚫ Frequency is measured in Hertz
⚫ The ES described as radio waves and micro waves are divided
into eight ranges called as bands.
UNGUIDED MEDIA-RADIO
WAVES
⚫ Transmission of data using radio frequencies
is called radio-wave transmission.
⚫ We all are familiar with radio channels
that broadcast entertainment programs.
⚫ Radio stations transmit radio waves using transmitters, which are
received by the receiver installed in our devices.
⚫ Both transmitters and receivers use antennas to radiate or capture
radio signals.
⚫ These radio frequencies can used for direct
also be communication within the voice
allocated range.
⚫ This range is usually 10 miles.
UNGUIDED MEDIA-RADIO
WAVES
Advantages of Radio Wave
□ Circuit Switching
□ Packet Switching
CIRCUIT SWITCHING
⚫ Circuit switching is a switching technique that establishes a dedicated
path between sender and receiver.
⚫ In the Circuit Switching Technique, once the connection is established
then the dedicated path will remain to exist until the connection is
terminated.
⚫ Circuit switching in a network operates in a similar way as the
telephone works. A complete end-to-end path must exist before the
communication takes place.
⚫ In case of circuit switching technique, when any user wants to send the
data, voice, video, a request signal is sent to the receiver then the
receiver sends back the acknowledgment to ensure the availability of
the dedicated path. After receiving the acknowledgment, dedicated path
transfers the data.
⚫ Circuit switching is used in public telephone network. It is used for
voice transmission. Fixed data can be transferred at a time in circuit
switching technology.
CIRCUIT SWITCHING
Advantages Of Circuit Switching:
⚫ In the case of Circuit Switching technique, the communication channel
is dedicated.
⚫ It has fixed bandwidth.
Disadvantages Of Circuit Switching:
⚫ Once the dedicated path is established, the only delay occurs in the
speed of data transmission.
⚫ It takes a long time to establish a connection approx 10 seconds during
which no data can be transmitted.
⚫ It is more expensive than other switching techniques as a dedicated
path is required for each connection.
⚫ It is inefficient to use because once the path is established and no data
is transferred, then the capacity of the path is wasted.
⚫ In this case, the connection is dedicated therefore no other data can be
transferred even if the channel is free.
PACKET SWITCHING
⚫ The packet switching is a switching technique in which the message is sent in
one go, but it is divided into smaller pieces, and they are sent individually.
⚫ The message splits into smaller pieces known as packets and packets are
⚫ Packets will travel across the network, taking the shortest path as possible.
⚫ All the packets are reassembled at the receiving end in correct order.
resend the message. If the correct order of the packets is reached, then the
⚫ Call request and call accept packets are used to establish the connection
between sender and receiver.
⚫ In this case, the path is fixed for the duration of a logical connection.
DATA LINK LAYER
⚫ In the OSI model, the data link layer is a 4th layer from the top and
⚫ The Data link layer protocol defines the format of the packet
⚫ Length field – We can introduce a length field in the frame to indicate the length of the
frame. Used in Ethernet(802.3). The problem with this is that sometimes the length field
⚫ End Delimeter (ED) – We can introduce an ED(pattern) to indicate the end of the frame.
Used in Token Ring. The problem with this is that ED can occur in the data. This can be
solved by:
then, byte is stuffed into data to diffentiate it from ED. Let ED = “$” –> if data contains
STOP & WAIT PROTOCOL:Here stop and wait means, whatever the
data that sender wants to send, he sends the data to the receiver.
⚫ After sending the data, he stops and waits until he receives the
acknowledgment from the receiver.
⚫ The stop and wait protocol is a flow control protocol where flow
control is one of the services of the data link layer.
It is a layer protocol which is used for transmitting the data over the
noiseless channels. It provides unidirectional data transmission which means
that either sending or receiving of data will take place at a time. It provides
flow-control mechanism but does not provide any error control mechanism.
SLIDING WINDOW-Go back-N ARQ
⚫ Go – Back – N ARQ provides for sending multiple frames before
receiving the acknowledgment for the first frame. The frames
are sequentially numbered and a finite number of frames. The
maximum number of frames that can be sent depends upon the
size of the sending window. If the acknowledgment of a frame is
not received within an agreed upon time period, all frames
starting from that frame are retransmitted.
⚫ The size of the sending window determines the sequence number
of the outbound frames. If the sequence number of the frames is
an n-bit field, then the range of sequence numbers that can be
assigned is 0 to 2n−1. Consequently, the size of the sending
window is 2n−1. Thus in order to accommodate a sending
window size of 2n−1, a n-bit sequence number is chosen.
SELCETIVE REPEAT
⚫ The go-back-n protocol works well if errors are less, but if the line is poor
it wastes a lot of bandwidth on retransmitted frames. An alternative
strategy, the selective repeat protocol, is to allow the receiver to accept and
buffer the frames following a damaged or lost one.
⚫ Selective Repeat protocol provides for sending multiple frames depending
upon the availability of frames in the sending window, even if it does not
receive acknowledgement for any frame in the interim. The maximum
number of frames that can be sent depends upon the size of the sending
window.
⚫ The receiver records the sequence number of the earliest incorrect or un-
received frame. It then fills the receiving window with the subsequent
frames that it has received. It sends the sequence number of the missing
frame along with every acknowledgement frame.
⚫ The sender continues to send frames that are in its sending window. Once,
it has sent all the frames in the window, it retransmits the frame whose
sequence number is given by the acknowledgements. It then continues
sending the other frames.
ERROR CORRECTION &
DETECTION
⚫ There are many reasons such as noise, cross-talk etc., which may help
data to get corrupted during transmission.
⚫ The upper layers work on some generalized
view of network architecture and are not aware of actual
hardware data processing.
⚫ Hence, the upper layers expect error-free
transmission between the systems.
⚫ Most of the applications would not function expectedly if they receive
erroneous data.
⚫ Applications such as voice and video may not be that affected and with
some errors they may still function well.
⚫ Data-link layer uses some error control
mechanism to ensure that frames (data bit streams) are
transmitted with certain level of accuracy.
⚫ But to understand how errors is controlled, it is essential to know what
types of errors may occur.
ERROR CORRECTION &
DETECTION
⚫ A condition when the receiver’s information does not match
with the sender’s information.
⚫ During transmission, digital signals suffer from noise that can
introduce errors in the binary bits travelling from sender to
receiver. That means a 0 bit may change to 1 or a 1 bit may
change to 0.
⚫ Error control mechanism may involve two possible ways:
⚫ Error Detection- Errors in the received frames are detected by
means of Parity Check and Cyclic Redundancy Check (CRC). In
both cases, few extra bits are sent along with actual data to
confirm that bits received at other end are same as they were
sent. If the counter-check at receiver’ end fails, the bits are
considered corrupted.
⚫ Error Correction
ERROR DETECTION
PARITY CHECKS
⚫ Blocks of data from the source are subjected to a check bit or
parity bit generator form, where a parity of :
⚫ 1 is added to the block if it contains odd number of 1’s, and
⚫ This scheme makes the total number of 1’s even, that is why it is
called even parity checking.
⚫ You can also go for odd parity.
ERROR DETECTION
CHECKSUM
⚫ In checksum error detection scheme, the data is divided into k
segments each of m bits.
⚫ In the sender’s end the segments are added using 1’s complement
arithmetic to get the sum. The sum is complemented to get the
checksum.
⚫ The checksum segment is sent along with the data segments.
⚫ At the receiver’s end, all received segments are added using 1’s
complement arithmetic to get the sum. The sum is
complemented.
⚫ If the result is zero, the received data is accepted; otherwise
discarded.
ERROR DETECTION
CYCLIC REDUNDANCY CHECK
⚫ Unlike checksum scheme, which is based on addition, CRC is
based on binary division.
⚫ In CRC, a sequence of redundant bits, called cyclic redundancy
check bits, are appended to the end of data unit so that the
resulting data unit becomes exactly divisible by a second,
predetermined binary number.
⚫ At the destination, the incoming data unit is divided by the same
number. If at this step there is no remainder, the data unit is
assumed to be correct and is therefore accepted.
⚫ A remainder indicates that the data unit has been damaged in
transit and therefore must be rejected.
ERROR DETECTION
HAMMING CODE
⚫ In this coding method, the source encodes the message by inserting redundant
⚫ These redundant bits are extra bits that are generated and inserted at specific