CN Unit 2 Notes
CN Unit 2 Notes
CN Unit 2 Notes
1. INTRODUCTION
In the OSI model, the data link layer is the 2nd layer from the bottom.
It is responsible for transmitting frames from one node to next node.
The main responsibility of the Data Link Layer is to transfer the datagram
across an individual link.
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.
The other responsibilities of this layer are
o Framing - Divides the stream of bits received into data units called
frames.
o Physical addressing – If frames are to be distributed to different
systems on the same network, data link layer adds a header to the
frame to define the sender and receiver.
o Flow control- If the rate at which the data are absorbed by the
receiver is less than the rate produced in the sender ,the Data link
layer imposes a flow control mechanism.
o Error control- Used for detecting and retransmitting damaged or
lost frames and to prevent duplication of frames. This is achieved
through a trailer added at the end of the frame.
o Medium Access control - Used to determine which device has
control over the link at any given time.
1
CS 8591 - Computer Networks Unit- II
The first node is the source host; the last node is the destination host.
The other four nodes are four routers.
The first, the third, and the fifth links represent the three LANs; the second
and the fourth links represent the two WANs.
Two Categories of Links
Point- to-Point link and Broadcast link.
In a point-to-point link, the link is dedicated to the two devices
In a broadcast link, the link is shared between several pairs of devices.
2
CS 8591 - Computer Networks Unit- II
2. LINK-LAYER ADDRESSING
A link-layer address is sometimes called a link address, sometimes a
physical address, and sometimes a MAC address.
Since a link is controlled at the data-link layer, the addresses need to belong
to the data-link layer.
When a datagram passes from the network layer to the data-link layer, the
datagram will be encapsulated in a frame and two data-link addresses are
added to the frame header.
These two addresses are changed every time the frame moves from one link
to another.
3
CS 8591 - Computer Networks Unit- II
Unicast Address :
Each host or each interface of a router is assigned a unicast address.
Unicasting means one-to-one communication. A frame with a unicast
address destination is destined only for one entity in the link.
Multicast Address :
Link-layer protocols define multicast addresses. Multicasting means one-to-
many Communication but not all.
Broadcast Address :
Link-layer protocols define a broadcast address. Broadcasting means one-
to-all communication. A frame with a destination broadcast address is sent
to all entities in the link.
4
CS 8591 - Computer Networks Unit- II
ARP Operation
o ARP maintains a cache table in which MAC addresses are mapped to IP
addresses.
o If a host wants to send an IP datagram to a host,it first checks for a mapping
in the cache table.
o If no mapping is found, it needs to invoke the Address Resolution Protocol
over the network.
o It does this by broadcasting an ARP query onto the network.
o This query contains the target IP address.
o Each host receives the query and checks to see if it matches its IP address.
o If it does match, the host sends a response message that contains its link-
layer address (MAC Address) back to the originator of the query.
o The originator adds the information contained in this response to its ARP
table.
o For example,
To determine system B’s physical (MAC) address, system A broadcasts
an ARP request containing B’s IP address to all machines on its
network.
o All nodes except the destination discard the packet but update their ARP
table.
o Destination host (System B)constructs an ARP Response packet
o ARP Response is unicast and sent back to the source host (System A).
o Source stores target Logical & Physical address pair in its ARP table from
ARP Response.
o If target node does not exist on same network, ARP request is sent to
default router.
5
CS 8591 - Computer Networks Unit- II
ARP Packet
Hardware Type – Defines the hardware type that the network needs to transmit
the ARP message.
Protocol Type - Defines the protocol type that the network needs to transmit the
ARP message.
Hardware Length – Specifies the length of the physical address.(48 bits =6 bytes)
Protocol Length - Specifies the length of the logical address.(32 bits =4 bytes)
Operation – Determines the type of ARP message (1-Request ; 2-Reply)
Source Hardware Address – Specifies the physical address of the sender.
Source Protocol Address - Specifies the logical address of the sender.
Destination Hardware Address – Specifies the physical address of the receiver.
Destination Protocol Address - Specifies the logical address of the receiver.
3. DLC SERVICES
The data link control (DLC) deals with procedures for communication
between two adjacent nodes—node-to-node communication—no matter
whether the link is dedicated or broadcast.
1. FRAMING
6
CS 8591 - Computer Networks Unit- II
The data-link layer packs the bits of a message into frames, so that each
frame is distinguishable from another.
Although the whole message could be packed in one frame, that is not
normally done.
One reason is that a frame can be very large, making flow and error control
very inefficient.
When a message is carried in one very large frame, even a single-bit error
would require the retransmission of the whole frame.
When a message is divided into smaller frames, a single-bit error affects
only that small frame.
Framing in the data-link layer separates a message from one source to a
destination by adding a sender address and a destination address.
The destination address defines where the packet is to go; the sender
address helps the recipient acknowledge the receipt.
Frame Size
Frames can be of fixed or variable size.
Frames of fixed size are called cells. In fixed-size framing, there is no need
for defining the boundaries of the frames; the size itself can be used as a
delimiter.
In variable-size framing, we need a way to define the end of one frame and
the beginning of the next. Two approaches were used for this purpose: a
character-oriented approach and a bit-oriented approach.
Character-Oriented Framing
In character-oriented (or byte-oriented) framing, data to be carried are 8-bit
characters.
To separate one frame from the next, an 8-bit (1-byte) flag is added at the
beginning and the end of a frame.
The flag, composed of protocol-dependent special characters, signals the
start or end of a frame.
Any character used for the flag could also be part of the information.
7
CS 8591 - Computer Networks Unit- II
If this happens, when it encounters this pattern in the middle of the data,the
receiver thinks it has reached the end of the frame.
To fix this problem, a byte-stuffing strategy was added to character-
oriented framing.
Bit-Oriented Framing
In bit-oriented framing, the data section of a frame is a sequence of bits to
be interpreted by the upper layer as text, graphic, audio, video, and so on.
In addition to headers and trailers), we still need a delimiter to separate one
frame from the other.
Most protocols use a special 8-bit pattern flag, 01111110, as the delimiter to
define the beginning and the end of the frame
If the flag pattern appears in the data, the receiver must be informed that
this is not the end of the frame.
This is done by stuffing 1 single bit (instead of 1 byte) to prevent the pattern
from looking like a flag. The strategy is called bit stuffing.
8
CS 8591 - Computer Networks Unit- II
Bit Stuffing
Bit stuffing is the process of adding one extra 0 whenever five
consecutive 1s follow a 0 in the data, so that the receiver does not
mistake the pattern 0111110 for a flag.
In bit stuffing, if a 0 and five consecutive 1 bits are encountered, an extra 0
is added.
This extra stuffed bit is eventually removed from the data by the receiver.
The extra bit is added after one 0 followed by five 1’s regardless of the
value of the next bit.
This guarantees that the flag field sequence does not inadvertently appear in
the frame.
2. FLOW CONTROL
o Flow control refers to a set of procedures used to restrict the amount
of data that the sender can send before waiting for acknowledgment.
o The receiving device has limited speed and limited memory to store the
data.
o 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.
9
CS 8591 - Computer Networks Unit- II
o 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.
o The acknowledgement may not arrive because of the following three
scenarios :
1. Original frame is lost
2. ACK is lost
3. ACK arrives after the timeout
Advantage of Stop-and-wait
o The Stop-and-wait method is simple as each frame is checked and
acknowledged before the next frame is sent.
10
CS 8591 - Computer Networks Unit- II
Disadvantages of Stop-And-Wait
o In stop-and-wait, at any point in time, there is only one frame that is sent
and waiting to be acknowledged.
o This is not a good use of transmission medium.
o To improve efficiency, multiple frames should be in transition while
waiting for ACK.
PIGGYBACKING
11
CS 8591 - Computer Networks Unit- II
o At the beginning of a transmission, the o At the beginning of transmission, the
sender window contains n-1 frames. receiver window does not contain n frames,
o When a frame is sent, the size of the but it contains n-1 spaces for frames.
window shrinks. o When the new frame arrives, the size of the
o For example, if the size of the window window shrinks.
is ‘w’ and if three frames are sent out, o For example, the size of the window is w
then the number of frames left out in and if three frames are received then the
the sender window is w-3. number of spaces available in the window
o Once the ACK has arrived, then the is (w-3).
sender window expands to the number o Once the acknowledgement is sent, the
which will be equal to the number of receiver window expands by the number
frames acknowledged by ACK. equal to the number of frames
acknowledged.
12
CS 8591 - Computer Networks Unit- II
3. ERROR CONTROL
BURST ERROR
The term Burst Error means that two or more bits in the data unit have changed
from 1 to 0 or from 0 to 1.
PARITY CHECK
One bit, called parity bit is added to every data unit so that the total number
of 1’s in the data unit becomes even (or) odd.
The source then transmits this data via a link, and bits are checked and
verified at the destination.
Data is considered accurate if the number of bits (even or odd) matches the
number transmitted from the source.
This techniques is the most common and least complex method.
13
CS 8591 - Computer Networks Unit- II
Steps Involved :
Sender Side:
Consider the original message (dataword) as M(x) consisting of ‘k’ bits and
the divisor as C(x) consists of ‘n+1’ bits.
The original message M(x) is appended by ‘n’ bits of zero’s. Let us call
this zero-extended message as T(x).
Divide T(x) by C(x) and find the remainder.
The division operation is performed using XOR operation.
The remainder is appended to the original message M(x) as CRC and sent
by the sender(codeword).
Receiver Side:
The division operation is performed using XOR operation with the
received Codeword.
If the remainder is all Zero’s, then the dataword is received correctly
without any errors. The message is accepted.
If the remainder is not all Zero’s, then the dataword is received incorrectly
with errors. The message is rejected and discarded.
Example 1:
Consider the Dataword / Message M(x) = 1001
Divisor C(x) = 1011 (n+1=4)
Appending ‘n’ zeros to the original Message M(x).
The resultant messages is called T(x) = 1001 000. (here n=3)
14
CS 8591 - Computer Networks Unit- II
Sender Side :
Receiver Side:
(For Both Case – Without Error and With Error)
15
CS 8591 - Computer Networks Unit- II
Polynomials
A pattern of 0s and 1s can be represented as a polynomial with coefficients
of 0 and 1.
The power of each term shows the position of the bit; the coefficient shows
the value of the bit.
INTERNET CHECKSUM
16
CS 8591 - Computer Networks Unit- II
ERROR CONTROL
17
CS 8591 - Computer Networks Unit- 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.
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 cannot be acknowledged either positively or negatively. The sender
waits for acknowledgement until the timer goes off. If the timer goes off, it
retransmits the last transmitted frame.
18
CS 8591 - Computer Networks Unit- II
1.GO-BACK-N ARQ
o 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.
o In the above figure, three frames (Data 0,1,2) have been transmitted before
an error discovered in the third frame.
o The receiver discovers the error in Data 2 frame, so it returns the NAK 2
frame.
o All the frames including the damaged frame (Data 2,3,4) are discarded as it
is transmitted after the damaged frame.
o Therefore, the sender retransmits the frames (Data2,3,4).
2.SELECTIVE-REJECT(REPEAT) ARQ
19
CS 8591 - Computer Networks Unit- II
o In the above figure, three frames (Data 0,1,2) have been transmitted before
an error discovered in the third frame.
o The receiver discovers the error in Data 2 frame, so it returns the NAK 2
frame.
o The damaged frame only (Data 2) is discarded.
o The other subsequent frames (Data 3,4) are accepted.
o Therefore, the sender retransmits only the damaged frame (Data2).
Four protocols have been defined for the data-link layer controls.
They are
1. Simple Protocol
2. Stop-and-Wait Protocol
3. Go-Back-N Protocol
4. Selective-Repeat Protocol
1.SIMPLE PROTOCOL
o The first protocol is a simple protocol with neither flow nor error control.
o We assume that the receiver can immediately handle any frame it receives.
o In other words, the receiver can never be overwhelmed with incoming
frames.
o The data-link layers of the sender and receiver provide transmission
services for their network layers.
20
CS 8591 - Computer Networks Unit- II
o The data-link layer at the sender gets a packet from its network layer, makes
a frame out of it, and sends the frame.
o The data-link layer at the receiver receives a frame from the link, extracts
the packet from the frame, and delivers the packet to its network layer.
NOTE :
2. STOP-AND-WAIT PROTOCOL
REFER STOP AND WAIT FROM FLOW CONTROL
3. GO-BACK-N PROTOCOL
REFER GO-BACK-N ARQ FROM ERROR CONTROL
4. SELECTIVE-REPEAT PROTOCOL
REFER SELECTIVE-REPEAT ARQ FROM ERROR CONTROL
21
CS 8591 - Computer Networks Unit- II
HDLC FRAMES
HDLC defines three types of frames:
1. Information frames (I-frames) - used to carry user data
2. Supervisory frames (S-frames) - used to carry control information
3. Unnumbered frames (U-frames) – reserved for system management
Each type of frame serves as an envelope for the transmission of a different type of
message.
Each frame in HDLC may contain up to six fields:
1. Beginning flag field
2. Address field
3. Control field
4. Information field (User Information/ Management Information)
5. Frame check sequence (FCS) field
6. Ending flag field
In multiple-frame transmissions, the ending flag of one frame can serve as the
beginning flag of the next frame.
22
CS 8591 - Computer Networks Unit- II
o The first bit defines the type. If the first bit of the control field is 0, this
means the frame is an I-frame.
o The next 3 bits, called N(S), define the sequence number of the frame.
o The last 3 bits, called N(R), correspond to the acknowledgment number
when piggybacking is used.
o The single bit between N(S) and N(R) is called the P/F bit. If this bit is 1 it
means poll (the frame is sent by a primary station to a secondary).
23
CS 8591 - Computer Networks Unit- II
o If the first 2 bits of the control field are 10, this means the frame is an S-
frame.
o The last 3 bits, called N(R),correspond to the acknowledgment number
(ACK) or negative acknowledgment number (NAK), depending on the type
of S-frame.
o The 2 bits called code are used to define the type of S-frame itself.
o With 2 bits, we can have four types of S-frames –
Receive ready (RR), Receive not ready (RNR), Reject (REJ) and
Selective reject (SREJ).
o If the first 2 bits of the control field are 11, this means the frame is an U-
frame.
o U-frame codes are divided into two sections: a 2-bit prefix before the P/F
bit and a 3-bit suffix after the P/F bit.
o Together, these two segments (5 bits) can be used to create up to 32
different types of U-frames.
24
CS 8591 - Computer Networks Unit- II
PPP Frame
PPP is a byte - oriented protocol where each field of the frame is composed of one
or more bytes.
1. Flag − 1 byte that marks the beginning and the end of the frame. The bit
pattern of the flag is 01111110.
2. Address − 1 byte which is set to 11111111 in case of broadcast.
3. Control − 1 byte set to a constant value of 11000000.
4. Protocol − 1 or 2 bytes that define the type of data contained in the payload
field.
5. Payload − This carries the data from the network layer. The maximum
length of the payload field is 1500 bytes.
6. FCS − It is a 2 byte(16-bit) or 4 bytes(32-bit) frame check sequence for
error detection. The standard code used is CRC.
25
CS 8591 - Computer Networks Unit- II
Dead: In dead phase the link is not used. There is no active carrier and the
line is quiet.
Establish: Connection goes into this phase when one of the nodes start
communication. In this phase, two parties negotiate the options. If
negotiation is successful, the system goes into authentication phase or
directly to networking phase.
Authenticate: This phase is optional. The two nodes may decide whether
they need this phase during the establishment phase. If they decide to
proceed with authentication, they send several authentication packets. If the
result is successful, the connection goes to the networking phase; otherwise,
it goes to the termination phase.
Network: In network phase, negotiation for the network layer protocols
takes place.PPP specifies that two nodes establish a network layer
agreement before data at the network layer can be exchanged. This is
because PPP supports several protocols at network layer. If a node is
running multiple protocols simultaneously at the network layer, the
receiving node needs to know which protocol will receive the data.
Open: In this phase, data transfer takes place. The connection remains in
this phase until one of the endpoints wants to end the connection.
Terminate: In this phase connection is terminated.
26
CS 8591 - Computer Networks Unit- II
Components/Protocols of PPP
Three sets of components/protocols are defined to make PPP powerful:
Link Control Protocol (LCP)
Authentication Protocols (AP)
Network Control Protocols (NCP)
PAP
The Password Authentication Protocol (PAP) is a simple authentication procedure
with a two-step process:
a. The user who wants to access a system sends an authentication
identification (usually the user name) and a password.
b. The system checks the validity of the identification and password and
either accepts or denies connection.
CHAP
The Challenge Handshake Authentication Protocol (CHAP) is a three-way
handshaking authentication protocol that provides greater security than PAP. In
this method, the password is kept secret; it is never sent online.
a. The system sends the user a challenge packet containing a challenge
value.
b. The user applies a predefined function that takes the challenge value and
the user’s own password and creates a result. The user sends the result in
the response packet to the system.
c. The system does the same. It applies the same function to the password of
the user (known to the system) and the challenge value to create a result.
If the result created is the same as the result sent in the response packet,
access is granted; otherwise, it is denied.
CHAP is more secure than PAP, especially if the system continuously changes the
challenge value. Even if the intruder learns the challenge value and the result, the
password is still secret.
27
CS 8591 - Computer Networks Unit- II
has defined a specific Network Control Protocol for each network protocol. 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.
Goals of MAC
1. Fairness in sharing
2. Efficient sharing of bandwidth
3. Need to avoid packet collisions at the receiver due to interference
MAC Management
Medium allocation (collision avoidance)
Contention resolution (collision handling)
28
CS 8591 - Computer Networks Unit- II
MAC Types
Round-Robin : – Each station is given opportunity to transmit in turns.
Either a central controller polls a station to permit to go, or stations can
coordinate among themselves.
Reservation : - Station wishing to transmit makes reservations for time
slots in advance. (Centralized or distributed).
Contention (Random Access) : - No control on who tries; If collision‖
occurs, retransmission takes place.
MECHANISMS USED
Wired Networks :
o CSMA / CD – Carrier Sense Multiple Access / Collision Detection
Wireless Networks :
o CSMA / CA – Carrier Sense Multiple Access / Collision Avoidance
Carrier Sense in CSMA/CD means that all the nodes sense the medium to
check whether it is idle or busy.
If the carrier sensed is idle, then the node transmits the entire
frame.
If the carrier sensed is busy, the transmission is postponed.
Collision Detect means that a node listens as it transmits and can therefore
detect when a frame it is transmitting has collided with a frame transmitted
by another node.
29
CS 8591 - Computer Networks Unit- II
Non-Persistent Strategy
In the non-persistent method, a station that has a frame to send senses the
line.
If the line is idle, it sends immediately.
If the line is not idle, it waits a random amount of time and then senses the
line again.
Persistent Strategy
1-Persistent :
The 1-persistent method is simple and straightforward.
In this method, after the station finds the line idle, it sends its frame
immediately (with probability 1).
This method has the highest chance of collision because two or more
stations may find the line idle and send their frames immediately.
30
CS 8591 - Computer Networks Unit- II
P-Persistent :
In this method, after the station finds the line idle it follows these steps:
With probability p, the station sends its frame.
With probability q = 1 − p, the station waits for the beginning of the next
time slot and checks the line again.
The p-persistent method is used if the channel has time slots with a slot
duration equal to or greater than the maximum propagation time.
The p-persistent approach combines the advantages of the other two
strategies. It reduces the chance of collision and improves efficiency.
.
EXPONENTIAL BACK-OFF
Once an adaptor has detected a collision and stopped its transmission, it waits
a certain amount of time and tries again.
Each time it tries to transmit but fails, the adaptor doubles the amount of time
it waits before trying again.
This strategy of doubling the delay interval between each retransmission
attempt is a general technique known as exponential back-off.
31
CS 8591 - Computer Networks Unit- II
EVOLUTION OF ETHERNET
32
CS 8591 - Computer Networks Unit- II
33
CS 8591 - Computer Networks Unit- II
34
CS 8591 - Computer Networks Unit- II
The 64-bit preamble allows the receiver to synchronize with the signal; it is
a sequence of alternating 0’s and 1’s.
Both the source and destination hosts are identified with a 48-bit address.
The packet type field serves as the demultiplexing key.
Each frame contains up to 1500 bytes of data(Body).
CRC is used for Error detection
Ethernet Addresses
Every Ethernet host has a unique Ethernet address (48 bits – 6 bytes).
Ethernet address is represented by sequence of six numbers separated by
colons.
Each number corresponds to 1 byte of the 6 byte address and is given by
pair of hexadecimal digits.
Eg: 8:0:2b:e4:b1:2 is the representation of
00001000 00000000 00101011 11100100 10110001 00000010
Each frame transmitted on an Ethernet is received by every adaptor
connected to the Ethernet.
In addition to unicast addresses an Ethernet address consisting of all 1s is
treated as broadcast address.
Similarly the address that has the first bit set to 1 but it is not the broadcast
address is called multicast address.
35
CS 8591 - Computer Networks Unit- II
ADVANTAGES OF ETHERNET
Ethernets are successful because
It is extremely easy to administer and maintain. There are no switches that
can fail, no routing or configuration tables that have to be kept up-to-date,
and it is easy to add a new host to the network.
It is inexpensive: Cable is cheap, and the only other cost is the network
adaptor on each host.
1. Flexibility: Within radio coverage, nodes can access each other as radio
waves can penetrate even partition walls.
2. Planning : No prior planning is required for connectivity as long as
devices follow standard convention
3. Design : Allows to design and develop mobile devices.
4. Robustness : Wireless network can survive disaster. If the devices survive,
communication can still be established.
36
CS 8591 - Computer Networks Unit- II
37
CS 8591 - Computer Networks Unit- II
An infrastructure network is the An adhoc network is the architecture
network architecture for providing that is used to support mutual
communication between wireless communication between wireless
clients and wired network resources. clients.
The transition of data from the Typically, an ad- hoc network is
wireless to wired medium occurs via created spontaneously and does not
a Base Station called AP(Access support access to wired networks.
Point). An adhoc network does not require
An AP and its associated wireless an AP.
clients define the coverage area.
38
CS 8591 - Computer Networks Unit- II
Station Types
IEEE 802.11 defines three types of stations based on their mobility in a wireless
LAN:
1. No-transition - A station with no-transition mobility is either stationary
(not moving) or moving only inside a BSS.
2. BSS-transition - A station with BSS-transition mobility can move from
one BSS to another, but the movement is confined inside one ESS
ESS-transition - A station with ESS-transition mobility can move from one
ESS to another.
39
CS 8591 - Computer Networks Unit- II
Wireless protocol would follow exactly the same algorithm as the Ethernet—Wait
until the link becomes idle before transmitting and back off should a collision
occur.
Each of the four nodes is able to send and receive signals that reach just the
nodes to its immediate left and right.
For example, B can exchange frames with A and C but it cannot reach D,
while C can reach B and D but not A.
Suppose B is sending to A. Node C is aware of this communication because
it hears B’s transmission.
40
CS 8591 - Computer Networks Unit- II
41
CS 8591 - Computer Networks Unit- II
802.11 do not support collision detection, but instead, the senders realize the
collision has happened when they do not receive the CTS frame after a period
of time.
Each node waits for a random amount of time before trying again.
The amount of time a given node delays is defined by exponential back-off
algorithm.
Two nodes can communicate directly with each other if they are within
reach of each other,
When the nodes are at different range, for example when node A wish to
communicate with node E, A first sends a frame to its access point (AP-1),
which forwards the frame across the distribution system to AP-3, which
finally transmits the frame to E.
42
CS 8591 - Computer Networks Unit- II
Passive Scanning
AP’s periodically send a Beacon frame to the nodes that advertises the
capabilities of the access point which includes the transmission rates supported by
the AP. This is called passive scanning and a node can change to this AP based on
the Beacon frame simply by sending it an Association Request frame back to the
access point.
FRAME FORMAT OF WLAN / 802.11
When both the DS bits are set to 1, it indicates that one node is
sending the message to another indirectly using the distribution
system.
43
CS 8591 - Computer Networks Unit- II
Duration - contains the duration of time the medium is occupied by the nodes.
Addr l - identifies the final original destination
Addr 2 - identifies the immediate sender (the one that forwarded the frame
from the distribution system to the ultimate destination)
Addr 3 - identifies the intermediate destination (the one that accepted the
frame from a wireless node and forwarded it across the distribution
system)
Addr 4 - identifies the original source
Sequence Control - to avoid duplication of frames sequence number is
assigned to each frame
Payload - Data from sender to receiver
CRC - used for Error detection of the frame.
__________________________________________________________________
BLUETOOTH ARCHITECTURE
Bluetooth defines two types of networks: Piconet and Scatternet.
44
CS 8591 - Computer Networks Unit- II
PICONET
The basic Bluetooth network configuration is called a Piconet
A Piconet is a collection of eight bluetooth devices which are synchronized.
One device in the piconet can act as Primary (Master), all other devices
connected to the master act as Secondary (Slaves).
All the secondary stations synchronize their clocks and hopping sequence
with the primary.
45
CS 8591 - Computer Networks Unit- II
If a parked device wants to communicate and there are already seven active
slaves, one slave has to switch to park state to allow the parked device to
switch to active state.
SCATTERNET
Piconets can be combined to form what is called a scatternet.
Many piconets with overlapping coverage can exist simultaneously,called
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 secondaries in the second
piconet.
A station can be a member of two piconets.
In the example given below, there are two piconets, in which one slave
participates in two different piconets.
Master of one piconet cannot act as the master of another piconet.
But the Master of one piconet can act as a Slave in another piconet
BLUETOOTH LAYERS
46
CS 8591 - Computer Networks Unit- II
Radio Layer
The radio layer is roughly equivalent to the physical layer of the Internet
model.
Bluetooth uses the frequency-hopping spread spectrum (FHSS) method
in the physical layer to avoid interference from other devices or other
networks.
Bluetooth hops 1600 times per second, which means that each device
changes its modulation frequency 1600 times per second.
To transform bits to a signal, Bluetooth uses a sophisticated version of FSK,
called GFSK.
Baseband Layer
The baseband layer is roughly equivalent to the MAC sublayer in LANs.
The access method is TDMA.
The primary and secondary stations communicate with each other using
time slots. The length of a time slot is exactly 625 µs.
During that time, a primary sends a frame to a secondary, or a secondary
sends a frame to the primary.
L2CAP
The Logical Link Control and Adaptation Protocol, or L2CAP (L2 here
means LL) is equivalent to the LLC sublayer in LANs.
It is used for data exchange on an ACL link.
SCO channels do not use L2CAP.
The L2CAP functions are : multiplexing, segmentation and reassembly,
quality of service (QoS), and group management.
47
CS 8591 - Computer Networks Unit- II
Connecting devices are divided into five different categories on the basis of
layers in which they operate in the network.
1. HUBS
Several networks need a central location to connect media segments
together. These central locations are called as hubs.
The hub organizes the cables and transmits incoming signals to the other
media segments.
48
CS 8591 - Computer Networks Unit- II
2. REPEATERS
A repeater receives the signal and it regenerates the signal in original bit
pattern before the signal gets too weak or corrupted.
It is used to extend the physical distance of LAN.
Repeater works on physical layer.
A repeater has no filtering capability.
A repeater is implemented in computer networks to expand the coverage
area of the network, repropagate a weak or broken signal and or service
remote nodes.
Repeaters amplify the received/input signal to a higher frequency domain
so that it is reusable, scalable and available.
Repeaters are also known as signal boosters or range extender.
A repeater cannot connect two LANs, but it connects two segments of the
same LAN.
49
CS 8591 - Computer Networks Unit- II
3.BRIDGES
Types of Bridges :
Transparent Bridges
These are the bridge in which the stations are completely unaware 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.
Translation Bridges
These bridges connect networks with different architectures, such as Ethernet
and Token Ring. These bridges appear as:
– Transparent bridges to an Ethernet host
– Source-routing bridges to a Token Ring host
50
CS 8591 - Computer Networks Unit- II
4. SWITCH
A switch is a small hardware device which is used to join multiple
computers together with one local area network (LAN).
A switch is a mechanism that allows us to interconnect links to form a large
network.
Input ports receive stream of packets, analyzes the header, determines the
output port and passes the packet onto the fabric.
Ports contain buffers to hold packets before it is forwarded.
If buffer space is unavailable, then packets are dropped.
If packets at several input ports queue for a single output port, then only one
of them is forwarded.
51
CS 8591 - Computer Networks Unit- II
Types of Switch
i) Two- Layer Switch
The two-layer switch performs at the physical and the data link layer.
It is a bridge with many ports and design allows faster performs.
A bridge is used to connect different LANs together.
The two- layer switch can make a filtering decision bases on the MAC
address of the received frame. However, two- layer switch has a buffer
which holds the frame for processing.
5.ROUTERS
A router is a three-layer device.
It operates in the physical, data-link, and network layers.
As a physical-layer device, it regenerates the signal it receives.
As a link-layer device, the router checks the physical addresses (source and
destination) contained in the packet.
As a network-layer device, a router checks the network-layer addresses.
A router is a device like a switch that routes data packets based on their IP
addresses.
A router can connect networks. A router connects the LANs and WANs on
the internet.
A router is an internetworking device.
It connects independent networks to form an internetwork.
The key function of the router is to determine the shortest path to the
destination.
Router has a routing table, which is used to make decision on selecting the
route.
The routing table is updated dynamically based on which they make
decisions on routing the data packets.
6.GATEWAY
52
CS 8591 - Computer Networks Unit- II
7.BROUTER
Brouter is a hybrid device. It combines the features of both bridge and
router.
Brouter is a combination of Bridge and Router.
Functions as a bridge for nonroutable protocols and a router for routable
protocols.
As a router, it is capable of routing packets across networks.
As a bridge, it is capable of filtering local area network traffic.
Provides the best attributes of both a bridge and a router
Operates at both the Data Link and Network layers and can replace separate
bridges and routers.
_________________________________________________________________
53