Unit II - Networking - Computer Networks
Unit II - Networking - Computer Networks
UNIT II - NETWORKING
1
The Computer Network
2
Network Topologies
3
1. Bus Topology
Advantages: Disadvantages:
1. There is no central controller. 1. It is possible that more than one station may
attempt transmission simultaneously (collision or
2. Control resides in each station
contention).
3. The less interconnecting wire is
2. Difficult reconfiguration and fault isolation.
required.
3. A fault or break in the bus cable stops all
4. Ease of installation.
transmission, even between devices on the same
5. Backbone cable can be laid along the side of the problem.
most efficient path, and then
4. The damaged area reflects signals in the direction
connected to the nodes by drop lines
of origin, creating noise in both directions
of various lengths
4
2. Ring Topology
• All devices are connected to one another in the shape
of a closed loop.
• Each device is connected directly to two other devices,
one on either side of it.
Advantages:
1. Avoids the collisions that are possible in the bus topology.
2. Each pair of stations has a point-to-point connection.
3. A signal is passed along the ring in one direction, from device to
another, until it reaches its destination.
4. Each device incorporates a repeater.
5. Relatively easy to install and reconfigure.
6. Fault isolation is simplified.
Disadvantages:
1. A break in the ring (such as station disabled) can disable the entire
network.
2. Unidirectional traffic.
3. Star Topology
Disadvantages:
1. The devices are not linked to each other.
2. If one device wants to send data to another, it sends it to
the controller, which then relays the data to the other
connected device.
6
4. Tree/Hierarchical Topology
A tree topology combines characteristics of linear
bus and star topologies.
It consists of groups of star-configured workstations
connected to a linear bus backbone cable.
Tree topologies allow for the expansion of an
existing network, and enable schools to configure a
network to meet their needs.
Advantages:
1. It allows more devices to be attached to a single
central hub and can therefore increase the distance a
signal can travel between devices.
2. It allows the network to isolate and prioritize
communications from different computers.
Disadvantages:
1. The devices are not linked to each other.
2. If one device wants to send data to another, it sends
it to the controller, which then relays the data to the
other connected device.
3. The addition of secondary hubs brings two further
advantages. 7
5. Mesh Topology
8
Fully connected mesh topology
The number of connections in a full mesh network of n nodes is = n(n - 1) / 2.
The fully connected mesh topology is generally too costly and complex for
practical networks.
It has been used on networks with only a small number of nodes.
The type of network topology in which some of the nodes of the network are connected
to more than one other node in the network with a point-to-point link
This makes it possible to take advantage of some of the redundancy that is provided by
a physical fully connected mesh topology without the expense required for a connection
between every node in the network.
In most practical networks that are based upon the partially connected mesh
topology, all of the data that is transmitted between nodes in the network takes the
shortest path between nodes. The network used a longer alternative path in the
case of a failure or break in one of the links. This requires that the nodes of the
network possess some type of logical 'routing' algorithm to determine the correct
path to use at any particular time.
9
Logical Topology
This has major impact on cost, scalability and This has major impact on speed and delivery
bandwidth capacity of network based on of data packets. It also handles flow control
selection and availability of devices. and ordered delivery of data packets.
11
Hybrid Topology
A network structure whose design contains more than one topology is said to be
hybrid topology. Hybrid topology inherits merits and demerits of all the incorporating
topologies.
The combining topologies may contain attributes of Star, Ring, Bus, and Daisy-chain
topologies. Most WANs are connected by means of Dual-Ring topology and networks
connected to them are mostly Star topology networks. Internet is the best example of
largest Hybrid topology
12
Network Standardization
Defines the rules for data communications that are needed for interoperability of
networking technologies and processes.
Standards help in creating and maintaining open markets
Allows different vendors to compete on the basis of the quality of their products
while being compatible with existing market products
Formulated to ensure that hardware and software produced by different vendors
can work together.
Without networking standards, it would be difficult to develop
networks that easily share information.
17
American National Standards Institute (ANSI)
The American National Standards Institute (ANSI) is a non-profit organization that
oversees the development of voluntary consensus standards for products, services,
processes, systems and personnel in the United States.
The organization also coordinates U.S. standards with international standards so
that American products can be used worldwide.
Helps to create guidelines that are universally accepted in multiple industries.
ANSI C12.22 is the American National Standard for Protocol Specification for
Interfacing to Data Communication Networks
18
Electronic Industries Alliance (EIA)
The Electronic Industries Alliance (EIA) standards for direct component marking,
data modeling, color coding and packaging materials.
Products and services covered under this collection range from the smallest
electronic component to the most complex systems used by the defense, space and
consumer product industry.
EIA ceased to exist on February 11, 2011. EIA designated Electronic Components,
Assemblies, Equipment & Supplies Association (ECA) to continue to develop standards for
interconnect, pa ssive and electro-mechanical (IP&E) electronic components under the
ANSI- designation of EIA standards.
ECA is merged with the National Electronic Distributors Association (NEDA)
to form the Electronic Components Industry Association (ECIA)
Most popular are RS-232-C, RS-449, RS-422, and RS-423 serial interfaces
Whether it is wired network office or a wireless one, one thing is common for both
environments: It takes both network software and hardware (cables, routers, etc.) to
transfer data from one computer to another or from a computer thousands of miles
away to users.
In the end, to get the data you want right to particular USER, it comes down to
addresses.
Along with an IP address (which is networks software), there’s also a hardware
address.
Typically it is tied to a key connection device with computer called the network
interface card, or NIC.
The NIC is essentially a computer circuit card that makes connection between
computer to a network.
An NIC turns data into an electrical signal that can be transmitted over the network.
MAC addresses are physical addresses, unlike IP addresses which are logical addresses.
Logical addresses require you to load special drivers and protocols in order to be able
to configure network card/computer with an IP Address,
where as a MAC address doesn’t require any drivers whatsoever.
The reason for this is that the MAC address is actually “the burned-in address (BIA)”
into your network card’s memory chipset.
The ARP protocol is used to associate a logical address with a physical or MAC address.
20
THE REASON FOR MAC
21
The IP address of a machine exists on the 3rd Layer of the OSI model and, when a
packet reaches the computer, it will travel from Layer 1 upwards, so we need to
be able to identify the computer before Layer 3.
This is where the MAC address – Layer 2 comes into the picture.
All machines on a network will listen for packets that have their MAC address in
the destination field of the packet (they also listen for broadcasts and other stuff,
but that’s analyzed in other sections).
The Physical Layer understands the electrical signals on the network and creates
the frame which gets passed to the Datalink layer.
If the packet is designed for the computer then the MAC address in the
destination field of the packet will match, so it will accept it and pass it onto the
Layer above (3) which, in turn, will check the network address of the packet (IP
Address), to make sure it matches with the network address to which the
computer has been configured
22
Media Access Control (MAC) Address
MAC address is used by Media Access Control (MAC) sublayer of Data-Link Layer.
MAC Address is worldwide unique, since millions of network devices exists and we
need to uniquely identify each.
23
Format of MAC Address
CC:46:D6 - Cisco
3C:5A:B4 - Google, Inc.
3C:D9:2B - Hewlett Packard
00:9A:CD - HUAWEI TECHNOLOGIES CO.,LTD
00-14-22 – Dell
00-04-DC – Nortel
00-30-BD - Belkin
24
MAC address is represented by Colon-Hexadecimal notation. But this is just a
conversion, not mandatory. MAC address can be represented using any of the
following formats –
25
Types of MAC Address
1. 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.
26
2. 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.
27
3. Broadcast
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.
28
How to find the MAC address of a device
Every device connected to the home network contains a unique MAC address, but if your
system has multiple network adapters, such as an Ethernet adapter or wireless adapter,
each adapter or NIC has its own MAC address or physical address.
Follow the below steps to find the MAC addresses of a device on a different OS.
MAC address on Windows:
1. Click Window Start or Press the Windows Key.
2. In the given search box, type cmd to open the command prompt.
29
3. Press the Enter key, and the command prompt window will display,
as shown below image:
30
As we can see in the above image, there are two physical addresses shown
with different values, one is for the Ethernet adapter, and the other one is for
the VMware network adapter.
31
Difference between MAC address and IP address
Both the MAC address and IP address are the way to identify the device on
the network. Following are some important differences between both:
32
Multiple Access Issues
• If more than one node transmit at a time on the control channel to BS, a collision occurs
• How to determine which node can transmit to BS?
Multiple Access Protocols
Different types:
• Contention protocols resolve a collision after it occurs. These protocols execute a
collision resolution protocol after each collision
Pure ALOHA
In pure ALOHA, the time of transmission is continuous. Whenever a station has an
available frame, it sends the frame. If there is collision and the frame is destroyed, the
sender waits for a random amount of time before retransmitting it.
36
Throughput of ALOHA
P(0) = e -2G
• We can calculate throughput S with a traffic load G as follows:
S = G P(0) = G e-2G
38
Throughput of Slotted ALOHA
P(0) = e -G
• The throughput S is
S = G P(0) = G e-G
39
Contention Protocols (Cont’d)
• CSMA (Carrier Sense Multiple Access)
• Improvement: Start transmission only if no transmission is ongoing
• CSMA/CD (CSMA with Collision Detection)
• Improvement: Stop ongoing transmission if a collision is detected
• CSMA/CA (CSMA with Collision Avoidance)
• Improvement: Wait a random time and try again when carrier is quiet. If still
quiet, then transmit
• CSMA/CA with ACK
• CSMA/CA with RTS/CTS (Request to Send/Clear to Send)
CSMA (Carrier Sense Multiple Access)
40
Collision Mechanism in CSMA
In a carrier sense multiple access based on media access protocol to sense the
traffic on a channel (idle or busy) before transmitting the data. It means that if the
channel is idle, the station can send data to the channel. Otherwise, it must wait
until the channel becomes idle. Hence, it reduces the chances of a collision on a
transmission medium. However there is still chance of collision in CSMA due to
propagation delay.
41
CSMA Access Modes
1-persistent:
The node senses the channel, if idle it sends the data, otherwise it
continuously keeps on checking the medium for being idle and transmits
unconditionally (with 1 probability) as soon as the channel gets idle.
Non-Persistent:
The node senses the channel, if idle it sends the data, otherwise it
checks the medium after a random amount of time (not continuously) and
transmits when found idle.
P-persistent:
The node senses the medium, if idle it sends the data with p probability.
If the data is not transmitted ((1-p) probability) then it waits for some time and
checks the medium again, now if it is found idle then it send with p probability.
This repeat continues until the frame is sent. It is used in Wifi and packet radio
systems.
O-persistent:
Superiority of nodes is decided before and and transmission occurs in
that order. If the medium is idle, node waits for its time slot to send data.
42
CSMA/CD (CSMA with Collision Detection)
In CSMA, if 2 terminals begin sending packet at the same time, each will
transmit its complete packet (although collision is taking place).
Wasting medium for an entire packet time.
CSMA/CD
Step 1: If the medium is idle, transmit
Step 2: If the medium is busy, continue to listen until the channel is idle
then transmit
Step 3: If a collision is detected during transmission, cease transmitting
Step 4: Wait a random amount of time and repeats the same algorithm
43
CSMA/CA (CSMA with collision Avoidance)
44
Channelization Protocol:
In this, the available bandwidth of the link is shared in time, frequency and code to multiple
stations to access channel simultaneously.
45
Internet Architecture
46
Layers of Internet Architecture
Internet architecture consists of three layers −
47
Architecture of the Internet
The Security feature is dependent on application IPSEC is an inbuilt security feature in the IPv6 protocol
In large networks, there can be multiple paths from sender to receiver. The
switching technique will decide the best route for data transmission.
Switching technique is used to connect the systems for making one-to-one
communication.
Classification Of Switching Techniques
Circuit Switching
TYPES OF ERRORS
1. Single Bit Error - It means that only one bit of a given data unit is changed from 1 to 0 or
from 0 to 1.
2. Burst Bit Error - It means that two or more bits in the data unit have changed. A burst bit
does not necessarily means that the errors occur in consecutive bits. The length of the bust error is
measured from the first corrupted bit to the last corrupted bit. Some bits in between may not be
corrupted.
58
The Mobile Wireless Communication Technology Journey
Features
60
Specifications for 3G
3G specifications are laid down by two groups, 3GPP and 3GPP2.
3GPP (Third Generation Partnership Project)
These specifications are based upon Global System for Mobile (GSM)
communications, and are known as Universal Mobile Telecommunications Systems (UMTS).
The technologies includes in it are −
• Universal Terrestrial Radio Access (UTRA)
• General Packet Radio Service (GPRS)
• Enhanced Data rates for GSM Evolution (EDGE)
3GPP2
These specifications are based upon Code Division Multiple Access (CDMA). Two
main specifications under this are −
• Wideband CDMA (WCDMA)
• CDMA2000
Areas of Application
Wireless voice telephony
Fixed wireless Internet access
Mobile Internet access
Video calls
Mobile TV technologies
Video-on-demand
Video conferencing
Tele-medicine
Global Positioning System (GPS)
Location-based services
61
UMTS - Universal Mobile Telecommunications System
Based on the GSM standard.
Developed and maintained by the 3GPP (3rd Generation Partnership Project)
UMTS is a component of the Standard International Union all IMT-2000
telecommunications and compares it with the standard set for CDMA2000 networks
UMTS uses wideband code division multiple access (W-CDMA) radio access
technology to provide greater spectral efficiency and bandwidth mobile network
operators.
It specifies a complete network system and the technology described in it is popularly
referred as Freedom of Mobile Multimedia Access (FOMA).
The UMTS network architecture can be divided into three main elements:
Core Network:
The core network provides all the central processing and management for the
system. It is the equivalent of the GSM Network Switching Subsystem (NSS). The core
network is then the overall entity that interfaces to external networks including the
public phone network and other cellular telecommunications networks.
63
User Equipment, UE
The 3G UMTS / WCDMA network that interfaces to both the UE and the
core network. The overall radio access network, i.e. collectively all the Radio Network
Subsystem is known as the UTRAN UMTS Radio Access Network.
The radio network subsystem is also known as the UMTS Radio Access
Network or UTRAN.
65
Circuit switched elements
The circuit switched elements of the UMTS core network architecture include
the following network entities:
Mobile Switching Centre (MSC): This is essentially the same as that within
GSM, and it manages the circuit switched calls under way.
Gateway MSC (GMSC): This is effectively the interface to the external
networks.
66
Session management: The SGSN manages the data sessions providing the
required quality of service and also managing what are termed the PDP (Packet
data Protocol) contexts, i.e. the pipes over which the data is sent.
Interaction with other areas of the network: The SGSN is able to manage its
elements within the network only by communicating with other areas of the
network, e.g. MSC and other circuit switched areas.
Billing: The SGSN is also responsible billing. It achieves this by monitoring the
flow of user data across the GPRS network. CDRs (Call Detail Records) are
generated by the SGSN before being transferred to the charging entities
(Charging Gateway Function, CGF).
Gateway GPRS Support Node (GGSN): Like the SGSN, this entity was also first
introduced into the GPRS network. The Gateway GPRS Support Node (GGSN) is
the central element within the UMTS packet switched network. It handles inter-
working between the UMTS packet switched network and external packet
switched networks, and can be considered as a very sophisticated router. In
operation, when the GGSN receives data addressed to a specific user, it checks if
the user is active and then forwards the data to the SGSN serving the particular
UE.
67
Shared elements
The shared elements of the 3G UMTS core network architecture include the
following network entities:
Home Location Register (HLR): This database contains all the administrative
information about each subscriber along with their last known location. In this way,
the UMTS network is able to route calls to the relevant RNC / Node B. When a user
switches on their UE, it registers with the network and from this it is possible to
determine which Node B it communicates with so that incoming calls can be routed
appropriately. Even when the UE is not active (but switched on) it re-registers
periodically to ensure that the network (HLR) is aware of its latest position with their
current or last known location on the network.
Equipment Identity Register (EIR): The EIR is the entity that decides whether a
given UE equipment may be allowed onto the network. Each UE equipment has a
number known as the International Mobile Equipment Identity. This number, as
mentioned above, is installed in the equipment and is checked by the network during
registration.
Authentication Centre (AuC) : The AuC is a protected database that contains the
secret key also contained in the user's USIM card.
68
Wired LANs: Ethernet
IEEE STANDARDS
In 1985, the Computer Society of the IEEE started a project, called Project 802, to set
standards to enable intercommunication among equipment from a variety of
manufacturers.
Project 802 is a way of specifying functions of the physical layer and the data link layer
of major LAN protocols.
IEEE standard for LANs
69
STANDARD ETHERNET
The original Ethernet was created in 1976 at Xerox s’ Palo Alto Research Center
(PARC). Since then, it has gone through four generations.
70
Preamble.
The first field of the 802.3 frame contains 7 bytes (56 bits) of alternating 0s and 1s that alerts
the receiving system to the coming frame and enables it to synchronize its input timing.
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).
The second 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.
The last 2 bits is 11 and alerts the receiver that the next field is the destination address.
Destination address (DA).
The DA field is 6 bytes and contains the physical address of the destination station or stations
to receive the packet.
Source address (SA).
The SA field is also 6 bytes and contains the physical address of the sender of the packet.
Length or type.
This field is defined as a type field or length field. The original Ethernet used this field as the
type field to define the upper-layer protocol using the MAC frame. The IEEE standard used it as
the length field to define the number of bytes in the data field.
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
71
Minimum and Maximum length of DATA
Frame length:
Min: 64 bytes (512 bit )
Max: 1518 bytes (12,144 bits)
An Ethernet frame needs to have a minimum length of 512 bits or 64 bytes. Part of this length
is the header and the trailer.
If we count 18 bytes of header and trailer (6 bytes of source address, 6 bytes of destination
address, 2 bytes of length or type, and 4 bytes of CRC), then the minimum length of data from
the upper layer is 64 − 18 = 46 bytes.
If the upper-layer packet is less than 46 bytes, padding is added to make up the difference.
The standard defines the maximum length of a frame (without preamble and SFD field) as 1518
bytes.
If we subtract the 18 bytes of header and trailer, the maximum length of the payload is 1500
bytes.
The maximum length restriction has two historical reasons. First, memory was very expensive
when Ethernet was designed: a maximum length restriction helped to reduce the size of the
buffer. Second, the maximum length restriction prevents one station from monopolizing the
shared medium, blocking other stations that have data to send. 72
Addressing
Each station on an Ethernet network (such as a PC, workstation, or printer)
has its own network interface card (NIC).
The NIC fits inside the station and provides the station with a 6-byte physical
address. (MAC Address or Physical address or Hardware address)
Addressing Types
Unicast, Multicast, and Broadcast Addresses
A source address is always a unicast address—the frame comes from only one
station.
The destination address, however, can be unicast, multicast, or broadcast.
If the least significant bit of the first byte in a destination address is 0, the address
is unicast; otherwise, it is multicast.
The broadcast destination address is a special case of the multicast address in
which all bits are 1s.
73
Categories of Standard Ethernet
10Base5:
74
10Base2:
Thin Ethernet The second implementation is called 10Base2, thin Ethernet, or
Cheapernet.
10Base2 also uses a bus topology, but the cable is much thinner and more flexible.
The cable can be bent to pass very close to the stations. In this case, the transceiver is
normally part of the network interface card (NIC), which is installed inside the station
10Base-T:
Twisted-Pair Ethernet The third implementation is called 10Base-T or twisted-pair
Ethernet.
10Base-T uses a physical star topology.
The stations are connected to a hub via two pairs of twisted cable.
Note that two pairs of twisted cable create two paths (one for sending and one for
receiving) between the station and the hub.
Any collision here happens in the hub. Compared to 10Base5 or 10Base2, we can see
that the hub actually replaces the coaxial cable as far as a collision is concerned.
The maximum length of the twisted cable here is defined as 100 m, to minimize the
effect of attenuation in the twisted cable.
10Base-F:
Fiber Ethernet Although there are several types of optical fiber 10-Mbps Ethernet,
the most common is called 10Base-F.
10Base-F uses a star topology to connect stations to a hub.
The stations are connected to the hub using two fiber-optic cable 75
Wireless Local Area Network (WLAN)
A wireless LAN or WLAN is a wireless local area network that uses radio waves as
its carrier.
The last link with the users is wireless, to give a network connection to all users in
a building or campus.
The backbone network usually uses cables
76
How are WLANs Different?
Application
Presentation
ISO
OSI Session IEEE 802
7-layer Transport standards
model Network Logical Link Control
Data Link Medium Access (MAC)
The standard defines two kinds of services: the basic service set (BSS) and the
extended service set (ESS).
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.
79
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.
IEEE 802.11 does not restrict the distribution system; it can be any IEEE LAN such as an
Ethernet.
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.
80
Station Types
81
The 802.11 Protocol Stack
82
Wireless Physical Layer
• Physical layer conforms to OSI
• 1997: 802.11 infrared, FHSS, DSSS {FHSS and DSSS run in the 2.4GHz band}
• 1999: 802.11a OFDM and 802.11b HR-DSSS
• 2001: 802.11g OFDM
• 802.11 Infrared
• Two capacities: 1 Mbps or 2 Mbps.
• Range is 10 to 20 meters and cannot penetrate walls.
• Does not work outdoors.
• 802.11 FHSS (Frequency Hopping Spread Spectrum)
• The main issue is multipath fading.
• The idea behind spread spectrum is to spread the signal over a wider frequency to
minimize the interference from other devices.
• 79 non-overlapping channels, each 1 Mhz wide at low end of 2.4 GHz ISM band.
• The same pseudo-random number generator used by all stations to start the
hopping process.
• Dwell time: min. time on channel before hopping (400msec).
83
• 802.11 DSSS (Direct Sequence Spread Spectrum)
• The main idea is to represent each bit in the frame by multiple bits in the
transmitted signal (i.e., it sends the XOR of that bit and n random bits).
• Spreads signal over entire spectrum using pseudo-random sequence
• Each bit transmitted using an 11-bit chipping Barker sequence, PSK at
1Mbaud.
• This yields a capacity of 1 or 2 Mbps.
1
0 Data stream: 1010
1
0 Random sequence: 0100101101011001
1
0 XOR of the tw o: 1011101110101001
84
• 802.11a OFDM (Orthogonal Frequency Divisional Multiplexing)
• Compatible with European HiperLan2.
• 54 Mbps in wider 5.5 GHz band transmission range is limited.
• Uses 52 FDM channels (48 for data; 4 for synchronization).
• Encoding is complex ( PSM up to 18 Mbps and QAM above this capacity).
• E.g., at 54 Mbps 216 data bits encoded into into 288-bit symbols.
• More difficulty penetrating walls.
• 802.11b HR-DSSS (High Rate Direct Sequence Spread Spectrum)
• 11a and 11b shows a split in the standards committee.
• 11b approved and hit the market before 11a.
• Up to 11 Mbps in 2.4 GHz band using 11 million chips/sec.
• Note in this bandwidth all these protocols have to deal with interference from
microwave ovens, cordless phones and garage door openers.
• Range is 7 times greater than 11a.
• 11b and 11a are incompatible!!
• 802.11g OFDM(Orthogonal Frequency Division Multiplexing)
• An attempt to combine the best of both 802.11a and 802.11b.
• Supports bandwidths up to 54 Mbps.
• Uses 2.4 GHz frequency for greater range.
• Is backward compatible with 802.11b.
85
MAC Sublayer
IEEE 802.11 defines two MAC sublayer functions: the distributed coordination
function (DCF) and point coordination function (PCF).
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).
2. 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.
86
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.
87
Network Allocation Vector
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.
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 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.
88
(a) Hidden Station Problem and (b)
Exposed Station Problem
• Since not all stations are within radio range of each other, transmissions going on in one part of
a cell may not be received elsewhere in the same cell.
• To deal with these problems, 802.11 supports two modes of operation: DCF and PCF.
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).
It is implemented on top of the DCF and is used mostly for time-sensitive transmission.
PCF has a centralized, contention-free polling access method.
The AP performs polling for stations that are capable of being polled.
The stations are polled one after another, sending any data they have to the AP.
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.
To prevent this, a repetition interval has been designed to cover both contention-free PCF
and contention-based DCF traffic.
The repetition interval, which is repeated continuously, starts with a special control frame,
called a beacon frame.
When the stations hear the beacon frame, they start their NAV for the duration of the
contention-free period of the repetition interval.
During the repetition interval, the PC (point controller) can send a poll frame, receive data,
send an ACK, receive an ACK, or do any combination of these (802.11 uses piggybacking).
At the end of the contention-free period, the PC sends a CF end (contention-free end)
frame to allow the contention-based stations to use the medium.
90
Fragmentation
Frame Format
91
Frame control (FC).
The FC field is 2 bytes long and defines the type of frame and some
control information.
92
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
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.
93
Frame Types
For control frames the value of the type field is 01; the values of the subtype fields
for frames
Data Frames - Data frames are used for carrying data and control information.
94
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
Address 1 is always the address of the next device that the frame will visit.
Address 2 is always the address of the previous device that the frame has left.
Address 3 is the address of the final destination station if it is not defined by
address 1 or the original source station if it is not defined by address 2.
Address 4 is the original source when the distribution system is also wireless.
95
Case 1: 00 In this case, To DS = 0 and From DS = 0. This means that the
frame is not going to a distribution system (To DS = 0) and is not coming
from a distribution system (From DS = 0). The frame is going from one
station in a BSS to another without passing through the distribution system.
Case 2: 01 In this case, To DS = 0 and From DS = 1. This means that the frame is
coming from a distribution system (From DS = 1). The frame is coming from an AP
and going to a station. Note that address 3 contains the original sender of the
frame (in another BSS).
96
Case 3: 10 In this case, To DS = 1 and From DS = 0. This means that the frame
is going to a distribution system (To DS = 1). The frame is going from a station
to an AP. The ACK is sent to the original station. Note that address 3 contains the
final destination of the frame in the distribution system.
97
Radio Frequency Identification RFID
Is a method that is used to track or identify an object by radio transmission uses over
the web.
Data digitally encoded in an RFID tag which might be read by the reader.
This is device work as a tag or label during which data read from tags that are stored in
the database through the reader as compared to traditional barcodes and QR codes.
It is often read outside the road of sight either passive or active RFID.
98
Types of RFID :
Active RFID –
In this device, RF tags are attached by a power supply that emits a signal and
there is an antenna which receives the data.
Based on Frequencies
99
UHF RHID (Ultra-High Frequency RFID)
LF RFID(Low-Frequency RFID)
Are ideal for reading metal objects or objects with high water content
such as fruit & veg/Animals.
But the read rage is limited to inches or cm.
It operates at 125 KHz
100
Working Principle of RFID :
101
An RFID system comprises a number of elements:
Using in military
Battlefield surveillance and monitoring, guidance systems of intelligent missiles,
detection of attack by weapons of mass destruction such as chemical, biological, or
nuclear
Using in nature
Forest fire, flood detection, habitat exploration of animals
Using in health
Monitor the patient’s heart rate or blood pressure, and sent regularly to alert the
concerned doctor, provide patients a greater freedom of movement
Using in home (smart home)
Sensor node can built into appliances at home, such as ovens, refrigerators, and vacuum
cleaners, which enable them to interact with each other and be remote-controlled
Using in office building
Airflow and temperature of different parts of the building can be automatically
controlled
Using in warehouse
Improve their inventory control system by installing sensors on the products to track
their movement
Comparison with Ad Hoc Wireless Networks
Different from Ad Hoc wireless networks
Sensor nodes are randomly deployed and hence do not fit into any regular topology.
Once deployed, they usually do not require any human intervention. Hence, the setup
and maintenance of the network should be entirely autonomous.
Sensor networks are infrastructure-less. Therefore, all routing and maintenance
algorithms need to be distributed.
Energy problem
Hardware and software should be designed to conserve power
Sensor nodes should be able to synchronize with each other in a completely distributed
manner, so that TDMA schedules can be imposed.
A sensor network should also be capable of adapting to changing connectivity due to the
failure of nodes, or new nodes powering up. The routing protocols should be able to
dynamically include or avoid sensor nodes in their paths.
Real-time communication over sensor networks must be supported through provision of
guarantees on maximum delay, minimum bandwidth, or other QoS parameters.
Provision must be made for secure communication over sensor networks, especially for
military applications which carry sensitive data.
Sensor Network Architecture
The two basic kinds of sensor network architecture : Layered and Clustered
Layered Architecture
A layered architecture has a single powerful base station, and the layers of sensor
nodes around it correspond to the nodes that have the same hop-count to the BS.
In the in-building scenario, the BS acts an access point to a wired network, and small
nodes form a wireless backbone to provide wireless connectivity.
The advantage of a layered architecture is that each node is involved only in short-
distance, low-power transmissions to nodes of the neighboring layers.
Unified Network Protocol Framework (UNPF)
UNPF is a set of protocols for complete implementation of a layered
architecture for sensor networks
UNPF integrates three operations in its protocol structure:
Network initialization and maintenance
MAC protocol
Routing protocol
Routing protocol
Downlink from the BS is by direct broadcast on the control channel. Uplink
from the sensor nodes to BS is by multi-hop data forwarding.
Rumor Routing
Consider the generic WSN depicted in Figure 1. It has 17 sense nodes and 2 sink
nodes. The sink node connection to the outside network may be a wired or wireless
link.
117
Single-hop network architecture
A simple method to have nodes participate in the WSN is the single-hop network
architecture as shown in Figure 2.
In the single-hop architecture the nodes have the ability to communicate with sink
nodes but not with other nodes.
Some nodes in the figure are unconnected to the sink nodes because they are out
of range so they cannot participate in the WSN with this simple architecture.
This is a disadvantage of the single-hop architecture.
In order to access the nodes that are further away from the sink nodes, it is
necessary to alter the network architecture so that those nodes can participate.
Altering the network architecture consist of changing the behavior of nodes. This
is normally done by changing the software stack running on a node.
118
Cluster multi-hop network architecture
With the network architecture shown in Figure 3, some nodes have been assigned to
function as cluster nodes. The cluster nodes provide the following additional abilities;
To aggregate data from other nodes.
To disseminate data to other nodes.
To perform a multi-hop routing function. Because of the multi-hop function of the cluster
nodes, almost all the nodes in the network are now reachable and can participate in the
WSN.
However one node is out of range from any cluster node so it cannot participate in the WSN.
If any one of the cluster nodes is unreachable or unavailable, then the network will lose
connectivity with any nodes that are associated with that cluster node.
119
Mesh multi-hop network architecture
In the network architecture shown in Figure 4, all of the nodes have the ability to
communicate with multiple neighbouring nodes and also have the ability to
aggregate, disseminate and multi-hop data through the network.
Now all the nodes in the network are reachable.
If a communication link between any nodes is unavailable due to malfunction or
mobility, there may be an alternative path through the network for communication
with one of the sink nodes.
120
The advantage of multi-hop communications
The nodes in a WSN will generally have severe energy constraints, primarily due to their
power source being a battery.
Therefore it is important to see the benefit of a multi-hop WSN architecture. The radio
communications over a link between nodes is relatively expensive in terms of power.
The communications of 1-bit of information over a radio link is equivalent to the execution of
1000 to 3000 instructions on a microprocessor
In a line of sight radio system, the losses are mainly due to free-space path loss (FSPL); the
following equation which describes that path loss is due to Friis
So if the distance reduced by a factor of two but all other factors remain unchanged, then
d = d/2, so the FSPL will change by,