You are on page 1of 35

CS8591_Computer Networks II

UNIT II DATA-LINK LAYER & MEDIA ACCESS


Introduction – Link-Layer Addressing – DLC Services – Data-Link Layer Protocols – HDLC – PPP
- Media Access Control - Wired LANs: Ethernet - Wireless LANs – Introduction – IEEE 802.11,
Bluetooth – Connecting Devices.

1. INTRODUCTION - DATA LINK LAYER


o In the OSI model, the data link layer is a 4th layer from the top and 2nd layer from the
bottom.
o The communication channel that connects the adjacent nodes is known as links, and in
order to move the datagram from source to the destination, the datagram must be
moved across an individual link.
o The main responsibility of the Data Link Layer is to transfer the datagram across an
individual link.
o The Data link layer protocol defines the format of the packet exchanged across the
nodes as well as the actions such as Error detection, retransmission, flow control, and
random access.
o The Data Link Layer protocols are Ethernet, token ring, FDDI and PPP.
o An important characteristic of a Data Link Layer is that datagram can be handled by
different link layer protocols on different links in a path. For example, the datagram is
handled by Ethernet on the first link, PPP on the second link.

The data link protocols operate in the data link layer of the Open System Interconnections
(OSI) model, just above the physical layer.

2. LINK LAYER ADDRESSING

The data link layer provides addressing that is used in transporting a frame across a shared
local media. Device addresses at this layer are referred to as physical addresses. Data link
layer addressing is contained within the frame header and specifies the frame destination
node on the local network. Data-link layer provides layer-2 hardware addressing mechanism.
Hardware address is assumed to be unique on the link. It is encoded into hardware at the time
of manufacturing.

The data link layer has two sublayers: logical link control (LLC) and media access
control (MAC).
Logical link control sublayer
The uppermost sublayer, LLC, multiplexes protocols running at the top of data link layer, and
optionally provides flow control, acknowledgment, and error notification. The LLC provides
addressing and control of the data link. It specifies which mechanisms are to be used for

1
CS8591_Computer Networks II

addressing stations over the transmission medium and for controlling the data exchanged
between the originator and recipient machines.
Media access control sublayer
MAC may refer to the sublayer that determines who is allowed to access the media at any one
time (e.g. CSMA/CD). Other times it refers to a frame structure delivered based on MAC
addresses inside.
There are generally two forms of media access control: distributed and centralized.Both of
these may be compared to communication between people. In a network made up of people
speaking, i.e. a conversation, they will each pause a random amount of time and then attempt
to speak again, effectively establishing a long and elaborate game of saying "no, you first".
The Media Access Control sublayer also performs frame synchronization, which determines the
start and end of each frame of data in the transmission bitstream. It entails one of several
methods: timing-based detection, character counting, byte stuffing, and bit stuffing.

 The time-based approach expects a specified amount of time between frames.


 Character counting tracks the count of remaining characters in the frame header. This
method, however, is easily disturbed if this field is corrupted.
 Byte stuffing precedes the frame with a special byte sequence such as DLE STX and
succeeds it with DLE ETX. Appearances of DLE (byte value 0x10) have to be escaped with
another DLE. The start and stop marks are detected at the receiver and removed as well as
the inserted DLE characters.
 Similarly, bit stuffing replaces these start and end marks with flags consisting of a special
bit pattern (e.g. a 0, six 1 bits and a 0). Occurrences of this bit pattern in the data to be
transmitted are avoided by inserting a bit. To use the example where the flag is 01111110,
a 0 is inserted after 5 consecutive 1's in the data stream. The flags and the inserted 0's are
removed at the receiving end. This makes for arbitrary long frames and easy
synchronization for the recipient. The stuffed bit is added even if the following data bit is 0,
which could not be mistaken for a sync sequence, so that the receiver can unambiguously
distinguish stuffed bits from normal bits.
3. DATA LINK CONTROL SERVICES

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

2
CS8591_Computer Networks II

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.
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.

3
CS8591_Computer Networks II

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.
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.

4
CS8591_Computer Networks II

Poll

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.

5
CS8591_Computer Networks II

FLOW CONTROL
o It is a set of procedures that tells the sender how much data it can transmit before the
data overwhelms the receiver.
o The receiving device has limited speed and limited memory to store the data. Therefore,
the receiving device must be able to inform the sending device to stop the transmission
temporarily before the limits are reached.
o It requires a buffer, a block of memory for storing the information until they are
processed.

Two methods have been developed to control the flow of data:

o Stop-and-wait
o Sliding window

Stop-and-wait

o In the Stop-and-wait method, the sender waits for an acknowledgement after every
frame it sends.
o When acknowledgement is received, then only next frame is sent. The process of
alternately sending and waiting of a frame continues until the sender transmits the
EOT (End of transmission) frame.

Advantage of Stop-and-wait

The Stop-and-wait method is simple as each frame is checked and acknowledged before the
next frame is sent.

Disadvantage of Stop-and-wait

Stop-and-wait technique is inefficient to use as each frame must travel across all the way to
the receiver, and an acknowledgement travels all the way before the next frame is sent. Each
frame sent and received uses the entire time needed to traverse the link.

Sliding Window

o The Sliding Window is a method of flow control in which a sender can transmit the
several frames before getting an acknowledgement.

6
CS8591_Computer Networks II

o In Sliding Window Control, multiple frames can be sent one after the another due to
which capacity of the communication channel can be utilized efficiently.
o A single ACK acknowledge multiple frames.
o Sliding Window refers to imaginary boxes at both the sender and receiver end.
o The window can hold the frames at either end, and it provides the upper limit on the
number of frames that can be transmitted before the acknowledgement.
o Frames can be acknowledged even when the window is not completely filled.
o The window has a specific size in which they are numbered as modulo-n means that
they are numbered from 0 to n-1. For example, if n = 8, the frames are numbered from
0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,1........
o The size of the window is represented as n-1. Therefore, maximum n-1 frames can be
sent before acknowledgement.
o When the receiver sends the ACK, it includes the number of the next frame that it
wants to receive. For example, to acknowledge the string of frames ending with frame
number 4, the receiver will send the ACK containing the number 5. When the sender
sees the ACK with the number 5, it got to know that the frames from 0 through 4 have
been received.

Sender Window

o At the beginning of a transmission, the sender window contains n-1 frames, and when
they are sent out, the left boundary moves inward shrinking the size of the window. For
example, if the size of the window is w if three frames are sent out, then the number of
frames left out in the sender window is w-3.
o Once the ACK has arrived, then the sender window expands to the number which will
be equal to the number of frames acknowledged by ACK.
o For example, the size of the window is 7, and if frames 0 through 4 have been sent out
and no acknowledgement has arrived, then the sender window contains only two
frames, i.e., 5 and 6. Now, if ACK has arrived with a number 4 which means that 0
through 3 frames have arrived undamaged and the sender window is expanded to
include the next four frames. Therefore, the sender window contains six frames
(5,6,7,0,1,2).

Receiver Window

o At the beginning of transmission, the receiver window does not contain n frames, but it
contains n-1 spaces for frames.

7
CS8591_Computer Networks II

o When the new frame arrives, the size of the window shrinks.
o The receiver window does not represent the number of frames received, but it
represents the number of frames that can be received before an ACK is sent. For
example, the size of the window is w, if three frames are received then the number of
spaces available in the window is (w-3).
o Once the acknowledgement is sent, the receiver window expands by the number equal
to the number of frames acknowledged.
o Suppose the size of the window is 7 means that the receiver window contains seven
spaces for seven frames. If the one frame is received, then the receiver window shrinks
and moving the boundary from 0 to 1. In this way, window shrinks one by one, so
window now contains the six spaces. If frames from 0 through 4 have sent, then the
window contains two spaces before an acknowledgement is sent.

ERROR CONTROL
When data-frame is transmitted, there is a probability that data-frame may be lost in the
transit or it is received corrupted. In both cases, the receiver does not receive the correct data-
frame and sender does not know anything about any loss. In such case, both sender and
receiver are equipped with some protocols which helps them to detect transit errors such as
loss of data-frame. Hence, either the sender retransmits the data-frame or the receiver may
request to resend the previous data-frame.
Requirements for error control mechanism:
 Error detection - The sender and receiver, either both or any, must ascertain that
there is some error in the transit.
 Positive ACK - When the receiver receives a correct frame, it should acknowledge it.
 Negative ACK - When the receiver receives a damaged frame or a duplicate frame, it
sends a NACK back to the sender and the sender must retransmit the correct frame.
 Retransmission: The sender maintains a clock and sets a timeout period. If an
acknowledgement of a data-frame previously transmitted does not arrive before the
timeout the sender retransmits the frame, thinking that the frame or it’s
acknowledgement is lost in transit.
Error Control is a technique of error detection and retransmission.

Categories of Error Control:

8
CS8591_Computer Networks II

STOP-AND-WAIT ARQ

Stop-and-wait ARQ is a technique used to retransmit the data in case of damaged or lost
frames.

This technique works on the principle that the sender will not transmit the next frame until it
receives the acknowledgement of the last transmitted frame.

Four features are required for the retransmission:

o The sending device keeps a copy of the last transmitted frame until the
acknowledgement is received. Keeping the copy allows the sender to retransmit the data
if the frame is not received correctly.
o Both the data frames and the ACK frames are numbered alternately 0 and 1 so that
they can be identified individually. Suppose data 1 frame acknowledges the data 0
frame means that the data 0 frame has been arrived correctly and expects to receive
data 1 frame.
o If an error occurs in the last transmitted frame, then the receiver sends the NAK frame
which is not numbered. On receiving the NAK frame, sender retransmits the data.
o It works with the timer. If the acknowledgement is not received within the allotted time,
then the sender assumes that the frame is lost during the transmission, so it will
retransmit the frame.

Two possibilities of the retransmission:

o Damaged Frame: When the receiver receives a damaged frame, i.e., the frame contains
an error, then it returns the NAK frame. For example, when the data 0 frame is sent,
and then the receiver sends the ACK 1 frame means that the data 0 has arrived
correctly, and transmits the data 1 frame. The sender transmits the next frame: data 1.

9
CS8591_Computer Networks II

It reaches undamaged, and the receiver returns ACK 0. The sender transmits the next
frame: data 0. The receiver reports an error and returns the NAK frame. The sender
retransmits the data 0 frame.
o Lost Frame: Sender is equipped with the timer and starts when the frame is
transmitted. Sometimes the frame has not arrived at the receiving end so that it can be
acknowledged neither positively nor negatively. The sender waits for acknowledgement
until the timer goes off. If the timer goes off, it retransmits the last transmitted frame.

Sliding Window ARQ

SlidingWindow ARQ is a technique used for continuous transmission error control.

Three Features used for retransmission:

o In this case, the sender keeps the copies of all the transmitted frames until they have
been acknowledged. Suppose the frames from 0 through 4 have been transmitted, and
the last acknowledgement was for frame 2, the sender has to keep the copies of frames
3 and 4 until they receive correctly.
o The receiver can send either NAK or ACK depending on the conditions. The NAK frame
tells the sender that the data have been received damaged. Since the sliding window is
a continuous transmission mechanism, both ACK and NAK must be numbered for the
identification of a frame. The ACK frame consists of a number that represents the next
frame which the receiver expects to receive. The NAK frame consists of a number that
represents the damaged frame.
o The sliding window ARQ is equipped with the timer to handle the lost
acknowledgements. Suppose then n-1 frames have been sent before receiving any
acknowledgement. The sender waits for the acknowledgement, so it starts the timer and
waits before sending any more. If the allotted time runs out, the sender retransmits one
or all the frames depending upon the protocol used.

Two protocols used in sliding window ARQ:

o Go-Back-n ARQ: In Go-Back-N ARQ protocol, if one frame is lost or damaged, then it
retransmits all the frames after which it does not receive the positive ACK.

10
CS8591_Computer Networks II

Three possibilities can occur for retransmission:

o Damaged Frame: When the frame is damaged, then the receiver sends a NAK frame.

In the above figure, three frames have been transmitted before an error discovered in the third
frame. In this case, ACK 2 has been returned telling that the frames 0,1 have been received
successfully without any error. The receiver discovers the error in data 2 frame, so it returns
the NAK 2 frame. The frame 3 is also discarded as it is transmitted after the damaged frame.
Therefore, the sender retransmits the frames 2,3.

o Lost Data Frame: In Sliding window protocols, data frames are sent sequentially. If any
of the frames is lost, then the next frame arrive at the receiver is out of sequence. The
receiver checks the sequence number of each of the frame, discovers the frame that has
been skipped, and returns the NAK for the missing frame. The sending device

11
CS8591_Computer Networks II

retransmits the frame indicated by NAK as well as the frames transmitted after the lost
frame.
o Lost Acknowledgement: The sender can send as many frames as the windows allow
before waiting for any acknowledgement. Once the limit of the window is reached, the
sender has no more frames to send; it must wait for the acknowledgement. If the
acknowledgement is lost, then the sender could wait forever. To avoid such situation,
the sender is equipped with the timer that starts counting whenever the window
capacity is reached. If the acknowledgement has not been received within the time limit,
then the sender retransmits the frame since the last ACK.

SELECTIVE-REJECT ARQ

o Selective-Reject ARQ technique is more efficient than Go-Back-n ARQ.


o In this technique, only those frames are retransmitted for which negative
acknowledgement (NAK) has been received.
o The receiver storage buffer keeps all the damaged frames on hold until the frame in
error is correctly received.
o The receiver must have an appropriate logic for reinserting the frames in a correct
order.
o The sender must consist of a searching mechanism that selects only the requested
frame for retransmission.

12
CS8591_Computer Networks II

4. DATA LINK LAYER PROTOCOLS

 Synchronous Data Link Protocol (SDLC) − SDLC was developed by IBM in the 1970s
as part of Systems Network Architecture. It was used to connect remote devices to

13
CS8591_Computer Networks II

mainframe computers. It ascertained that data units arrive correctly and with right flow
from one network point to the next.

 High Level Data Link Protocol (HDLC) − HDLC is based upon SDLC and provides both
unreliable service and reliable service. It is a bit – oriented protocol that is applicable for
both point – to – point and multipoint communications.

 Serial Line Interface Protocol (SLIP) − This is a simple protocol for transmitting data
units between an Internet service provider (ISP) and home user over a dial-up link. It
does not provide error detection / correction facilities.

 Point - to - Point Protocol (PPP) − This is used to transmit multiprotocol data between
two directly connected (point-to-point) computers. It is a byte – oriented protocol that is
widely used in broadband communications having heavy loads and high speeds.

 Link Control Protocol (LCP) − It one of PPP protocols that is responsible for
establishing, configuring, testing, maintaining and terminating links for transmission. It
also imparts negotiation for set up of options and use of features by the two endpoints
of the links.

 Network Control Protocol (NCP) − These protocols are used for negotiating the
parameters and facilities for the network layer. For every higher-layer protocol
supported by PPP, one NCP is there.

5. HIGH LEVEL DATA LINK PROTOCOL

High-level Data Link Control (HDLC) is a group of communication protocols of the data link
layer for transmitting data between network points or nodes. Since it is a data link protocol,
data is organized into frames. A frame is transmitted via the network to the destination that
verifies its successful arrival. It is a bit - oriented protocol that is applicable for both point - to -
point and multipoint communications.

HDLC - Short for High-level Data Link Control, a transmission protocol used at the data link
layer (layer 2) of the OSI seven layer model for data communications. The HDLC protocol
embeds information in a data frame that allows devices to control data flow and correct errors.
HDLC is an ISO standard developed from the Synchronous Data Link Control (SDLC) standard
proposed by IBM in the 1970's. HDLC NRM (also known as SDLC).

Transfer Modes
HDLC supports two types of transfer modes, normal response mode and asynchronous
balanced mode.

 Normal Response Mode (NRM) − Here, two types of stations are there, a primary
station that send commands and secondary station that can respond to received
commands. It is used for both point - to - point and multipoint communications.

14
CS8591_Computer Networks II

 Asynchronous Balanced Mode (ABM) − Here, the configuration is balanced, i.e. each
station can both send commands and respond to commands. It is used for only point -
to - point communications.

HDLC Frame
HDLC is a bit - oriented protocol where each frame contains up to six fields. The structure
varies according to the type of frame. The fields of a HDLC frame are −

 Flag − It is an 8-bit sequence that marks the beginning and the end of the frame. The
bit pattern of the flag is 01111110.

 Address − It contains the address of the receiver. If the frame is sent by the primary
station, it contains the address(es) of the secondary station(s). If it is sent by the
secondary station, it contains the address of the primary station. The address field may
be from 1 byte to several bytes.

 Control − It is 1 or 2 bytes containing flow and error control information.

 Payload − This carries the data from the network layer. Its length may vary from one
network to another.

 FCS − It is a 2 byte or 4 bytes frame check sequence for error detection. The standard
code used is CRC (cyclic redundancy code)

15
CS8591_Computer Networks II

Types of HDLC Frames


There are three types of HDLC frames. The type of frame is determined by the control field of
the frame −

 I-frame − I-frames or Information frames carry user data from the network layer. They
also include flow and error control information that is piggybacked on user data. The
first bit of control field of I-frame is 0. I-frames carry user's data and control
information about user's data. I-frame carries user data in the information field. The I-
frame format is shown in diagram.

• The first bit of control field is always zero, i.e. the presence of zero
at this place indicates that it is I-frame.
• Bit number 2, 3 & 4 in control field is called N(S) that specifies the
sequence number of the frame. Thus it specifies the number of the frame
that is currently being sent. Since it is a 3.bit field, only eight sequence
numbers are possible 0, 1,2,3,4,5,6, 7 (000 to 111).
• Bit number 5 in control field is P/F i.e. Poll/Final and is used for
these two purposes. It has, meaning only when it is set i.e. when P/F=1. It
can represent the following two cases.
(i) It means poll when frame is sent by a primary station to
secondary (when address field contains the address of receiver).
(ii) It means final when frame is sent by secondary to a primary
(when the address field contains the address of the sender).
• Bit number 6, 7, and 8 in control field specifies N(R) i.e. the
sequence number of the frame expected in return in two-way
communication.
If last frame received was error-free then N(R) number will be that of the
next frame is sequence. If the last frame was not received correctly, the

16
CS8591_Computer Networks II

N(R) number will be the number of the damaged frame, asking for its
retransmission.

• S-frame − S-frames or Supervisory frames do not contain information field. They are
used for flow and error control when piggybacking is not required. The first two bits of
control field of S-frame is 10. S-frame carries control information, primarily data link layer
flow and error controls. It does not contain information field. The format of S-frame is
shown in diagram.

• U-frame − U-frames or Un-numbered frames are used for myriad


miscellaneous functions, like link management. It may contain an
information field, if required. The first two bits of control field of U-frame is
11. U-frames are reserved for system management and information carried
by them is used for managing the link
• U-frames are used to exchange session management and control
information between the two connected devices.
• Information field in U-frame does not carry user information rather, it
carries system management information.
• The frame format of U-frame is shown in diagram.
• U-frame is identified by the presence of 11 in the first and second bit position in control
field.

17
CS8591_Computer Networks II

6. POINT TO POINT PROTOCOL

Point - to - Point Protocol (PPP) is a communication protocol of the data link layer that is used
to transmit multiprotocol data between two directly connected (point-to-point) computers. It is
a byte - oriented protocol that is widely used in broadband communications having heavy loads
and high speeds. Since it is a data link layer protocol, data is transmitted in frames. It is also
known as RFC 1661.

Services Provided by PPP


The main services provided by Point - to - Point Protocol are −

 Defining the frame format of the data to be transmitted.

 Defining the procedure of establishing link between two points and exchange of data.

 Stating the method of encapsulation of network layer data in the frame.

 Stating authentication rules of the communicating devices.

 Providing address for network communication.

18
CS8591_Computer Networks II

 Providing connections over multiple links.

 Supporting a variety of network layer protocols by providing a range os services.

Components of PPP
Point - to - Point Protocol is a layered protocol having three components −

 Encapsulation Component − It encapsulates the datagram so that it can be


transmitted over the specified physical layer.

 Link Control Protocol (LCP) − It is responsible for establishing, configuring, testing,


maintaining and terminating links for transmission. It also imparts negotiation for set
up of options and use of features by the two endpoints of the links.

 Authentication Protocols (AP) − These protocols authenticate endpoints for use of


services. The two authentication protocols of PPP are:

o Password Authentication Protocol (PAP)

o Challenge Handshake Authentication Protocol (CHAP)

 Network Control Protocols (NCPs) − These protocols are used for negotiating the
parameters and facilities for the network layer. For every higher-layer protocol
supported by PPP, one NCP is there. Some of the NCPs of PPP are:

o Internet Protocol Control Protocol (IPCP)

o OSI Network Layer Control Protocol (OSINLCP)

o Internetwork Packet Exchange Control Protocol (IPXCP)

o DECnet Phase IV Control Protocol (DNCP)

o NetBIOS Frames Control Protocol (NBFCP)

o IPv6 Control Protocol (IPV6CP)

PPP Frame
PPP is a byte - oriented protocol where each field of the frame is composed of one or more
bytes. The fields of a PPP frame are −

 Flag − 1 byte that marks the beginning and the end of the frame. The bit pattern of the
flag is 01111110.

19
CS8591_Computer Networks II

 Address − 1 byte which is set to 11111111 in case of broadcast.

 Control − 1 byte set to a constant value of 11000000.

 Protocol − 1 or 2 bytes that define the type of data contained in the payload field.

 Payload − This carries the data from the network layer. The maximum length of the
payload field is 1500 bytes. However, this may be negotiated between the endpoints of
communication.

 FCS − It is a 2 byte or 4 bytes frame check sequence for error detection. The standard
code used is CRC (cyclic redundancy code)

Byte Stuffing in PPP Frame − Byte stuffing is used is PPP payload field whenever the flag
sequence appears in the message, so that the receiver does not consider it as the end of the
frame. The escape byte, 01111101, is stuffed before every byte that contains the same byte as
the flag byte or the escape byte. The receiver on receiving the message removes the escape byte
before passing it onto the network layer.

Difference Between High-level Data Link Control (HDLC) and Point-to-Point Protocol
(PPP)

The main difference between High-level Data Link Control (HDLC) and Point-to-Point
Protocol (PPP) is that High-level Data Link Control is the bit-oriented protocol, on the other
hand, Point-to-Point Protocol is the byte-oriented protocol.
Another difference between HDLC and PPP is that HDLC is implemented by Point-to-point
configuration and also multi-point configurations on the other hand While PPP is implemented
by Point-to-Point configuration only.

20
CS8591_Computer Networks II

Let’s see that difference between HDLC and PPP:

S.NO HDLC PPP


1. HDLC stands for High-level Data Link PPP stands for Point-to-Point
Control. Protocol.
2. HDLC is a bit oriented protocol. PPP is a byte oriented protocol.
3. HDLC is implemented by Point-to-point PPP is implemented by Point-to-
configuration and also multi-point Point configuration only.
configurations.
4. Dynamic addressing is not offered by While in this Dynamic
HDLC. addressing is offered.
5. HDLC is used in synchronous media. PPP is used in synchronous
media as well as asynchronous
media.
6. HDLC is not compatible with non-Cisco PPP is compatible with non-Cisco
devices. devices.

7. MEDIA ACESS CONTROL

The Media Access Control (MAC) data communication Networks protocol sub-layer, also known
as the Medium Access Control, is a sub-layer of the data link layer specified in the seven-layer
OSI model. The medium access layer was made necessary by systems that share a common
communications medium.

The medium access control (MAC) is a sublayer of the data link layer of the open system
interconnections (OSI) reference model for data transmission. It is responsible for flow control
and multiplexing for transmission medium. It controls the transmission of data packets via
remotely shared channels. It sends data over the network interface card.

In order to communicate or transfer the data from one computer to another computer we need
some address. In Computer Network various types of address are introduced; each works at
different layer. Media Access Control Address is a physical address which works at Data Link
Layer. In this article, we will discuss about addressing in DLL, which is MAC Address.

MAC Layer in the OSI Model


The Open System Interconnections (OSI) model is a layered networking framework that
conceptualizes how communications should be done between heterogeneous systems. The data
link layer is the second lowest layer. It is divided into two sublayers −

 The logical link control (LLC) sublayer

 The medium access control (MAC) sublayer

The following diagram depicts the position of the MAC layer −

21
CS8591_Computer Networks II

Functions of MAC Layer


 It provides an abstraction of the physical layer to the LLC and upper layers of the OSI
network.

 It is responsible for encapsulating frames so that they are suitable for transmission via
the physical medium.

 It resolves the addressing of source station as well as the destination station, or groups
of destination stations.

 It performs multiple access resolutions when more than one data frame is to be
transmitted. It determines the channel access methods for transmission.

 It also performs collision resolution and initiating retransmission in case of collisions.

 It generates the frame check sequences and thus contributes to protection against
transmission errors.

MAC Addresses
MAC address or media access control address is a unique identifier allotted to a network
interface controller (NIC) of a device. It is used as a network address for data transmission
within a network segment like Ethernet, Wi-Fi, and Bluetooth.

MAC address is assigned to a network adapter at the time of manufacturing. It is hardwired or


hard-coded in the network interface card (NIC). A MAC address comprises of six groups of two
hexadecimal digits, separated by hyphens, colons, or no separators. An example of a MAC
address is 00:0A:89:5B:F0:11.

MAC Addresses are unique 48-bits hardware number of a computer, which is


embedded into network card (known as Network Interface Card) during the time of
manufacturing. MAC Address is also known as Physical Address of a network
device. In IEEE 802 standard, Data Link Layer is divided into two sublayers –
1. Logical Link Control(LLC) Sublayer
2. Media Access Control(MAC) Sublayer
MAC address is used by Media Access Control (MAC) sublayer of Data-Link
Layer. MAC Address is word wide unique, since millions of network devices exists
and we need to uniquely identify each.

22
CS8591_Computer Networks II

What is MAC Cloning

Some ISPs use MAC address inorder to assign IP address to gateway device. When device
connects to the ISP, DHCP server records the MAC address and then assign IP address. Now
the system will be identified through MAC address. When the device get disconnected, it looses
the IP address. If user wants to reconnect, DHCP server checks if the device is connected
before. If so, then server tries to assign same IP address (in case lease period not expired). In
case user changed the router, user has to inform the ISP about new MAC address because new
MAC address is unknown to ISP, so connection cannot be
established. Or the other option is Cloning, user can simply clone the registered MAC
address with ISP. Now router keeps reporting old MAC address to ISP and there will be no

connection issue.

Format of MAC Address –

MAC Address is a 12-digit hexadecimal number (6-Byte binary number), which is


mostly represented by Colon-Hexadecimal notation. First 6-digits (say 00:40:96) of
MAC Address identifies the manufacturer, called as OUI (Organizational Unique
Identifier). IEEE Registration Authority Committee assign these MAC prefixes to its
registered vendors.
Here are some OUI of well known manufacturers :
CC:46:D6 - Cisco

3C:5A:B4 -
Google, Inc.
3C:D9:2B -
Hewlett
Packard

00:9A:CD - HUAWEI TECHNOLOGIES CO.,LTD

Types of MAC Address –

Unicast – A Unicast addressed frame is only sent out to the interface leading to specific NIC. If
the LSB (least significant bit) of first octet of an address is set to zero, the frame is meant to
reach only one receiving NIC. MAC Address of source machine is always Unicast.

23
CS8591_Computer Networks II

Multicast – Multicast address allow the source to send a frame to group of devices. In Layer-2
(Ethernet) Multicast address, LSB (least significant bit) of first octet of an address is set to one.
IEEE has allocated the address block 01-80-C2-xx-xx-xx (01-80- C2-00-00-00 to 01-80-C2-FF-
FF-FF) for group addresses for use by standard protocols.

Broadcast – Similar to Network Layer, Broadcast is also possible on underlying layer( Data
Link Layer).

Ethernet frames with ones in all bits of the destination address(FF-FF-FF-FF-FF-FF) are
referred as broadcast address. Frames which are destined with MAC address FF-FF-FF-FF-FF-
FF will reach to every computer belong to that LAN segment

24
CS8591_Computer Networks II

WIRED LAN ETHERNET

Local Area Network (LAN) is a data communication network connecting various terminals or
computers within a building or limited geographical area. The connection among the devices
could be wired or wireless. Ethernet, Token Ring and Wireless LAN using IEEE 802.11 are
examples of standard LAN technologies.
Ethernet :-

Ethernet is most widely used LAN Technology, which is defined under IEEE standards 802.3.
The reason behind its wide usability is Ethernet is easy to understand, implement, maintain
and allows low-cost network implementation. Also, Ethernet offers flexibility in terms of
topologies which are allowed. Ethernet operates in two layers of the OSI model, Physical Layer,
and Data Link Layer. For Ethernet, the protocol data unit is Frame since we mainly deal with
DLL. In order to handle collision, the Access control mechanism used in Ethernet is CSMA/CD.
Manchester Encoding Technique is used in Ethernet.

Ethernet LANs consist of network nodes and interconnecting


media or link. The network nodes can be of two types:
Data Terminal Equipment (DTE):- Generally, DTEs are the end devices that convert the user
information into signals or reconvert the received signals. DTEs devices are: personal

25
CS8591_Computer Networks II

computers, workstations, file servers or print servers also referred to as end stations. These
devices are either the source or the destination of data frames. The data terminal equipment
may be a single piece of equipment or multiple pieces of equipment that are interconnected and
perform all the required functions to allow the user to communicate. A user can interact to
DTE or DTE may be a user.
Data Communication Equipment (DCE):- DCEs are the intermediate network devices that
receive and forward frames across the network. They may be either standalone devices such as
repeaters, network switches, routers or maybe communications interface units such as
interface cards and modems. The DCE performs functions such as signal conversion, coding
and may be a part of the DTE or intermediate equipment.
Currently, these data rates are defined for operation over optical fibers and twisted-pair cables:

i) Fast Ethernet
Fast Ethernet refers to an Ethernet network that can transfer data at a rate of
100 Mbit/s.

ii) Gigabit Ethernet


Gigabit Ethernet delivers a data rate of 1,000 Mbit/s (1 Gbit/s).

iii) 10 Gigabit Ethernet


10 Gigabit Ethernet is the recent generation and delivers a data rate of 10 Gbit/s
(10,000 Mbit/s). It is generally used for backbones in high-end applications
requiring high data rates.
ALOHA

The Aloha protocol was designed as part of a project at the University of Hawaii. It provided
data transmission between computers on several of the Hawaiian Islands involving packet
radio networks. Aloha is a multiple access protocol at the data link layer and proposes how
multiple terminals access the medium without interference or collision.
There are two different versions of ALOHA:
8. Pure Aloha
Pure Aloha is an un-slotted, decentralized, and simple to implement a protocol. In pure
ALOHA, the stations simply transmit frames whenever they want data to send. It does not
check whether the channel is busy or not before transmitting. In case, two or more stations
transmit simultaneously, the collision occurs and frames are destroyed. Whenever any station
transmits a frame, it expects the acknowledgment from the receiver. If it is not received within
a specified time, the station assumes that the frame or acknowledgment has been destroyed.
Then, the station waits for a random amount of time and sends the frame again. This
randomness helps in avoiding more collisions. This scheme works well in small networks where
the load is not much. But in largely loaded networks, this scheme fails poorly. This led to the
development of Slotted Aloha.
To assure pure aloha: Its throughput and rate of transmission of the frame to be predicted. For
that to make some assumption:
i) All the frames should be the same length.
ii) Stations can not generate frame while transmitting or trying to transmit frame.
iii) The population of stations attempts to transmit (both new frames
and old frames that collided) according to a Poisson distribution.

26
CS8591_Computer Networks II

Vulnerable
Time = 2 * Tt
Efficiency of
Pure ALOHA:
Spure= G * e^-2G where G is number of stations wants to transmit in Tt slot.
Maximum Efficiency:
Maximum Efficiency will be obtained when G=1/2
(Spure)max = 1/2 * e^-1

= 0.184
Which means, in Pure ALOHA, only about 18.4% of the time is used for
successful transmissions.

Slotted Aloha
This is quite similar to Pure Aloha, differing only in the way transmissions take place. Instead
of transmitting right at demand time, the sender waits for some time. In slotted ALOHA, the
time of the shared channel is divided into discrete intervals called Slots. The stations are
eligible to send a frame only at the beginning of the slot and only one frame per slot is sent. If
any station is not able to place the frame onto the channel at the beginning of the slot, it has to
wait until the beginning of the next time slot. There is still a possibility of collision if two
stations try to send at the beginning of the same time slot. But still the number of collisions
that can possibly take place is reduced by a large margin and the performance becomes much
well compared to Pure Aloha.

Collision is possible for only the current slot. Therefore, Vulnerable Time is Tt. Efficiency of
Slotted ALOHA:
Sslotted = G * e^-G

Maximum Efficiency:

27
CS8591_Computer Networks II

(Sslotted)max = 1 * e^-1
= 1/e = 0.368
Maximum Efficiency, in Slotted ALOHA, is 36.8%.
Wireless LANs- Introduction
Wireless communication is one of the fastest-growing technologies. The demand for connecting
devices without the use of cables is increasing everywhere. Wireless LANs can be found on
college campuses, in office buildings, and in many public areas. Before we discuss a specific
protocol related to wireless LANs, let us talk about them in general.
Architectural Comparison

Let us first compare the architecture of wired and wireless LANs to give some idea of what we
need to look for when we study wireless LANs.
Medium

The first difference we can see between a wired and a wireless LAN is the medium. In a wired
LAN, we use wires to connect hosts. In Chapter 7, we saw that we moved from multiple access
to point-to-point access through the generation of the Ethernet. In a switched LAN, with a link-
layer switch, the communication between the hosts is point to- point and full-duplex
(bidirectional). In a wireless LAN, the medium is air, the signal is generally broadcast. When
hosts in a wireless LAN communicate with each other, they are sharing the same medium
(multiple access). In a very rare situation, we may be able to create a point-to-point
communication between two wireless hosts by using a very limited bandwidth and two-
directional antennas. Our discussion in this chapter, however, is about the multiple-access
medium, which means we need to use MAC protocols.
Hosts

In a wired LAN, a host is always connected to its network at a point with a fixed link layer
address related to its network interface card (NIC). Of course, a host can move from one point
in the Internet to another point. In this case, its link-layer address remains the same, but its
network-layer address will change (Mobile IP section). However, before the host can use the
services of the Internet, it needs to be physically connected to the Internet. In a wireless LAN, a
host is not physically connected to the network; it can move freely (as we’ll see) and can use
the services provided by the network.
Isolated LANs

The concept of a wired isolated LAN also differs from that of a wireless isolated LAN. A wired
isolated LAN is a set of hosts connected via a link-layer switch (in the recent generation of
Ethernet). A wireless isolated LAN, called an ad hoc network in wireless LAN terminology, is a
set of hosts that communicate freely with each other. The concept of a link-layer switch does
not exist in wireless LANs. Figure 15.1 shows two isolated LANs, one wired and one wireless.
Connection to Other Networks

A wired LAN can be connected to another network or an internetwork such as the Internet
using a router. A wireless LAN may be connected to a wired infrastructure network, to a
wireless infrastructure network, or to another wireless LAN. The first situation is the one that
we discuss in this section: connection of a wireless LAN to a wired infrastructure network.

28
CS8591_Computer Networks II

IEEE 802.11

IEEE has defined the specifications for a wireless LAN, called IEEE 802.11, which covers the
physical and data-link layers. It is sometimes called wireless Ethernet. In some countries,
including the United States, the public uses the term WiFi (short for wireless fidelity) as a
synonym for wireless LAN. WiFi, however, is a wireless LAN that is certified by the WiFi.
Alliance, a global, nonprofit industry association of more than 300 member companies devoted
to promoting the growth of wireless LANs.
Architecture

The standard defines two kinds of services: the basic service set (BSS) and the extended service
set (ESS).
Basic Service Set

IEEE 802.11 defines the basic service set (BSS) as the building blocks of a wireless LAN. A
basic service set is made of stationary or mobile wireless stations and an optional central base
station, known as the access point (AP). Figure 15.4 shows two sets in this standard.
The BSS without an AP is a stand-alone network and cannot send data to other BSSs. It is
called an ad hoc architecture. In this architecture, stations can form a network without the
need of an AP; they can locate one another and agree to be part of a BSS. A BSS with an AP is
sometimes referred to as an infrastructure BSS.

Extended Service Set

An extended service set (ESS) is made up of two or more BSSs with APs. In this case, the BSSs

29
CS8591_Computer Networks II

are connected through a distribution system, which is a wired or a wireless network. The
distribution system connects the APs in the BSSs. IEEE 802.11 does not restrict the
distribution system; it can be any IEEE LAN such as an Ethernet. Note that the extended
service set uses two types of stations: mobile and stationary. The mobile stations are normal
stations inside a BSS. The stationary stations are AP stations that are part of a wired LAN.
When BSSs are connected, the stations within reach of one another can communicate without
the use of an AP. However, communication between a station in a BSS and the outside BSS
occurs via the AP. The idea is similar to communication in a cellular network if we consider
each BSS to be a cell and each AP to be a base station.

Station Types

IEEE 802.11 defines three types of stations based on their mobility in a wireless LAN: no-
transition, BSS-transition, and ESS-transition mobility. A station with no-transition mobility
is either stationary (not moving) or moving only inside a BSS. A station with BSS-transition
mobility can move from one BSS to another, but the movement is confined inside one ESS. A
station with ESS-transition mobility can move from one ESS to another. However, IEEE
802.11 does not guarantee that communication is continuous during the move.
MAC Sublayer

IEEE 802.11 defines two MAC sublayers: the distributed coordination function (DCF) and point
coordination function (PCF). Figure shows the relationship between the two MAC sublayers, the
LLC sublayer, and the physical layer.
Distributed Coordination Function

One of the two protocols defined by IEEE at the MAC sublayer is called the distributed
coordination function (DCF). DCF uses CSMA/CA as the access method

Frame Exchange Time Line

Figure shows the exchange of data and control frames in time.


1. Before sending a frame, the source station senses the medium by checking the energy level
at the carrier frequency.
a. The channel uses a persistence strategy with backoff until the channel is idle.
After the station is found to be idle, the station waits for a period of time called the distributed
interframe space (DIFS); then the station sends a control frame called the request to send
(RTS).

30
CS8591_Computer Networks II

1. After receiving the RTS and waiting a period of time called the short interframe
space (SIFS), the destination station sends a control frame, called the clear to
send (CTS), to the source station. This control frame indicates that the
destination station is ready to receive data.
2. The source station sends data after waiting an amount of time equal to SIFS.
3. The destination station, after waiting an amount of time equal to SIFS, sends
an acknowledgment to show that the frame has been received. Acknowledgment
is needed in this protocol because the station does not have any means to check
for the successful arrival of its data at the destination. On the other hand, the
lack of collision in CSMA/CD is a kind of indication to the source that data have
arrived.

Network Allocation Vector

How do other stations defer sending their data if one station acquires access? In other words,
how is the collision avoidance aspect of this protocol accomplished? The key is a feature called
NAV.
When a station sends an RTS frame, it includes the duration of time that it needs to occupy the
channel. The stations that are affected by this transmission create a timer called a network
allocation vector (NAV) that shows how much time must pass before these stations are
allowed to check the channel for idleness. Each time a station accesses the system and sends
an RTS frame, other stations start their NAV. In other words, each station, before sensing the
physical medium to see if it is idle, first checks its NAV to see if it has expired. Collision
During Handshaking
What happens if there is a collision during the time when RTS or CTS control frames are in
transition, often called the handshaking period? Two or more stations may try to send RTS
frames at the same time. These control frames may collide. However, because there is no

31
CS8591_Computer Networks II

mechanism for collision detection, the sender assumes there has been a collision if it has not
received a CTS frame from the receiver. The backoff strategy is employed, and the sender tries
again.
Hidden-Station Problem

The solution to the hidden station problem is the use of the handshake frames (RTS and CTS).
Figure also shows that the RTS message from B reaches A, but not C. However, because both B
and C are within the range of A, the CTS message, which contains the duration of data
ransmission from B to A, reaches C. Station C knows that some hidden station is using the
channel and refrains from transmitting until that duration is over.

9. Bluetooth
Bluetooth is a wireless LAN technology designed to connect devices of different functions such
as telephones, notebooks, computers (desktop and laptop), cameras, printers, and even coffee
makers when they are at a short distance from each other. A Bluetooth LAN is an ad hoc
network, which means that the network is formed spontaneously; the devices, sometimes
called gadgets, find each other and make a network called a piconet. A Bluetooth LAN can even
be connected to the Internet if one of the gadgets has this capability. A Bluetooth LAN, by
nature, cannot be large. If there are many gadgets that try to connect, there is chaos.
Bluetooth technology has several applications. Peripheral devices such as a wireless mouse or
keyboard can communicate with the computer through this technology. Monitoring devices can
communicate with sensor devices in a small health care center. Home security devices can use
this technology to connect different sensors to the main security controller. Conference
attendees can synchronize their laptop computers at a conference Bluetooth was originally
started as a project by the Ericsson Company. It is namedfor Harald Blaatand, the king of
Denmark (940-981) who united Denmark and Norway. Blaatand translates to Bluetooth in
English. Today, Bluetooth technology is the implementation of a protocol defined by the IEEE
802.15 standard. The standard defines a wireless personal-area network (PAN) operable in an
area the size of a room or a hall.
Architecture

Bluetooth defines two types of networks: piconet and scatternet.


Piconets

A Bluetooth network is called a piconet, or a small net. A piconet can have up to eight
stations, one of which is called the primary; the rest are called secondaries. All the secondary
stations synchronize their clocks and hopping sequence with the primary. Note that a piconet
can have only one primary station. The communication between the primary and secondary
stations can be one-to-one or one-to-many.
Although a piconet can have a maximum of seven secondaries, additional secondaries can be
in the parked state. A secondary in a parked state is synchronized with the primary, but
cannot take part in communication until it is moved from the parked state to the active state.
Because only eight stations can be active in a piconet, activating a station from the parked
state means that an active station must go to the
parked state.
Scatternet

Piconets can be combined to form what is called a scatternet. A secondary station in one
piconet can be the primary in another piconet. This station can receive messages from the
primary in the first piconet (as a secondary) and, acting as a primary, deliver them to

32
CS8591_Computer Networks II

secondaries in the second piconet. A station can be a member of two piconets.

Bluetooth Devices

A Bluetooth device has a built-in short-range radio transmitter. The current data rate is Mbps
with a 2.4-GHz bandwidth. This means that there is a possibility of interference between the
IEEE 802.11b wireless LANs and Bluetooth LANs.
Bluetooth Layers

Bluetooth uses several layers that do not exactly match those of the Internet model.

L2CAP

The Logical Link Control and Adaptation Protocol, or L2CAP (L2 here means LL), is roughly
equivalent to the LLC sublayer in LANs. It is used for data exchange on an The 16-bit length
field defines the size of the data, in bytes, coming from the upper layers. Data can be up to
65,535 bytes. The channel ID (CID) defines a unique identifier for the virtual channel created at
this level.

The L2CAP has specific duties: multiplexing, segmentation and


reassembly, quality of service (QoS), and group management.
Multiplexing

The L2CAP can do multiplexing. At the sender site, it accepts data from one of the upper-layer
protocols, frames them, and delivers them to the baseband layer. At the receiver site, it accepts
a frame from the baseband layer, extracts the data, and delivers them to the appropriate

33
CS8591_Computer Networks II

protocol layer.
Segmentation and Reassembly

The maximum size of the payload field in the baseband layer is 2774 bits, or 343 bytes. This
includes 4 bytes to define the packet and packet length. Therefore, the size of the packet that
can arrive from an upper layer can only be 339 bytes. However, application layers sometimes
need to send a data packet that can be up to 65,535 bytes (an Internet packet, for example).
The L2CAP divides these large packets into segments and adds extra information to define the
location of the segments in the original packet. The L2CAP segments the packets at the source
and reassembles them at the destination.
QoS

Bluetooth allows the stations to define a quality-of-service level. For the moment, it is sufficient
to know that if no quality-of-service level is defined, Bluetooth defaults to what is called best-
effort service; it will do its best under the circumstances.

10. Connecting Devices (Hub, Repeater, Bridge, Switch, Router, Gateways and
Brouter)

1. Repeater – A repeater operates at the physical layer. Its job is to regenerate


the signal over the same network before the signal becomes too weak or
corrupted so as to extend the length to which the signal can be transmitted over
the same network. An important point to be noted about repeaters is that they do
not amplify the signal. When the signal becomes weak, they copy the signal bit by
bit and regenerate it at the original strength. It is a 2 port device.
Hub – A hub is basically a multiport repeater. A hub connects multiple wires coming from
ifferent branches, for example, the connector in star topology which connects different stations.
Hubs cannot filter data, so data packets are sent to all connected devices. In other words,
collision domain of all hosts connected through Hub remains one. Also, they do not have
intelligence to find out best path for data packets which leads to inefficiencies and wastage.

Types of Hub

Active Hub :- These are the hubs which have their own power supply and
can clean , boost and relay the signal along the network. It serves both as
a repeater as well as wiring center. These are used to extend maximum
distance between nodes.
Passive Hub :- These are the hubs which collect wiring from nodes and
power supply from active hub. These hubs relay signals onto the network
without cleaning and boosting them and can’t be used to extend distance
between nodes.
2. Bridge – A bridge operates at data link layer. A bridge is a repeater, with add
on functionality of filtering content by reading the MAC addresses of source and
destination. It is also used for interconnecting two LANs working on the same
protocol. It has a single input and single output port, thus making it a 2 port
device.
Types of Bridges

Transparent Bridges :- These are the bridge in which the stations are completely naware of
the bridge’s existence i.e. whether or not a bridge is added or deleted from the network ,
reconfiguration of the stations is unnecessary. These bridges makes use of two processes i.e.
bridge forwarding and bridge learning.
Source Routing Bridges :- In these bridges, routing operation is performed by source station
and the frame specifies which route to follow. The hot can discover frame by sending a specical
frame called discovery frame, which spreads through the entire network using all possible

34
CS8591_Computer Networks II

paths to destination.
Switch – A switch is a multi port bridge with a buffer and a design that can boost its
efficiency(large number of ports imply less traffic) and performance. Switch is data link layer
device. Switch can perform error checking before forwarding data, that makes it very efficient
as it does not forward packets that have errors and forward good packets selectively to correct
port only. In other words, switch divides collision domain of hosts, but broadcast domain
remains same.
Routers – A router is a device like a switch that routes data packets based on their IP
addresses. Router is mainly a Network Layer device. Routers normally connect LANs and WANs
together and have a dynamically updating routing table based on which they make decisions
on routing the data packets. Router divide broadcast domains of hosts connected through it.

Gateway – A gateway, as the name suggests, is a passage to connect two networks together
that may work upon different networking models. They basically works as the messenger
agents that take data from one system, interpret it, and transfer it to another system.
Gateways are also called protocol converters and can operate at any network layer. Gateways
are generally more complex than switch or router.
Brouter – It is also known as bridging router is a device which combines features of both
bridge and router. It can work either at data link layer or at network layer. Working as router,
it is capable of routing packets across networks and working as bridge, it is capable of filtering
local area network traffic.

---------------------------------------------------END-----------------------------------------------------------

35

You might also like