Data Link Layer and Media Access
Data Link Layer and Media Access
Data Link Layer and Media Access
INTRODUCTION
Nodes and Links
Communication at the data-link layer is node-to-node. A data unit from one point in the Internet needs to pass
through many networks (LANs and WANs) to reach another point. Theses LANs and WANs are connected by
routers. It is customary to refer to the two end hosts and the routers as nodes and the networks in between as links.
Framing
Definitely, the first service provided by the data-link layer is framing. The data-link layer at each node needs to
encapsulate the datagram (packet received from the network layer) in a frame before sending it to the next node.
The node also needs to decapsulate the datagram from the frame received on the logical channel.
Two Categories of Links
point-to-point link
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.
Two Sublayers
To better understand the functionality of and the services provided by the link layer, we can divide the data-link
layer into two sublayers: data link control (DLC) and media access control (MAC).
LINK-LAYER ADDRESSING
We need to remember that the IP addresses in a datagram should not be changed. If the destination IP address in a
datagram changes, the packet never reaches its destination; if the source IP address in a datagram changes, the
destination host or a router can never communicate with the source if a response needs to be sent back or an
error needs to be reported back to the source . we need another addressing mechanism in a connectionless
internetwork: the link-layer addresses of the two nodes. A link-layer address is sometimes called a link address,
sometimes a physical address, and sometimes a MAC address.
Anytime a host or a router needs to find the link-layer address of another host or router in its network, it sends an
ARP request packet. The packet includes the link-layer and IP addresses of the sender and the IP address of the
receiver. Because the sender does not know the link-layer address of the receiver, the query is broadcast over the
link using the link-layer broadcast address.
ARP OPERATION
RARP
RARP(Reverse ARP) allows a machine to use its physical address to determine its logical address
on the Internet. The RARP mechanism allows a computer to be identified as a target on the
network by broadcasting a RARP request. The servers receiving the message examine their table
and meet. Once the IP address obtained, the machine stores it in memory and no longer uses
RARP until it is reset.
Error Detection and Correction
Types of Errors
Whenever bits flow from one point to another, they are subject to unpredictable changes because of interference.
This interference can change the shape of the signal. The term single-bit error means that only 1 bit of a given data
unit (such as a byte, character, or packet) is changed from 1 to 0 or from 0 to 1. The term burst error means that 2 or
more bits in the data unit have changed from 1 to 0 or from 0 to 1.
BLOCK CODING
In block coding, we divide our message into blocks, each of k bits, called datawords. We add r redundant bits to
each block to make the length n = k + r. The resulting n-bit blocks are called codewords.The process of error
detection in block coding is given in the figure below
Let us assume that k = 2 and n = 3. Table below shows the list of datawords and codewords. Later,we will see how to derive a
codeword from a dataword.
Assume the sender encodes the dataword 01 as 011 and sends it to the receiver. Consider the following cases:
1. The receiver receives 011. It is a valid codeword. The receiver extracts the dataword 01 from it.
2. The codeword is corrupted during transmission, and 111 is received (the leftmost bit is corrupted).
This is not a valid codeword and is discarded.
3. The codeword is corrupted during transmission, and 000 is received (the right two bits are
corrupted). This is a valid codeword. The receiver incorrectly extracts the dataword 00. Two
corrupted bits have made the error undetectable.
Hamming Distance
The Hamming distance between two words (of the same size) is the number of differences between the
corresponding bits. We show the Hamming distance between two words x and y as d(x, y). Hamming distance is
important for error detection. The reason is that the Hamming distance between the received codeword and the sent
codeword is the number of bits that are corrupted during transmission. For example, if the codeword 00000 is sent
and 01101 is received, 3 bits are in error and the Hamming distance between the two is d(00000, 01101) = 3.
Let us find the Hamming distance between two pairs of words.
1. The Hamming distance d(000, 011) is 2 because (000 ⊕ 011) is 011 (two 1s).
2. The Hamming distance d(10101, 11110) is 3 because (10101 ⊕ 11110) is 01011 (three 1s).
Simple Parity check
Blocks of data from the source are subjected to a check bit or parity bit generator form, where a parity of :
1 is added to the block if it contains odd number of 1’s, and
0 is added if it contains even number of 1’s
This scheme makes the total number of 1’s even, that is why it is called even parity checking.
Character-oriented framing was popular when only text was exchanged by the data-link layers. The flag could be
selected to be any character not used for text communication. the receiver, when it encounters this pattern in the
middle of the data, thinks it has reached the end of the frame. To fix this problem, a byte-stuffing strategy was
added to character-oriented framing. In byte stuffing (or character stuffing), a special byte is added to the data
section of the frame when there is a character with the same pattern as the flag. The data section is stuffed with an
extra byte. This byte is usually called the escape character (ESC) and has a predefined bit pattern. Whenever the
receiver encounters the ESC character, it removes it from the data section and treats the next character as data, not as
a delimiting flag.The figure below shows byte stuffing and un stuffing.
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. However, in addition to headers (and possible 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
This flag can create the same type of problem we saw in the character-oriented protocols. That is, if the flag pattern
appears in the data, we need to somehow inform the receiver that this is not the end of the frame. We do this by
stuffing 1 single bit (instead of 1 byte) to prevent the pattern from looking like a flag. The strategy is called bit
stuffing. 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.
Flag field. This field contains synchronization pattern 01111110, which identifies both the beginning and the end of a
frame.
Address field. This field contains the address of the secondary station. If a primary station created the frame, it
contains a to address. If a secondary station creates the frame, it contains a from address. The address field can be
one byte or several bytes long, depending on the needs of the network.
Control field. The control field is one or two bytes used for flow and error control.
Information field. The information field contains the user’s data from the network layer or management
information. Its length can vary from one network to another.
FCS field. The frame check sequence (FCS) is the HDLC error detection field. It can contain either a 2- or 4-byte CRC.
The control field determines the type of frame and defines its functionality.
DATA-LINK LAYER PROTOCOLS
Traditionally four protocols have been defined for the data-link layer to deal with flow and error control: Simple,
Stop-and-Wait, Go-Back-N, and Selective-Repeat. Although the first two protocols still are used at the data-link
layer, the last two have disappeared.
Simple Protocol
Our first protocol is a simple protocol with neither flow nor error control. We assume that the receiver can
immediately handle any frame it receives. In other words, the receiver can never be overwhelmed with incoming
frames.
Stop-and-Wait Protocol
Our second protocol is called the Stop-and-Wait protocol, which uses both flow and error control. The sender sends
one packet at a time and waits for an acknowledgment before sending the next one. To detect corrupted packets, we
need to add a checksum to each data packet. When a packet arrives at the receiver site, it is checked. If its checksum
is incorrect, the packet is corrupted and silently discarded. The silence of the receiver is a signal for the sender that a
packet was either corrupted or lost. Every time the sender sends a packet, it starts a timer. If an acknowledgment
arrives before the timer expires, the timer is stopped and the sender sends the next packet (if it has one to send). If
the timer expires, the sender resends the previous packet, assuming that the packet was either lost or corrupted.
This means that the sender needs to keep a copy of the packet until its acknowledgment arrives. To prevent
duplicate packets, the protocol uses sequence numbers and acknowledgment numbers. A field is added to the
The pure ALOHA protocol relies on acknowledgments from the receiver. When a station sends a frame, it expects
the receiver to send an acknowledgment. If the acknowledgment does not arrive after a time-out period, the station
assumes that the frame (or the acknowledgment) has been destroyed and resends the frame.A collision involves two
or more stations. If all these stations try to resend their frames after the time-out, the frames will collide again. Pure
ALOHA dictates that when the time-out period passes, each station waits a random amount of time before
resending its frame. The randomness will help avoid more collisions. We call this time the backoff time T B.
Pure ALOHA has a second method to prevent congesting the channel with retransmitted frames. After a maximum
number of retransmission attempts Kmax, a station must give up and try later. The time-out period is equal to the
maximum possible round-trip propagation delay,which is twice the amount of time required to send a frame
between the two most widely separated stations (2 × Tp). The backoff time T B is a random value that normally
depends on K (the number of attempted unsuccessful transmissions). The formula for T B depends on the
implementation. One common formula is the binary exponential backoff. In this method, for each retransmission, a
multiplier R = 0 to 2K − 1 is randomly chosen and multiplied by Tp (maximum propagation time) or T fr (the average
time required to send out a frame) to find T B.
Vulnerable time
Let us find the vulnerable time, the length of time in which there is a possibility of collision. We assume that the
stations send fixed-length frames with each frame taking Tfr seconds to send.
Station B starts to send a frame at time t. Now imagine station A has started to send its frame after t − Tfr. This leads
to a collision between the frames from station B and station A. On the other hand, suppose that station C starts to
send a frame before time t + Tfr. Here, there is also a collision between frames from station B and station C. The
vulnerable time during which a collision may occur in pure ALOHA is 2 times the frame transmission time.
Pure ALOHA vulnerable time = 2 * Tfr
Throughput
Let us call G the average number of frames generated by the system during one frame transmission time. Then it can
be proven that the average number of successfully transmitted frames for pure ALOHA is S = G × e−2G. The
maximum throughput Smax is 0.184, for G = 1/2.
Slotted ALOHA
In slotted ALOHA we divide the time into slots of Tfr seconds and force the station to send only at the beginning of
the time slot.
Because a station is allowed to send only at the beginning of the synchronized time slot, if a station misses this
moment, it must wait until the beginning of the next time slot. This means that the station which started at the
beginning of this slot has already finished sending its frame.
CSMA
To minimize the chance of collision and, therefore, increase the performance, the CSMA method was developed. The
chance of collision can be reduced if a station senses the medium before trying to use it. Carrier sense multiple
access (CSMA) requires that each station first listen to the medium (or check the state of the medium) before
sending. In other words, CSMA is based on the principle “sense before transmit” or “listen before talk.” The
possibility of collision still exists because of propagation delay; when a station sends a frame, it still takes time
(although very short) for the first bit to reach every station and for every station to sense it. In other words, a station
may sense the medium and find it idle, only because the first bit sent by another station has not yet been received.
At time t1, station B senses the medium and finds it idle, so it sends a frame. At time t2 (t2 > t1), station C senses the
medium and finds it idle because, at this time, the first bits from station B have not reached station C. Station C also
sends a frame. The two signals collide and both frames are destroyed.
Vulnerable Time
The vulnerable time for CSMA is the propagation time Tp. This is the time needed for a signal to propagate from one
end of the medium to the other. When a station sends a frame and any other station tries to send a frame during this
time, a collision will result. But if the first bit of the frame reaches the end of the medium, every station will already
have heard the bit and will refrain from sending.
Persistence Methods
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.
Nonpersistent
In the nonpersistent 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. The nonpersistent approach
reduces the chance of collision because it is unlikely that two or more stations will wait the same amount of time
and retry to send simultaneously.
p-Persistent
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. In this method, after the station finds the line idle it follows
these steps:
1. With probability p, the station sends its frame.
2. With probability q = 1 − p, the station waits for the beginning of the next time slot
and checks the line again.
a. If the line is idle, it goes to step 1.
CSMA/CD
The CSMA method does not specify the procedure following a collision. Carrier sense multiple access with
collision detection (CSMA/CD) augments the algorithm to handle the collision. In this method, a station monitors
the medium after it sends a frame to see if the transmission was successful. If so, the station is finished. If, however,
there is a collision, the frame is sent again. To better understand CSMA/CD, let us look at the first bits transmitted
by the two stations involved in the collision. Although each station continues to send bits in the frame until it detects
the collision, we show what happens as the first bits collide.
At time t1, station A has executed its persistence procedure and starts sending the bits of its frame. At time t2, station
C has not yet sensed the first bit sent by A. Station C executes its persistence procedure and starts sending the bits in
its frame, which propagate both to the left and to the right. The collision occurs sometime after time t2. Station C
detects a collision at time t3 when it receives the first bit of A’s frame. Station C immediately (or after a short time,
but we assume immediately) aborts transmission. Station A detects collision at time t4 when it receives the first bit of
C’s frame; it also immediately aborts transmission. Looking at the figure, we see that A transmits for the duration t4
- t1; C transmits for the duration t3 - t2.
CSMA/CA
Carrier sense multiple access with collision avoidance (CSMA/CA) was invented for wireless networks. Collisions
are avoided through the use of CSMA/CA’s three strategies: the interframe space, the contention window, and
acknowledgments Interframe Space (IFS). First, collisions are avoided by deferring transmission even if the channel
is found idle. When an idle channel is found, the station does not send immediately. It waits for a period of time
called the interframe space or IFS. Contention Window. The contention window is an amount of time divided into
slots. A station that is ready to send chooses a random number of slots as its wait time. The number of slots in the
window changes according to the binary exponential backoff strategy. This means that it is set to one slot the first
time and then doubles each time the station cannot detect an idle channel after the IFS time. This is very similar to
the p-persistent method except that a random outcome defines the number of slots taken by the waiting station.
Acknowledgment. With all these precautions, there still may be a collision resulting in destroyed data. In addition,
the data may be corrupted during the transmission. The positive acknowledgment and the time-out timer can help
guarantee that the receiver has received the frame.
Polling
Polling works with topologies in which one device is designated as a primary station and the other devices are
secondary stations. All data exchanges must be made through the primary device even when the ultimate
destination is a secondary device. The primary device controls the link; the secondary devices follow its instructions.
It is up to the primary device to determine which device is allowed to use the channel at a given time.
Select
The select function is used whenever the primary device has something to send. Remember that the primary controls
the link. If the primary is neither sending nor receiving data, it knows the link is available. If it has something to
send, the primary device sends it. Before sending data,the primary creates and transmits a select (SEL) frame, one
field of which includes the
address of the intended secondary.
Poll
The poll function is used by the primary device to solicit transmissions from the secondary devices. When the
primary is ready to receive data, it must ask (poll) each device in turn if it has anything to send. When the first
secondary is approached, it responds either with a NAK frame if it has nothing to send or with data (in the form of
a data frame) if it does. If the response is negative (a NAK frame), then the primary polls the next secondary in the
same manner until it finds one with data to send. When the response is positive (a data frame), the primary reads
the frame and returns an acknowledgment (ACK frame), verifying its receipt.
Token Passing
In the token-passing method, the stations in a network are organized in a logical ring. In other words, for each
station, there is a predecessor and a successor. The predecessor is the station which is logically before the station in the
ring; the successor is the station which is after the station in the ring. Token management is needed for this access
method. Stations must be limited in the time they can have possession of the token. The token must be monitored to
ensure it has not been lost or destroyed.
Logical Ring
In a token-passing network, stations do not have to be physically connected in a ring; the ring can be a logical one.
Figure below shows four different physical topologies that can create a logical ring.
In the physical ring topology, when a station sends the token to its successor, the token cannot be seen by other
stations; the successor is the next one in line. This means that the token does not have to have the address of the next
successor. The problem with this topology is that if one of the links—the medium between two adjacent stations—
fails, the whole system fails. The dual ring topology uses a second (auxiliary) ring which operates in the reverse
direction compared with the main ring. The second ring is for emergencies only (such as a spare tire for a car). If one
of the links in the main ring fails, the system automatically combines the two rings to form a temporary ring. After
the failed link is restored, the auxiliary ring becomes idle again. Note that for this topology to work, each station
needs to have two transmitter ports and two receiver ports. The high-speed Token Ring networks called FDDI (Fiber
Distributed Data Interface) and CDDI (Copper Distributed Data Interface) use this topology.
In the bus ring topology, also called a token bus, the stations are connected to a single cable called a bus. They,
however, make a logical ring, because each station knows the address of its successor (and also predecessor for
token management purposes).When a station has finished sending its data, it releases the token and inserts the
address of its successor in the token. Only the station with the address matching the destination address of the token
gets the token to access the shared media. The Token Bus LAN, standardized by IEEE, uses this topology. In a star
ring topology, the physical topology is a star. There is a hub, however, that acts as the connector. The wiring inside
the hub makes the ring; the stations are connected to this ring through the two wire connections. This topology
makes the network less prone to failure because if a link goes down, it will be bypassed by the hub and the rest of
the stations can operate. Also adding and removing stations from the ring is easier.
Ethernet Evolution
The Ethernet LAN was developed in the 1970s by Robert Metcalfe and David Boggs.Since then, it has gone through
four generations: Standard Ethernet (10 Mbps), Fast Ethernet (100 Mbps), Gigabit Ethernet (1 Gbps), and 10
Gigabit Ethernet (10 Gbps)
Ethernet protocols refer to the family of local-area network (LAN) technology covered by the IEEE 802.3. It is
working examplc of the more general carrier sense multiple access with collision detect (CSMA/CD). In the Ethernet
Computer Network standard, there are two modes of operation: half-duplex and full-duplex modes. In the half
duplex mode, data are transmitted using the popular Carrier-SenseMultiple Access/Collision Detection
(CSMA/CD) protocol on as hared medium. Ethernet to achieve a reasonable linkdistance.Four data rates are
currently defined for operation over opticalfiber and twisted-pair cables :
• 10 Mbps - 10Base-T Ethernet (IEEE 802.3)
• 100 Mbps - Fast Ethernet (IEEE 802.3u)
• 1000 Mbps - Gigabit Ethernet (IEEE 802.3z)
• 10-Gigabit - 10 Gbps Ethernet (IEEE 802.3ae).
The Ethernet is a multi-access network, meaning that a set of nodes send and receive frames over a shared link you
can, therefore, think of an Ethernet or being like a bus that has multiple stations plugged into it. The "carrier sense"
Preamble. This field contains 7 bytes (56 bits) of alternating 0s and 1s that alert the receiving system to the coming
frame and enable it to synchronize its clock if it’s out of synchronization. The pattern provides only an alert and a
timing pulse. The 56-bit pattern allows the stations to miss some bits at the beginning of the frame. The preamble
is actually added at the physical layer and is not (formally) part of the frame.
Start frame delimiter (SFD). This field (1 byte: 10101011) signals the beginning of the frame. The SFD warns the
station or stations that this is the last chance for synchronization.
Destination address (DA). This field is six bytes (48 bits) and contains the link layer address of the destination
station or stations to receive the packet.
Source address (SA). This field is also six bytes and contains the link-layer address of the sender of the packet. We
will discuss addressing shortly.
Type. This field defines the upper-layer protocol whose packet is encapsulated in the frame. This protocol can be IP,
ARP, OSPF, and so on. Data. This field carries data encapsulated from the upper-layer protocols. It is a minimum of
46 and a maximum of 1500 bytes. CRC. The last field contains error detection information, in this case a CRC-32. The
CRC is calculated over the addresses, types, and data field.
WIRELESS LAN
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. the wireless LAN is referred to as an infrastructure network, and the connection to the wired
infrastructure, such as the Internet, is done via a device called an access point (AP). 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.
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).
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 are connected
through a distribution system, which is a wired or a wireless network. The distribution system connects the APs in the
BSSs.
MAC Sublayer
IEEE 802.11 defines two MAC sublayers: the distributed coordination function (DCF) and point coordination
function (PCF).
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.
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.
b. 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).
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.
3. The source station sends data after waiting an amount of time equal to SIFS.
4. 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.
Point Coordination Function (PCF)
The point coordination function (PCF) is an optional access method that can be
implemented in an infrastructure network (not in an ad hoc network). To give priority to PCF over DCF, another
interframe space, PIFS, has been defined. PIFS (PCF IFS) is shorter than DIFS. This means that if, at the same time, a
station wants to use only DCF and an AP wants to use PCF, the AP has priority.Due to the priority of PCF over
DCF, stations that only use DCF may not gain access to the medium.
Frame control (FC). The FC field is 2 bytes long and defines the type of frame and some control information.
❑ D. This field defines the duration of the transmission that is used to set the value of NAV. In one control frame, it
defines the ID of the frame.
❑ Addresses. There are four address fields, each 6 bytes long. The meaning of each address field depends on the
value of the To DS and From DS subfields and will be discussed below.
❑ Sequence control. This field, often called the SC field, defines a 16-bit value. The first four bits define the fragment
number; the last 12 bits define the sequence number, which is the same in all fragments.
❑ Frame body. This field, which can be between 0 and 2312 bytes, contains information based on the type and the
subtype defined in the FC field.
❑ FCS. The FCS field is 4 bytes long and contains a CRC-32 error-detection sequence.
Frame Types
A wireless LAN defined by IEEE 802.11 has three categories of frames: management frames, control frames, and
data frames.
Addressing Mechanism
The IEEE 802.11 addressing mechanism specifies four cases, defined by the value of the two flags in the FC field, To
DS and From DS. Each flag can be either 0 or 1, resulting in four different situations. The interpretation of the four
addresses (address 1 to address 4) in the MAC frame depends on the value of these flags
The transmission range of access point A reaches at B, but not at access point C, similarly transmission
range of access point C reaches B, but not at A. These nodes are known as hidden terminals. The problem
occurs when nodes A and C start to send data packets simultaneously to the access point B. Because the
access points A and C are out of range of each other and resultant they cannot detect a collision while
transmitting, Carrier sense multiple access with collision detection (CSMA/CD) does not work, and
collisions occur, which then corrupt the data received by the access point B due to the hidden terminal
problem.
The hidden terminal analogy is described as follows:
Terminal A sends data to B, terminal C cannot hear A
Terminal C wants to send data to B, terminal C senses a “free” medium (CS fails) and starts
transmitting
Collision at B occurs, A cannot detect this collision (CD fails) and continues with its transmission
to B
Terminal A is “hidden” from C and vice versa.
IEEE 802.11 uses 802.11 RTS/CTS acknowledgment and handshake techniques over wireless networks to
transferring packets that partly overcome the hidden node problem.
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.
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.
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 secondaries in the second piconet.
CONNECTING DEVICES
Connecting devices can operate in different layers of the Internet model. Three kinds of connecting devices: hubs, link-
layer switches, and routers. Hubs today operate in the first layer of the Internet model.
Hubs
A hub is a device that operates only in the physical layer. Signals that carry information within a network can travel
a fixed distance before attenuation endangers the integrity of the data. A repeater receives a signal and, before it
becomes too weak or corrupted, regenerates and retimes the original bit pattern.
Link-Layer Switches
A link-layer switch (or switch) operates in both the physical and the data-link layers. As a physical-layer device, it
regenerates the signal it receives. As a link-layer device, the link-layer switch can check the MAC addresses (source
and destination) contained in the frame.
Routers
A router can connect networks. In other words, a router is an internetworking device; it connects independent
networks to form an internetwork. According to this definition, two networks connected by a router become an
internetwork or an internet. There are three major differences between a router and a repeater or a switch.
1. A router has a physical and logical (IP) address for each of its interfaces.
2. A router acts only on those packets in which the link-layer destination address matches the address of the
interface at which the packet arrives.
3. A router changes the link-layer address of the packet (both source and destination) when it forwards the packet.
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.