Ad-Hoc Network: Unit - 1
Ad-Hoc Network: Unit - 1
Ad-Hoc Network
connect and communicate with each other. The term ad hoc is a Latin
Ad hoc networks are mostly wireless local area networks (LANs). The
base station or access points as in wireless LANs for data transfer co-ordination. Each device
participates in routing activity, by determining the route using the routing algorithm and
Ad hoc networks can be classified into several types depending upon the nature of their
applications. The most prominent ad hoc networks that are commonly incorporated are illustrated
needed, without any support from any existing internet infrastructure or any other kind of
fixed stations.
connected by wireless links, the union of which forms a communication network modeled in the
MANETs are basically peer-to-peer, multi-hop wireless networks in which information packets
are transmitted in a store and forward manner from a source to an arbitrary destination, via
The resulting change in the network topology known at the local level must be passed on to
For example, as MS2 in the figure changes its point of attachment from MS3 to MS4, other nodes that are
part of the network should use this new route to forward packets to MS2. In the figure, we assume that it
is not possible to have all nodes within each other's radio range. In case all nodes are closed within each
In figures raise another issue, that of symmetric and asymmetric (bidirectional) and asymmetric
(unidirectional) links. Consider symmetric links with associative radio range; for example, if MS1
is within radio range of MS3, then MS3 is also within radio range of MS1. The communication links
are symmetric. This assumption is not always valid because of differences in transmitting power
levels and the terrain. Routing in asymmetric networks is a relatively hard task. In certain cases,
it is possible to find routes that exclude asymmetric links, since it is cumbersome to find the
return path. The issue of efficiency is one of the several challenges encountered in a MANET.
The other issue is varying the mobility patterns of different nodes. Some other nodes are highly
mobile, while others are primarily stationary. It is difficult to predict a node's movement and
direction of movement and numerous studies have been performed to evaluate their performance
Characteristics of MANET –
Dynamic Topologies:
Network topology which is typically multihop may change randomly and rapidly with time, it can
Wireless links usually have lower reliability, efficiency, stability, and capacity as compared to a
wired network
Autonomous Behavior:
Each node can act as a host and router, which shows its autonomous behavior.
As some or all the nodes rely on batteries or other exhaustible means for their energy. Mobile
Limited Security:
Wireless networks are more prone to security threats. A centralized firewall is absent due to
the distributed nature of the operation for security, routing, and host configuration.
They require minimum human intervention to configure the network, therefore they are
Advantages of MANETs:
Flexibility: MANETs are highly flexible, as they can be easily deployed in various environments
and can be adapted to different applications and scenarios. This makes them ideal for use in
emergency situations or military operations, where there may not be a pre-existing network
infrastructure.
Scalability: MANETs can easily scale to accommodate a large number of nodes, making them
suitable for large-scale deployments. They can also handle dynamic changes in network topology,
Cost-effective: Since MANETs do not require any centralized infrastructure, they are often
more cost-effective than traditional wired or wireless networks. They can also be used to extend
the range of existing networks without the need for additional infrastructure.
Rapid Deployment: MANETs can be rapidly deployed in areas where infrastructure is not
Disadvantages:
Security: MANETs are vulnerable to security threats, such as attacks by malicious nodes,
eavesdropping, and data interception. Since the network is decentralized, there is no central
Reliability: MANETs are less reliable than traditional networks, as they are subject to
interference, signal attenuation, and other environmental factors that can affect the quality of
the connection.
Bandwidth: Since MANETs rely on wireless communication, bandwidth can be limited. This can
lead to congestion and delays, particularly when multiple nodes are competing for the same
channel.
Routing: Routing in MANETs can be complex, particularly when dealing with dynamic network
topologies. This can result in inefficient routing and longer delays in data transmission.
Power Consumption: Since MANETs rely on battery-powered devices, power consumption can be
a significant issue. Nodes may need to conserve power to extend the life of the battery, which
Quality of Service (QoS): Researchers are working to improve the quality of service of
Security: To ensure the security of the MANET, researchers are developing efficient
Power management: To enhance the lifetime of MANET nodes, researchers are working
on developing efficient power management techniques that reduce the energy consumption
of nodes.
developing efficient routing protocols that can handle multimedia traffic efficiently.
are working on developing standard protocols and interfaces that can be used by different
MANET devices.
Applications of MANET
Some specific applications of ad hoc networks include industrial and commercial applications
involving cooperative mobile data exchange. There are many existing and future military
networking requirements for robust, IP-compliant data services within mobile wireless
communication networks, with many of these networks consist of highly dynamic autonomous
topology segments. Advanced features of Mobile ad hoc networks, including data rates compatible
with multimedia applications global roaming capability, and coordination with other network
up, and ad hoc/sensor networks are excellent candidates for use in battlefield management.
o Crisis management applications: These arise, for example, as a result of natural disasters
quickly is essential.
o Telemedicine: The paramedic assisting the victim of a traffic accident in a remote location
must access medical records (e.g. X-rays) and may need video conference assistance from
instantaneously relay back to the hospital the victim's X-rays and other diagnostic tests
Systems), and high-capacity wireless mobile systems enables a new type of application
streets, and physical characteristics of a large metropolis. They may also "virtually" see
the internal layout of buildings, including an emergency rescue plan, or find possible points
of interest.
o Education via the internet: Educational opportunities available on the internet or remote
areas because of the economic infeasibility of providing expensive last-mile wire line
o Vehicular area network: This a growing and very useful application of adhoc network in
providing emergency services and other information. This is equally effective in both urban
and rural setup. The basic and exchange necessary data that is beneficial in a given
situation.
Limited Bandwidth
The wireless networks have a limited bandwidth in comparison to the wired networks. Wireless
link has lower capacity as compare to infrastructure networks. The effect of fading, multiple
accesses, interference condition is very low in ADHOC networks in comparison to maximum radio
transmission rate.
Dynamic topology
Due to dynamic topology the nodes has less truest between them. I some settlement are found
High Routing
In ADHOC networks due to dynamic topology some nodes changes their position which affects
The Collision of the packets are held due to the transmission of packets by those node which are
not in the direct transmission range of sender side but are in range of receiver side.
Security threats
New security challenges bring by Adhoc networks due to its wireless nature. In Adhoc networks
or wireless networks the trust management between the nodes leads to the numerous security
attacks.
The excess energy consumption is faced by the nodes which are present in the boundaries of the
holes. If the bypass holes are wish to omit then the packets are delivered along the hole
boundaries. This enlarges the hole due to consumption of very much of the nodes and its
boundaries.
In Mobile Ad hoc Network (MANET), nodes do not know the topology of their network, instead
they have to discover it by their own as the topology in the ad-hoc network is dynamic topology.
The basic rules is that a new node whenever enters into an ad-hoc network, must announce its
arrival and presence and should also listen to similar announcement broadcasts made by other
mobile nodes.
1. Pro-active routing protocols: These are also known as table-driven routing protocols. Each
mobile node maintains a separate routing table which contains the information of the routes
to all the possible destination mobile nodes. Since the topology in the mobile ad-hoc network
is dynamic, these routing tables are updated periodically as and when the network topology
changes. It has a limitation that it doesn’t work well for the large networks as the entries in
the routing table becomes too large since they need to maintain the route information to all
possible nodes.
Example: One real-life example of a proactive routing protocol is the Optimized Link State Routing
(OLSR) protocol. OLSR is commonly used in wireless mesh networks, which are used in various applications,
In an emergency response system, for instance, OLSR can be used to quickly establish a wireless
network to support communication among first responders. The protocol can maintain up-to-date
information on the network topology and the best routes to reach nodes, which can be crucial in
Destination Sequenced Distance Vector (DSDV) is a proactive routing protocol that is commonly
used in wireless ad hoc networks. In DSDV, each node maintains a routing table that contains the
shortest path to all other nodes in the network. Whenever a node moves or a link goes down, the
routing tables are updated to reflect the changes in the network topology.
communicating with each other to deliver packages in a busy city. The drones would use DSDV to
determine the best path to reach their destination while avoiding other drones and obstacles. As
the drones move around and the network topology changes, the routing tables would be updated
to ensure that each drone can continue to communicate and navigate efficiently.
WRP is a hybrid routing protocol that combines both proactive and reactive routing approaches.
In WRP, nodes maintain a routing table that contains information about the network topology, and
updates are sent periodically to ensure that the routing table is up-to-date.
A real-life example of WRP in action would be a group of emergency responders in a disaster zone
communicating with each other through wireless devices. The responders could use WRP to share
real-time updates on their location and the location of victims, and to determine the best path to
reach the victims while avoiding any obstacles or dangerous areas. WRP would help to ensure that
the responders can communicate and navigate effectively in a challenging and dynamic
environment.
in mobile ad hoc networks (MANETs). OLSR is designed to optimize the routing process by using
multipoint relays (MPRs) to reduce the amount of flooding required in order to discover routes.
infrastructure may be damaged or unavailable. Emergency response teams can use OLSR to
quickly set up a wireless network between their devices and establish communication without
relying on a pre-existing network infrastructure. This allows them to quickly coordinate their
efforts and respond more effectively to the disaster. OLSR's ability to optimize the routing
process and reduce network traffic is particularly useful in these situations where network
Advantage:
1. Faster routing: maintain a routing table for every node in the network
2. Low overhead: constantly update the routing tables, they have a low overhead in terms of
routing and data transmission.
4. Better suited for larger networks: as they maintain a constant view of the network
topology and can quickly adapt to changes.
5. Efficient use of network resources: as they constantly maintain a routing table for all
nodes in the network.
Disadvantage:
1. Overhead: high overhead cost -> continuously update their routing tables, even if the
network topology remains unchanged.
2. Scalability: do not scale well for larger networks as the amount of routing table
information increases and can become unmanageable.
3. Delay: may have longer delay times due to the time required to update routing tables,
5. Limited adaptability: Pro-active routing protocols may not be able to adapt quickly to
changes in the network topology, making them less suitable for dynamic environments.
2. Reactive routing protocols: These are also known as on-demand routing protocol. In this type
of routing, the route is discovered only when it is required/needed. The process of route
discovery occurs by flooding the route request packets throughout the mobile network. It
consists of two major phases namely, route discovery and route maintenance.
Dynamic Source Routing (DSR) is an on-demand routing protocol for wireless ad-hoc networks.
It is a reactive protocol that establishes routes only when needed. DSR is based on the
principle of source routing, where the sender of a packet determines the complete sequence
Suppose node A wants to send a packet to node D. Since it does not have a route to node D in
its routing table, node A initiates a route discovery process. It broadcasts a Route Request
(RREQ) packet containing the address of the destination node D. The RREQ packet is flooded
through the network and reaches all the nodes within the range of node A. Each node that
receives the RREQ packet caches the address of the source node A and retransmits the RREQ
packet to its neighboring nodes, until the packet reaches the destination node D.
Once node D receives the RREQ packet, it sends a Route Reply (RREP) packet back to node A.
The RREP packet contains the sequence of nodes that the packet should traverse to reach the
destination node D. Each intermediate node between node A and node D caches the sequence
When node A receives the RREP packet, it stores the sequence of nodes in its routing table
and starts sending data packets to node D using the same sequence of nodes. If there is a link
failure or a node failure, the DSR protocol initiates a route discovery process again to find an
alternative route.
Overall, DSR is a popular routing protocol in ad-hoc networks because it is simple, scalable,
and efficient in terms of bandwidth usage. However, it can suffer from high overhead due to
the route discovery process and can be vulnerable to attacks such as packet dropping and node
impersonation.
Route Discovery: This phase determines the most optimal path for the transmission of
data packets between the source and the destination mobile nodes.
Route Maintenance: This phase performs the maintenance work of the route as the
topology in the mobile ad-hoc network is dynamic in nature and hence, there are many cases of
link breakage resulting in the network failure between the mobile nodes.
b. Ad-Hoc On Demand Vector Routing protocol (AODV): Ad-Hoc On Demand Distance Vector
(AODV) is a reactive routing protocol commonly used in wireless ad hoc networks. AODV works by
establishing a route between two nodes only when there is a demand for communication between them.
Suppose there is a group of mobile devices in a wireless ad hoc network, and two devices, A and
B, want to communicate with each other. Device A broadcasts a route request (RREQ) message
to all of its neighboring devices to find a route to device B. The RREQ message contains the
When a device receives the RREQ message, it checks if it has a route to the destination. If it
does, it sends a route reply (RREP) message back to the source device A. If it does not have a
route to the destination, it broadcasts the RREQ message to all of its neighboring devices.
When the RREQ message reaches device B, it sends a RREP message back to device A. The RREP
message contains the destination address, source address, and the sequence number. The RREP
If the route between devices A and B is not used for a certain period of time, it is removed from
the routing table. If device A wants to communicate with device B again, it sends another RREQ
AODV is a widely used protocol in mobile ad hoc networks (MANETs), which are commonly used
in military operations, disaster response, and search and rescue missions. AODV is preferred in
MANETs because it reduces the overhead of maintaining a routing table, which can become very
Advantage
Disadvantage
Delayed route discovery: require route discovery, which can result in longer delays in finding
a route to the destination node.
Increased overhead: Reactive protocols generate a large amount of control traffic in the
network during route discovery and maintenance, leading to increased overhead.
Route maintenance: requires frequent route discoveries and maintenance, which can cause
high energy consumption in mobile devices.
3. Hybrid Routing protocol: It basically combines the advantages of both, reactive and pro-
active routing protocols. These protocols are adaptive in nature and adapts according to the zone
and position of the source and destination mobile nodes. One of the most popular hybrid routing
The whole network is divided into different zones and then the position of source and destination
mobile node is observed. If the source and destination mobile nodes are present in the same zone,
then proactive routing is used for the transmission of the data packets between them. And if the
source and destination mobile nodes are present in different zones, then reactive routing is used
Advantage:
1. Efficient use of network resources: Hybrid routing protocol uses proactive routing within
a predefined area or zone and reactive routing outside the zone. This approach helps to
2. Scalability: The hybrid protocol allows for the creation of multiple zones in a network, each
with its own proactive protocol. This feature enables the network to scale more effectively
3. Faster response time: when a node needs to find a new route, as the route discovery
5. Security: as it does not broadcast routing information to the entire network, -> reducing
Disadvantage:
2. Overhead: can lead to increased overhead due to the need for maintaining both routing
tables.
4. Scalability: Hybrid routing protocols may face scalability issues as the network grows
larger due to the need for maintaining both pro-active and reactive components.
Characteristics of MANET Routing Protocol:
To avoid the problems with routing in MANET, routing protocols should have following
characteristics:
TAXANOMY OF MANET
A routing protocol is a set of rules and procedures that govern how data packets are
A routing protocol is used to determine the optimal path for data transmission from a
source node to a destination node based on various factors such as network topology,
Routing protocols are commonly used in large-scale networks such as the Internet, where
data needs to be transmitted across multiple nodes before reaching its destination.
TYPES
Position-based routing protocols are a type of wireless ad hoc network routing protocol that
uses the geographical location of nodes to route data packets. In position-based routing
protocols, nodes maintain their position information using GPS, or other positioning
When a node wants to send a packet to a destination node, it first determines the location of
the destination node and then forwards the packet to the nearest neighbor node that is closer
to the destination node. This process continues until the packet reaches the destination node.
One example of a Geographic Routing Protocol is the Greedy Perimeter Stateless Routing
(GPSR) protocol, which is used in wireless sensor networks. GPSR uses the location information
of nodes to forward packets in a greedy manner towards the destination node.
The Distance Routing Effect Algorithm for Mobility (DREAM) is a type of routing protocol used in
mobile ad-hoc networks (MANETs) to forward packets based on the distance and mobility of the nodes.
This protocol works by considering both the distance between nodes and their mobility when forwarding
packets.
When a node wants to send a packet to a destination node, it first determines the distance and
direction to the destination node. It then considers the mobility of neighboring nodes and selects the
one that is likely to remain in the vicinity of the destination node for the longest time. This process
continues until the packet reaches the destination node.
One example of a network that could use DREAM is a group of emergency responders in a
disaster area. As they move around the area, their devices would use DREAM to maintain reliable
communication by dynamically adapting to changes in the network topology caused by the responders'
mobility.
Advantages:
4. Better performance in certain scenarios: where nodes have a fixed location, such as
wireless sensor networks and vehicular ad hoc networks.
Disadvantages:
1. Vulnerability to attacks: Since the routing decisions are based on the location
information, attackers can easily manipulate the location information to misdirect the
traffic.
2. Overhead: require a lot of overhead to maintain location information, which can lead to
high energy consumption and increased network congestion.
3. Localization error: Positioning errors and inaccuracies in location estimation can lead to
routing errors and inefficient use of network resources.
Signal Stability Routing (SSR) is a routing protocol used in wireless sensor networks to improve
the reliability of data transmission by prioritizing routes with higher link stability. In SSR, each
node measures the link quality between itself and its neighbors and assigns a metric based on
the stability of the link. Nodes with more stable links are preferred as forwarding nodes to
For example, in an environmental monitoring system, sensors deployed in remote areas collect
data about temperature, humidity, and air quality. These sensors use SSR to forward data to a
base station for analysis. SSR ensures that the data is transmitted reliably over long distances,
even in challenging environments, and enables efficient use of the network resources by
Power Aware Routing (PAR) is a routing protocol used in wireless sensor networks that considers
the energy consumption of each node when forwarding packets. PAR aims to prolong the lifetime
of the network by minimizing the energy consumption of nodes and maintaining a balanced
For example, in a smart home automation system, various sensors and devices communicate with
each other wirelessly to control lighting, temperature, and other home appliances. PAR is used
to ensure that data is transmitted using the most energy-efficient routes, extending the
battery life of the devices and reducing the need for frequent battery replacements.
Associativity-Based Routing (ABR) is a type of routing protocol used in wireless networks that
takes into account the node's association with other nodes when forwarding packets. In ABR,
nodes with similar characteristics, such as transmission power and signal strength, are grouped
direction and at a similar speed are considered to be in the same association group. ABR is used
to forward messages between vehicles within the same association group, resulting in reduced
ABR achieves this by creating a forwarding table that identifies the association group to which the
destination node belongs. When a node wants to send a packet, it first looks up the forwarding table and
selects a node within the same association group as the destination node. This approach reduces the number
of hops required to reach the destination, resulting in lower latency and improved network efficiency.
d. QoS Routing
Quality of Service (QoS) routing is a type of routing protocol used in computer networks that takes into
account the requirements of the network traffic in terms of bandwidth, delay, and packet loss. QoS
routing ensures that the network traffic is transmitted through the most appropriate path, based on its
QoS requirements.
For example, in a real-time multimedia streaming application, QoS routing is used to ensure
that the video and audio packets are transmitted through a path that can provide
sufficient bandwidth and low latency. QoS routing achieves this by selecting the path that
meets the QoS requirements of the traffic, such as low delay and high bandwidth, and
avoids paths that are congested or have high packet loss rates. This results in improved
Data Transmission
medium to one or more devices. It allows the transmission and communication of devices in
Data transmission can either be analogue or digital, but is mostly earmarked for sending and
receiving digital data. As such, data transmission is also referred to as digital transmission or
digital communications.
It works when a device aims to transmit a data object or file to one or multiple recipient
devices. The digital data comes from the source device in the form of digital bit streams. These
data streams are positioned over a communication medium for transmission to the destination
Aside from external communication, data transmission may be done internally, between different
parts of the same device. The sending of data to a processor from the random access memory
Transmission Modes
Transmission mode means transferring data between two devices. It is also known as a
communication mode. Buses and networks are designed to allow communication to occur between
only receive.
The simplex mode can use the entire capacity of the channel to send data in one direction.
Example: Keyboard and traditional monitors. The keyboard can only introduce input, the monitor
Advantages:
There is no need for coordination between the transmitting and receiving devices,
which simplifies the communication process.
Disadvantages:
Simplex mode is not suitable for applications that require bidirectional communication.
2. Half-Duplex Mode –
In half-duplex mode, each station can both transmit and receive, but not at the same time.
When one device is sending, the other can only receive, and vice versa. The half-duplex mode is
used in cases where there is no need for communication in both directions at the same time.
The entire capacity of the channel can be utilized for each direction.
Example: Walkie-talkie in which message is sent one at a time and messages are sent in both
directions.
It is a more efficient mode of communication than simplex mode, as the channel can be
Half-duplex mode is less expensive than full-duplex mode, as it only requires one
communication channel.
Disadvantages:
Half-duplex mode is less reliable than Full-Duplex mode, as both devices cannot
There is a delay between transmission and reception, which can cause problems in some
applications.
3. Full-Duplex Mode –
In full-duplex mode, both stations can transmit and receive simultaneously. In full_duplex mode,
signals going in one direction share the capacity of the link with signals going in another
Either the link must contain two physically separate transmission paths, one for sending
Full-duplex mode is used when communication in both directions is required all the time. The
capacity of the channel, however, must be divided between the two directions.
telephone line, through which both can talk and listen at the same time.
Advantages:
Full-duplex mode allows for simultaneous bidirectional communication, which is ideal for
It is the most efficient mode of communication, as both devices can transmit and
a high level of reliability and accuracy, as there is no need for error correction
Disadvantages:
Full-duplex mode is the most expensive mode, as it requires two communication channels.
It is more complex than simplex and half-duplex modes, as it requires two physically
A Broadcast Storm is basically a situation when an abruptly large number of broadcast packets
in a very small amount of time. Due to the broadcast storm, the network quality degrades
This condition can lead to consume all the network, so, it will be unable to transfer normal
amount of traffic at that time. A Broadcast Packet that leads to such situation is often called
Chernobyl Packet.
Broadcast
Multicast
Unicast
A Broadcast packet uses Air as a medium to transfer the broadcast to any listener at the same
frequency. A broadcast packet uses the destination header in the following ways :
When a user wants to connect to a specific hub of network but, by mistake, it gets
connected to another switch port. This will catch all the frames and keep them within the
loop. For Example – When the computer connects to port while being connected to
Improper VLAN configuration settings can create a loop that finally leads to a broadcast
storm.
Too big Broadcast Domain – If the Broadcast is too big, then the amount of traffic in a
domain is directly proportional to size of the broadcast domain, i.e. the number hosts in a
L2 VLAN or L3 subnet.
Broadcast storms can occur when a broadcast or multicast packet is sent to all nodes in a
network, and some nodes forward the packet to all other nodes, causing a chain reaction
of packet forwarding.
This can result in a large number of duplicate packets, which can quickly consume network
High Volume of requests for IP address via DHCP – DHCP is the most easiest way for
a networking host to get the IP address from a network controller. DHCP uses either
broadcast or unicast packets as their medium. For Example – when the network is back
online after a outage, all the members on that network try to obtain the IP address.
Anti-virus Firewalls can be used to detect and remove malicious and intentionally induced
The more often ARP tables are cleared, the more often broadcast requests occur.
Storm protocols and equivalent controlling techniques allow to limit the broadcast
packets.
Disable broadcasts on Layer 3 devices. If a storm originated from the WAN, then
Splitting the broadcast domain will help in diverting the broadcast traffic. By creating a
new VLAN network, we can divert more than half of the traffic to the other network. It
Regular maintenance of Switches ensure that they don’t face any hardware failure.
Checking for loops in switches help to upstream the unmanaged switch. The unmanaged
switches in order to respond to the broadcasts sometimes flood the network with a lot of
unnecessary traffic.
BROADCASTING:
can save time and reduce network traffic compared to sending individual packets to each
recipient.
Broadcasting can be used for tasks such as network discovery, where a packet is sent to
all nodes in a network to identify and map network topology and devices.
Disadvantages of Broadcasting
1. Increased Network Traffic: Broadcasting sends packets to all nodes in a network, which
can increase the amount of traffic on the network. This can cause congestion and slow
2. Wasted Resources: Broadcasting can also waste resources, such as bandwidth and
processing power, by sending packets to nodes that don't need or use the information
being broadcasted.
3. Security Risks: Broadcasting can also be a security risk since it can potentially expose
broadcasted packets.
4. Inefficient Routing: Broadcast packets can also cause routing inefficiencies since they
are sent to all nodes in a network, including nodes that are not interested in the
5. Network Partitioning: In some cases, broadcasting can also lead to network partitioning,
where certain segments of the network become isolated and unable to communicate with
Types of Broadcasting
1. Unicast Broadcasting:
Advantages:
Targeted: Unicast broadcasting can be useful when a specific node needs to receive a packet
Disadvantages:
simultaneously.
Unscalable: If many nodes need to receive the same information, unicast broadcasting may
Limited broadcasting is a communication method where a message is sent from one sender to all
devices on a single network segment or LAN. It is a more efficient way to send information to
multiple devices on a LAN compared to unicast broadcasting, which would require sending a
Advantages:
Efficient: Limited broadcasting can be a more efficient way to send a packet to all nodes on
a LAN compared to unicast broadcasting, which would require sending a separate packet to
each node.
Disadvantages:
Security Risks: Since limited broadcasting sends packets to all nodes on a LAN, it can
potentially expose sensitive information to unauthorized users who may intercept the
packets.
Network Congestion: If many packets are sent using limited broadcasting, it can cause
Limited Reach: Limited broadcasting only sends packets to nodes on a single LAN or network
3. directed broadcasting:
Directed broadcasting is a communication method where a message is sent from one sender to
targeted way to send information to multiple devices on a network segment, allowing for more
efficient communication.
Advantages:
Targeted: Directed broadcasting can be used to send packets to all nodes on a specific
information.
Efficient: Directed broadcasting can be a more efficient way to send packets to all nodes
Disadvantages:
Security Risks:
Network Congestion:
Limited Reach:
Multicasting
Multicasting works in similar to Broadcasting, but in Multicasting, the information is sent to the
targeted or specific members of the network. This task can be accomplished by transmitting
individual copies to each user or node present in the network, but sending individual copies to
each user is inefficient and might increase the network latency. To overcome these
shortcomings, multicasting allows a single transmission that can be split up among the multiple
Applications :
Advantages
Disadvantages:
Challenges:
1. Packet Loss: Ad hoc networks are prone to packet loss due to interference and mobility,
which can lead to degraded TCP performance.
3. Congestion: If too many nodes simultaneously send packets, it can cause network
congestion and slow down network performance.
4. Quality of Service (QoS): Providing QoS guarantees for TCP over ad hoc networks is
challenging due to the unpredictable network conditions.
Solutions:
2. Congestion Control: TCP uses congestion control mechanisms to avoid network congestion.
By using congestion control algorithms, the network can regulate the flow of packets and
prevent network congestion.
3. Error Control: In ad hoc networks, packet loss is a common problem. To address this
issue, error control mechanisms can be used, such as forward error correction and
retransmission.
4. Quality of Service (QoS): Providing QoS guarantees for TCP over ad hoc networks is
challenging due to the unpredictable network conditions. However, by using QoS-aware
routing and transport protocols, the network can prioritize traffic and provide better
service to high-priority applications.
In conclusion, multicasting TCP over ad hoc networks is a challenging task due to the dynamic
nature of these networks. However, by using cross-layer design, congestion control, error control,
and QoS mechanisms, the performance of TCP over ad hoc networks can be improved, and reliable
and efficient multicast communication can be achieved.
Geocasting
Geocasting is a method of data communication that targets specific geographic regions. It
allows data to be delivered only to a select group of recipients who are within a defined
geographic boundary, instead of broadcasting to all users. This approach reduces network
traffic and improves the efficiency of data transmission in certain applications, such as
4. Improved reliability by reducing the risk of data loss due to network congestion or
overload
6. Reduced power consumption and longer battery life for mobile devices.
data transmission over mobile ad hoc networks (MANETs). It transmits data packets to specific
geographical areas, reducing the number of transmissions and increasing network efficiency.
However, there are challenges in implementing the protocol, including routing efficiency,
Challenges + solutions
1. Scalability: Researchers have proposed hierarchical geocasting schemes that use a multi-
level tree structure to reduce the number of nodes involved in communication. This can
2. Mobility: Solutions have been proposed that use location prediction and tracking
techniques to maintain stable geocast groups even in the presence of node mobility.
used to manage bandwidth and ensure that geocasting does not affect the performance
of other applications.
routing and directional antennas to establish and maintain geocast routes even in complex
5. Energy efficiency: Various energy-efficient protocols have been proposed that use
techniques such as duty cycling and opportunistic routing to reduce energy consumption
during geocasting.
6. Security: Solutions such as secure multicast and encryption can be used to ensure secure
TCP Protocol
TCP stands for Transmission Control Protocol. It is a transport layer protocol that facilitates
that means it establishes the connection prior to the communication that occurs between the
computing devices in a network. This protocol is used with an IP protocol, so together, they are
referred to as a TCP/IP.
The main functionality of the TCP is to take the data from the application layer. Then it divides
the data into a several packets, provides numbering to these packets, and finally transmits
The TCP, on the other side, will reassemble the packets and transmits them to the application
layer. As we know that TCP is a connection-oriented protocol, so the connection will remain
established until the communication is not completed between the sender and the receiver.
TCP is a transport layer protocol as it is used in transmitting the data from the sender to the
receiver.
o Reliable
TCP is a reliable protocol as it follows the flow and error control mechanism. It also supports
the acknowledgment mechanism, which checks the state and sound arrival of the data. In the
the sender so that the sender can get to know whether the data packet has been received or
needs to resend.
This protocol ensures that the data reaches the intended receiver in the same order in which it
is sent. It orders and numbers each segment so that the TCP layer on the destination side can
o Connection-oriented
It is a connection-oriented service that means the data exchange occurs only after the
connection establishment. When the data transfer is completed, then the connection will get
terminated.
o Full duplex
It is a full-duplex means that the data can transfer in both directions at the same time.
o Stream-oriented
TCP is a stream-oriented protocol as it allows the sender to send the data in the form of a
stream of bytes and also allows the receiver to accept the data in the form of a stream of
bytes. TCP creates an environment in which both the sender and receiver are connected by an
imaginary tube known as a virtual circuit. This virtual circuit carries the stream of bytes across
the internet.
In the layered architecture of a network model, the whole task is divided into smaller tasks.
Each task is assigned to a particular layer that processes the task. In the TCP/IP model, five
layers are application layer, transport layer, network layer, data link layer, and physical layer.
The transport layer has a critical role in providing end-to-end communication to the directly
application processes. It creates 65,000 ports so that the multiple applications can be accessed
at the same time. It takes the data from the upper layer, and it divides the data into smaller
Working of TCP
In TCP, the connection is established by using three-way handshaking. The client sends the
segment with its sequence number. The server, in return, sends its segment with its own
sequence number as well as the acknowledgement sequence, which is one more than the client
sequence number. When the client receives the acknowledgment of its segment, then it sends
the acknowledgment to the server. In this way, the connection is established between the client
Advantages of TCP
delivery of data packets. If the data packet is lost across the network, then the TCP will
o It provides error detection by using checksum and error control by using Go Back or ARP
protocol.
Disadvantage of TCP
It increases a large amount of overhead as each segment gets its own TCP header, so
o Source port: It defines the port of the application, which is sending the data. So, this
o Destination port: It defines the port of the application on the receiving side. So, this
o Sequence number: This field contains the sequence number of data bytes in a particular
session.
o Acknowledgment number: When the ACK flag is set, then this contains the next
sequence number of the data byte and works as an acknowledgment for the previous data
received. For example, if the receiver receives the segment number 'x', then it responds
o HLEN: It specifies the length of the header indicated by the 4-byte words in the
header. The size of the header lies between 20 and 60 bytes. Therefore, the value of
o Reserved: It is a 4-bit field reserved for future use, and by default, all are set to zero.
o Flags
urgently.
2. ACK: If the ACK is set to 0, then it means that the data packet does not contain
an acknowledgment.
3. PSH: If this field is set, then it requests the receiving device to push the data to
6. FIN: It is used to release a connection, and no further data exchange will happen.
o Window size
It is a 16-bit field. It contains the size of data that the receiver can accept. This field is
used for the flow control between the sender and receiver and also determines the
amount of buffer allocated by the receiver for a segment. The value of this field is
o Checksum
It is a 16-bit field. This field is optional in UDP, but in the case of TCP/IP, this field is
mandatory.
o Urgent pointer
It is a pointer that points to the urgent data byte if the URG flag is set to 1. It defines a
value that will be added to the sequence number to get the sequence number of the last
urgent byte.
o Options
It provides additional options. The optional field is represented in 32-bits. If this field
contains the data less than 32-bit, then padding is required to obtain the remaining bits.
TCP (Transmission Control Protocol) over Ad hoc networks face several challenges that can lead
1. Unreliable wireless links: Ad hoc networks are usually deployed in harsh environments,
where wireless links are unreliable and prone to frequent link failures, packet losses, and
interference. This can result in TCP congestion control mechanisms that cannot properly
2. Limited bandwidth: Ad hoc networks often have limited bandwidth resources, and TCP's
topology, where nodes move arbitrarily and can join or leave the network at any time. This
results in frequent changes in network topology, which can cause routing and congestion
1. Reliable link layer protocols: Using reliable link layer protocols such as the IEEE 802.11
the proposed mechanisms include TCP Westwood, TCP Vegas, and TCP New Reno.
3. Dynamic routing protocols: Ad hoc networks require dynamic routing protocols that can
adapt to changes in the network topology. Some of the proposed protocols include Ad hoc
4. Multi-path routing: Multi-path routing can be used to improve the reliability and
efficiency of data delivery in ad hoc networks. This involves the use of multiple paths
between source and destination nodes to increase data delivery rates and reduce the
5. Quality of Service (QoS) support: QoS mechanisms can be used to provide better service
differentiation for different types of traffic and ensure that critical data is delivered
TCP in MANETs
TCP (Transmission Control Protocol) is a widely used protocol for data transmission in computer
networks. However, TCP faces several challenges when used in Mobile Ad Hoc Networks
(MANETs). MANETs are wireless networks without a fixed infrastructure, where nodes
communicate with each other using radio waves. The challenges of using TCP in MANETs include:
1. Mobility: In MANETs, nodes can move around, leading to frequent topology changes.
These changes can cause problems in TCP such as increased delays and packet loss.
2. Limited bandwidth: MANETs have limited bandwidth compared to wired networks, which
can cause TCP congestion control algorithms to slow down data transfer unnecessarily.
3. Error-prone channels: Wireless channels can be noisy and have a high packet loss rate,
which can lead to TCP congestion control algorithms reacting to the loss by slowing down
MANETs, including:
1. TCP variants: Several TCP variants have been proposed for MANETs, including TCP-PR,
the protocol stack to optimize performance. For example, sharing information about node
mobility with TCP can help it make better congestion control decisions.
3. Buffer management: Managing the buffer size of the nodes can help to reduce packet
4. Power-aware routing: Power-aware routing protocols can help to conserve battery power
Overall, using TCP in MANETs requires careful consideration of the unique characteristics of
these networks, and the development of specific solutions to address the challenges they pose.
UNIT – 3
a large number of wireless sensors in an ad-hoc manner that is used to monitor the system,
Sensor nodes are used in WSN with the onboard processor that manages and monitors the
environment in a particular area. They are connected to the Base Station which acts as a
Base Station in a WSN System is connected through the Internet to share data.
WSN can be used for processing, analysis, storage, and mining of the data.
Applications of WSN:
like temperature, humidity, air quality, water quality, soil moisture, and other
environmental parameters. The data collected by the WSNs is used for environmental
2. Healthcare Monitoring: WSNs are used to monitor the vital signs of patients like heart
rate, blood pressure, and other physiological parameters. This helps in the early
processes like temperature, pressure, and other parameters. This helps in improving the
4. Agriculture: WSNs are used to monitor soil moisture, temperature, and other
environmental parameters in agriculture. This helps in the efficient use of water and
5. Military and Defense: WSNs are used for battlefield surveillance, target tracking, and
other military applications. WSNs can also be used for border security and other
defense-related applications.
6. Home Automation: WSNs can be used for home automation applications like controlling
lighting, temperature, and other appliances. This helps in improving the convenience and
7. Structural Health Monitoring: WSNs can be used to monitor the health of structures
like bridges, dams, and buildings. This helps in early detection of any structural damage
Challenges of WSN:
Limited power and energy: WSNs are typically composed of battery-powered sensors
that have limited energy resources. This makes it challenging to ensure that the network
long periods of time without the need for frequent battery replacements.
Limited processing and storage capabilities: Sensor nodes in a WSN are typically small
and have limited processing and storage capabilities. This makes it difficult to perform
Heterogeneity: WSNs often consist of a variety of different sensor types and nodes
with different capabilities. This makes it challenging to ensure that the network can
efficiently.
Security: WSNs are vulnerable to various types of attacks, such as eavesdropping,
jamming, and spoofing. Ensuring the security of the network and the data it collects is a
major challenge.
Scalability: WSNs often need to be able to support a large number of sensor nodes and
handle large amounts of data. Ensuring that the network can scale to meet these demands
is a significant
challenge.
interference from other wireless devices. This can make it difficult to ensure reliable
Reliability: WSNs are often used in critical applications, such as monitoring the
environment or controlling industrial processes. Ensuring that the network is reliable and
Components of WSN:
1. Sensors:
Sensors in WSN are used to capture the environmental variables and which is used for
2. Radio Nodes:
It is used to receive the data produced by the Sensors and sends it to the WLAN access
It receives the data which is sent by the Radio nodes wirelessly, generally through the
internet.
4. Evaluation Software:
The data received by the WLAN Access Point is processed by a software called as
Evaluation Software for presenting the report to the users for further processing of the
data which can be used for processing, analysis, storage, and mining of the data.
Low cost: WSNs consist of small, low-cost sensors that are easy to deploy, making them a cost-
Wireless communication: WSNs eliminate the need for wired connections, which can be costly
and difficult to install. Wireless communication also enables flexible deployment and
Energy efficiency: WSNs use low-power devices and protocols to conserve energy, enabling
Scalability: WSNs can be scaled up or down easily by adding or removing sensors, making them
Limited range: The range of wireless communication in WSNs is limited, which can be a
challenge for large-scale deployments or in environments with obstacles that obstruct radio
signals.
Limited processing power: WSNs use low-power devices, which may have limited processing
power and memory, making it difficult to perform complex computations or support advanced
applications.
Data security: WSNs are vulnerable to security threats, such as eavesdropping, tampering, and
denial of service attacks, which can compromise the confidentiality, integrity, and availability of
data.
Interference: Wireless communication in WSNs can be susceptible to interference from other
wireless devices or radio signals, which can degrade the quality of data transmission.
Deployment challenges: Deploying WSNs can be challenging due to the need for proper sensor
placement, power management, and network configuration, which can require significant time
and resources.
WSN definition
These networks are static WSNs because all of the sensor nodes in various applications can be
set without movement. In many applications, all sensor nodes are connected without moving,
resulting in static networks. Mobile sensor nodes, also known as mobile networks, are used in
many applications, including biological systems. Mobile sensor nodes are required in some
applications, particularly in biological systems. Animal monitoring is the best example of a mobile
network. This is referred to as a mobile network. Animal monitoring is a type of mobile network.
The sensor node position is calculated and fixed in deterministic wireless sensor networks. The
sensor node arrangement in a deterministic network can be fixed and calculated. Pre-planned
Sensor node deployment is possible in a limited number of applications. Because of factors such
as harsh environments or hostile operating conditions, determining the position of sensor nodes
is not possible. Such networks are non-deterministic and necessitate a complex system.
In single base station WSNs, only one base station is used, which is located near the sensor
node region. The base station can facilitate communication between sensor nodes. All nodes
communicate with this base station; in the case of multi-base station WSNs, more than one
base station is used, and a sensor node can transfer data to the closest base station. Multiple
base stations are used in a multi-base station network, and a sensor node is used to move data
Base stations, like sensor nodes, are either mobile or static. As with sensor nodes, WSN base
stations are frequently either static or mobile. A static base station has a fixed location, which
The static type base station, as the name implies, maintains a stable position close to the
sensing area, whereas the mobile type base station moves in the sensor region to balance the
load on the sensor nodes. Because the load on sensor nodes is balanced, a mobile base station
The sensor nodes in single-hop WSNs are directly connected to the base station. The
arrangement of sensor nodes in a single-hop network can be done directly toward the base
station, whereas in a multi-hop network, both the cluster heads and peer nodes are used to
transmit data to reduce energy consumption. In the case of multi-hop WSNs, peer nodes and
cluster heads are used to relay information in order to reduce energy consumption.
Sensor networks cannot organize themselves in a network and consider a control unit to gather
data in non-Self Configurable WSNs. Many WSNs allow sensor nodes to organize and maintain
In the case of homogeneous WSNs, all sensor nodes consume the same amount of energy, have
the same storage capabilities, and have the same computational power. In the case of
heterogeneous WSNs, some sensor nodes require more computational power and energy than
others, and the processing and communication tasks are distributed accordingly. In the case of
a heterogeneous network, some sensor nodes require more computational power and energy than
There are 2 types of architecture used in WSN: Layered Network Architecture, and Clustered
Layered network architecture refers to the organization of network components and their
functions into distinct layers or levels, where each layer is responsible for a specific set of
tasks. The most commonly used layered architecture is the OSI (Open Systems
Interconnection) model, which consists of seven layers. The layers in the OSI model are:
Physical Layer: This layer is responsible for transmitting raw bit streams over a physical
medium, such as copper wires or fiber optic cables. It defines the physical characteristics of
the network, such as voltage levels, cable types, and transmission rates.
Data Link Layer: This layer is responsible for the reliable transmission of data between two
adjacent nodes on a network. It is responsible for error detection and correction, flow control,
and framing.
congestion control.
Session Layer: This layer establishes, maintains, and terminates sessions between applications
Application Layer: This layer provides network services to applications running on the network,
The layered architecture enables modular design and simplifies network management by
separating the functions of different layers. It also allows for easier interoperability between
different network components and facilitates the development of new network technologies and
protocols.
In Clustered Network Architecture, Sensor Nodes autonomously clubs into groups called
clusters. It is based on the Leach Protocol which makes use of clusters. Leach Protocol stands
It is a distributed algorithm for organizing the sensor nodes into groups called clusters.
The cluster head nodes in each of the autonomously formed clusters create the Time-division
It makes use of the concept called Data Fusion which makes it energy efficient.
Clustered Network Architecture is a very useful sensor network because of the property of
Data Fusion. Inside each cluster, each node communicate with the cluster head to gather the
information. All the clusters which are formed share their gathered information to the base
station. The cluster formation and selection of cluster head inside each cluster is an
Layered Network
Physical Layer
Physical Layer is the bottom-most layer in the Open System Interconnection (OSI)
It consists of various network components such as power plugs, connectors, receivers, cable
types, etc.
Physical Layer sends data bits from one device(s) (like a computer) to another device(s).
Physical Layer defines the types of encoding (that is how the 0’s and 1’s are encoded in a
signal).
Physical Layer is responsible for the communication of the unstructured raw data streams
1. Signal Generation: The physical layer generates the actual signals that are transmitted
over the communication channel. It encodes the digital signals into analog signals
2. Signal Transmission: The physical layer transmits the signal over the communication
channel. It defines the transmission medium, transmission rate, and signal modulation
scheme.
3. Signal Reception: The physical layer receives the signals from the communication channel
4. Signal Amplification: The physical layer amplifies the weak signals received from the
5. Signal Equalization: The physical layer equalizes the distorted signals to remove any
6. Signal Multiplexing: The physical layer is responsible for the multiplexing of signals,
which enables multiple signals to be transmitted over the same communication channel
simultaneously.
7. Bit Synchronization: The physical layer ensures that the transmitter and receiver are
8. Channel Coding and Decoding: The physical layer provides channel coding and decoding
9. Media Access Control: The physical layer also provides media access control, which
1. Guided Media: It is also called wired media and it includes copper wires, coaxial cables,
and fiber optic cables. In guided media, signals are transmitted through a physical
In Twisted Pair Cable, the wires are twisted to reduce cross talk and electrical
Easier to install
These wires easily pick noise signal. This can be annoying, since it leads to high error rate, on
line length extending 100 metres.
transmit data at higher rates. Coax has a central core conductor. The
a plastic cover.
LAN generally uses Baseband Coaxial cable. It is the 50 ohm coaxial cable used for digital
transmission. The cable comes with a power of transmitting a single signal at quite high
This cable transmits many simultaneous signals and that too using different frequency. It
covers more area than the Baseband coaxial cable and can run nearly 100km, but requires
Fiber-optic cable, also known as Optical Fibre provides high quality transmission of signals at
high speed.
In optical fiber, information is transmitted by semiconductor lasers in the form of light. The
source has a converter, which converts electrical signals into light waves. The light waves get
transmitted over the fiber. The destination also has a converter, which converts the light
waves back to electric signals. The signal is sent to the receiver after amplification.
Advantages
It you want high quality transmission of signals at very high speed, use fiber-optic cable .
2. Unguided Media: It is also called wireless media and it includes radio waves, microwave,
and infrared. In unguided media, signals are transmitted through the air. Radio waves are
communication.
The selection of transmission media depends on various factors like the distance between the
communicating devices, the required bandwidth, the level of security, and cost.
Advantages of Unguided/ Unbounded Transmission Media
Even Gigantic buildings and mountains will not be able to stop wireless communication.
Radio Transmission
and receiver.
Radio communication has eight ranges, also called bands, and all regulated by government
authorities.
HF: High Frequency for long distance ship and aircraft communication.
Microwave transmission use lower gigahertz frequency of the electronic magnetic spectrum.
They require line-of-sight transmission, since they do not follow the curvature of earth. The
signals in Microwave transmission propagates in a single direction at a time. The following are
Terrestrial Microwave
Satellite Communication
Terrestrial Microwave
Parabolic Dish Antenna: The parabolic dish antenna is based on the line of symmetry. Lines
parallel to the line of sight gets reflect off the curves at angles
like a funnel as you can in the below figure. The waves are
beams. The horn’s scooped shape collects the incoming (receiving) transmission. The deflection
Satellite Communication
Satellite microwave systems are placed in outerspace like a microwave relay station. The
satellites are launched into the outer space by rockets or space shuttles.
Satellites are positioned 3600km above the equater. The orbit speed matches the rotation
the earth.
Physical Topologies :
1. Bus Topology: In this topology, all devices in the network are connected to a common
communication line called a bus. Data travels along the bus, and each device on the bus can
receive the data, but only the device intended to receive the data will process it.
2. Star Topology: In this topology, each device is connected to a central hub or switch. Data
travels from the sending device to the hub or switch, which then forwards the data to the
3. Ring Topology: In this topology, devices are connected in a circular ring, with each device
connected to the next device in the ring. Data travels around the ring until it reaches the
4. Mesh Topology: In this topology, each device is connected to every other device in the
network. Data can travel along multiple paths to reach its destination, making the network
highly fault-tolerant.
EXAMPLE
An example of the physical layer is the use of Ethernet cables to connect devices in a local area
network (LAN). The physical layer specifies the transmission medium, such as copper or fiber
optic cables, and the electrical and mechanical specifications for transmitting data between
devices.
MAC Layer
The medium access control (MAC) is a sublayer of the data link layer of the open system
interconnections (OSI) reference model for data transmission. It is responsible for flow
control and multiplexing for transmission medium. It controls the transmission of data packets
via remotely shared channels. It sends data over the network interface card.
The Open System Interconnections (OSI) model is a layered networking framework that
conceptualizes how communications should be done between heterogeneous systems. The data
link layer is the second lowest layer. It is divided into two sublayers −
It provides an abstraction of the physical layer to the LLC and upper layers of the OSI
network.
It is responsible for encapsulating frames so that they are suitable for transmission via
It resolves the addressing of source station as well as the destination station, or groups
of destination stations.
It performs multiple access resolutions when more than one data frame is to be
It generates the frame check sequences and thus contributes to protection against
transmission errors.
MAC Addresses
MAC Addresses are unique 48-bit hardware number of a computer, which is embedded into a
network card (known as a Network Interface Card during the time of manufacturing. MAC
Address is also known as the Physical Address of a network device. In IEEE 802 standard, Data
MAC address is used by the Media Access Control (MAC) sublayer of the Data-Link Layer. MAC
Address is worldwide unique since millions of network devices exist and we need to uniquely
identify each.
MAC Address is a 12-digit hexadecimal number (6-Byte binary number), which is mostly
represented by Colon-Hexadecimal notation. The First 6 digits (say 00:40:96) of the MAC
Address identify the manufacturer, called OUI (Organizational Unique Identifier). IEEE
Registration Authority Committee assigns these MAC prefixes to its registered vendors.
The rightmost six digits represent Network Interface Controller, which is assigned by the
manufacturer.
As discussed above, the 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:
Note: Colon-Hexadecimal notation is used by Linux OS and Period-separated Hexadecimal
1. Unicast: A Unicast-addressed frame is only sent out to the interface leading to a specific
NIC. If the LSB (least significant bit) of the first octet of an address is set to zero, the frame
is meant to reach only one receiving NIC. The MAC Address of the source machine is always
Unicast.
2. Multicast: The multicast address allows the source to send a frame to a group of devices. In
Layer-2 (Ethernet) Multicast address, the LSB (least significant bit) of the 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-
Data Link Layer). Ethernet frames with ones in all bits of the destination address (FF-FF-FF-
FF-FF-FF) are referred to as the broadcast addresses. Frames that are destined with MAC
address FF-FF-FF-FF-FF-FF will reach every computer belonging to that LAN segment.
An Ethernet MAC address is a 48-bit binary value expressed as 12 hexadecimal digits (4 bits
per hexadecimal digit). MAC addresses are in a flat structure and thus they are not routable on
the Internet. Serial interfaces do not use MAC addresses. It does NOT contain a network and
host portion with the address. It is used to deliver the frame to the destination device.
MAC addresses are used in LAN (Local Area Network) environments to identify devices
MAC addresses are burned into the hardware of a network interface card (NIC) and
cannot be changed, except in some rare cases where the manufacturer has provided a
The first 3 bytes of a MAC address represent the manufacturer ID, while the last 3
MAC addresses are often used in conjunction with ARP (Address Resolution Protocol) to
Some operating systems, such as Windows and Linux, allow you to view the MAC address
Overhead associated with error control and retransmission can reduce network
efficiency
In some cases, contention-based access methods can lead to excessive collisions and
reduced throughput
Limited scalability in some cases, particularly for larger networks with many nodes
examples of MAC protocols include Wi-Fi (802.11) for wireless LANs, and Bluetooth for short-
Link Layer
o In the OSI model, the data link layer is a 4th layer from the top and 2nd layer from the
bottom.
o The communication channel that connects the adjacent nodes is known as links, and in
order to move the datagram from source to the destination, the datagram must be moved
o The main responsibility of the Data Link Layer is to transfer the datagram across an
individual link.
o The Data link layer protocol defines the format of the packet exchanged across the
nodes as well as the actions such as Error detection, retransmission, flow control, and
random access.
o The Data Link Layer protocols are Ethernet, token ring, FDDI and PPP.
different link layer protocols on different links in a path. For example, the datagram is
within a Link layer frame before the transmission across the link. A frame consists of a
data field in which network layer datagram is inserted and a number of data fields. It
specifies the structure of the frame as well as a channel access protocol by which frame
o Reliable delivery: Data Link Layer provides a reliable delivery service, i.e., transmits the
network layer datagram without any error. A reliable delivery service is accomplished
with transmissions and acknowledgements. A data link layer mainly provides the reliable
delivery service over the links as they have higher error rates and they can be corrected
locally, link at which an error occurs rather than forcing to retransmit the data.
o Flow control: A receiving node can receive the frames at a faster rate than it can
process the frame. Without flow control, the receiver's buffer can overflow, and frames
can get lost. To overcome this problem, the data link layer uses the flow control to
prevent the sending node on one side of the link from overwhelming the receiving node on
o Error detection: Errors can be introduced by signal attenuation and noise. Data Link
Layer protocol provides a mechanism to detect one or more errors. This is achieved by
adding error detection bits in the frame and then receiving node can perform an error
check.
o Error correction: Error correction is similar to the Error detection, except that
receiving node not only detect the errors but also determine where the errors have
o Half-Duplex & Full-Duplex: In a Full-Duplex mode, both the nodes can transmit the
data at the same time. In a Half-Duplex mode, only one node can transmit the data at the
same time.
1. Framing: The data link layer divides the data received from the network layer into
2. Addressing: Each frame is assigned a unique source and destination address to ensure
3. Error control: The data link layer uses techniques such as checksums to detect and
4. Flow control: The data link layer ensures that data is transmitted at an appropriate rate,
avoiding congestion and ensuring that the receiver can handle the incoming data.
5. Access control: The data link layer is responsible for controlling access to the network by
6. Link management: The data link layer manages the establishment, maintenance, and
Overhead in terms of additional headers and trailers that increase the frame size
tampering.
Example:
One example of the data link layer in networking is the Ethernet protocol, which is commonly
used for wired LANs. It provides reliable, high-speed communication between devices on the
same physical network segment. Other examples include Wi-Fi (for wireless LANs), Bluetooth
(for short-range wireless communication between devices), and Frame Relay (for wide-area
networks).
Explain the qualities of service metrics that are used to evaluate the performance of the
network?
Quality of Service (QoS) metrics are used to evaluate the performance of a network in terms
of its ability to provide a certain level of service to its users. These metrics can vary depending
on the type of network and the specific requirements of the application. Some of the commonly
1. Bandwidth: Bandwidth is the amount of data that can be transmitted over a network in a
given time period. It is measured in bits per second (bps) or a multiple of bps.
2. Latency: Latency is the time delay between sending a request and receiving a response. It
3. Jitter: Jitter is the variation in latency between successive data packets. It is measured
5. Reliability: Reliability refers to the ability of a network to deliver data without errors or
loss of information.
6. Availability: Availability refers to the percentage of time that the network is operational
7. Throughput: Throughput is the amount of data that can be transmitted over a network in
a given time period. It is measured in bits per second (bps) or a multiple of bps.
8. Security: Security refers to the protection of data and information transmitted over the
These QoS metrics are essential in evaluating the performance of a network and ensuring that
Data retrieval in sensor networks involves the process of collecting data from the deployed
sensors in the network. The following steps are involved in data retrieval:
1. Data Collection: The first step involves collecting data from the sensors deployed in the
network. The data collected may include temperature, humidity, pressure, etc.
2. Data Aggregation: The collected data is then aggregated, where the data from multiple
sensors are combined to reduce redundancy and improve the efficiency of the network.
3. Data Compression: The aggregated data is then compressed to reduce the amount of data
that needs to be transmitted to the base station. This is important in sensor networks
4. Data Transmission: The compressed data is then transmitted to the base station through
a multi-hop route. This is achieved through the use of routing protocols that determine
5. Data Processing: The base station then processes the received data to extract the
required information. The processed data may be used for various applications such as
The performance of the network in data retrieval can be evaluated using the following
1. Reliability: This refers to the ability of the network to deliver data with a high degree of
2. Latency: This is the time taken for the data to travel from the source to the destination.
3. Throughput: This is the amount of data that can be transmitted through the network per
unit time.
4. Security: This refers to the ability of the network to protect against unauthorized
Routing Layer
Introduction
The routing protocol is a process to select suitable path for the data to travel from
source to destination.
The process encounters several difficulties while selecting the route, which depends
The data sensed by the sensor nodes in a wireless sensor network (WSN) is typically
forwarded to the base station that connects the sensor network with the other networks
(may be internet) where the data is collected, analyzed and some action is taken
accordingly.
In very small sensor networks where the base station and motes (sensor nodes) so close that
they can communicate directly with each other than this is single-hop communication but in
most WSN application the coverage area is so large that requires thousands of nodes to be
placed and this scenario requires multi-hop communication because most of the sensor nodes
are so far from the sink node (gateway) so that they cannot communicate directly with the base
station.
The single-hop communication is also called direct communication and multi-hop communication is
In multi-hop communication the sensor nodes not only produce and deliver their material but
also serve as a path for other sensor nodes towards the base station. The process of finding
suitable path from source node to destination node is called routing and this is the primary
One example of a routing layer is the Internet Protocol (IP) routing layer in the TCP/IP
protocol suite. This layer is responsible for forwarding packets of data between network
devices in a network. It uses routing algorithms to determine the best path for data to travel
through the network to reach its destination. Other examples of routing layers include Routing
Information Protocol (RIP), Open Shortest Path First (OSPF), Border Gateway Protocol (BGP),
1. Logical routing layer: This type of routing layer operates at the logical level and
is responsible for forwarding packets based on the network topology and the
updating routing tables, and determining the optimal path for packets to travel
Applications:
Advantages:
routers or routing domains. This can help to reduce the amount of traffic that needs to
be processed by individual routers and can make it easier to scale the network as it
grows.
2. Flexibility: provide a high degree of flexibility by allowing different routing policies to be
applied to different parts of the network. This can help to optimize network performance
3. Security: improve network security by enabling the creation of isolated routing domains
that can be secured independently of each other. This can help to prevent attacks from
spreading across the network and can make it easier to manage security policies.
possible to reduce the number of physical routers that are required, which can help to
Disadvantages:
1. Complex design: The logical routing layer can be complex to design and implement, which
2. Overhead: Adding an additional layer to the network can result in increased overhead,
3. Cost: The logical routing layer can require additional hardware and software, which can
4. Latency: The logical routing layer can introduce additional latency into the network, which
5. Maintenance: The logical routing layer can be more difficult to maintain and troubleshoot,
2. Physical routing layer: This type of routing layer operates at the physical level
and is responsible for forwarding packets based on the physical topology of the
and forwarding packets based on the MAC (Media Access Control) addresses of
the nodes.
Applications:
1. Ethernet: Ethernet is a widely used physical routing layer protocol used in local area
2. Wi-Fi: Wi-Fi is a popular physical routing layer protocol used for wireless communication
3. Bluetooth: Bluetooth is another wireless physical routing layer protocol commonly used
Advantages:
1. Efficiency: Physical routing layer ensures that data packets are transmitted through the
2. Scalability: Physical routing layer can scale up or down easily depending on the network's
3. Flexibility: Physical routing layer can support various wireless standards and frequencies,
4. Security: Physical routing layer can provide secure communication channels between nodes,
5. Lower Cost: Physical routing layer can be less expensive than logical routing layer due to its
simplicity and ease of implementation.
1. Limited flexibility: Since the physical layer is tied to the physical hardware of a network, it
can be difficult to make changes or modifications without physically altering the hardware.
2. Difficult troubleshooting: If there are issues with the physical layer, it can be difficult to
4. Limited scalability: Depending on the specific hardware being used, the physical layer may
have limited scalability, which could pose problems for networks that need to expand in the
future.
5. Vulnerability to physical damage: Since the physical layer is based on physical hardware
Advantages:
Disadvantages:
c. Greater potential for network failures and outages due to the complexity of the
routing layer
e. May require more powerful hardware to handle the increased traffic and
processing demands.
Transport Layer
The transport layer is an important component of the network protocol stack in wireless sensor
The main function of the transport layer is to ensure reliable and efficient data transfer
between the source and destination nodes. In this answer, we will discuss the transport layer in
WSNs in detail.
a. Reliable Data Delivery: One of the primary functions of the transport layer is to ensure
reliable data delivery. This is done by using mechanisms such as error checking and
retransmission to ensure that the data sent from the source node is correctly received by
b. Congestion Control: The transport layer also handles congestion control to prevent network
congestion and ensure efficient data transfer. This is done by using techniques such as flow
control and congestion avoidance to regulate the flow of data between nodes.
c. Quality of Service (QoS): The transport layer in WSNs also provides QoS guarantees for
different types of data traffic. For example, real-time data such as video and audio require
low latency and high bandwidth, while non-real-time data such as temperature readings can
UDP
o This type of protocol is used when reliability and security are less important than speed and
size.
o UDP is an end-to-end transport level protocol that adds transport-level addresses, checksum
error control, and length information to the data from the upper layer.
o Source port address: It defines the address of the application process that has
o Destination port address: It defines the address of the application process that will
o Total length: It defines the total length of the user datagram in bytes. It is a 16-bit
field.
Advantages of UDP:
Faster transmission since it does not require establishing and maintaining connections.
Better suited for real-time applications like gaming and video streaming, where some
packet loss is acceptable.
Disadvantages of UDP:
No error checking or retransmission of lost packets, which can result in unreliable data
transmission.
TCP
ends of the transmission. For creating the connection, TCP generates a virtual circuit
mechanisms.
collapse.
Provides a mechanism for establishing and terminating connections through the use of
simultaneously.
TCP Segment Format
o Source port address: It is used to define the address of the application program in a
o Destination port address: It is used to define the address of the application program in
o Sequence number: A stream of data is divided into two or more TCP segments. The 32-
bit sequence number field represents the position of the data in an original data stream.
from other communicating devices. If ACK field is set to 1, then it specifies the sequence
o Header Length (HLEN): It specifies the size of the TCP header in 32-bit words. The
minimum size of the header is 5 words, and the maximum size of the header is 15 words.
Therefore, the maximum size of the TCP header is 60 bytes, and the minimum size of the
o Control bits: Each bit of a control field functions individually and independently. A
control bit defines the use of a segment or serves as a validity check for other fields.
There are total six types of flags in control field:
o URG: The URG field indicates that the data in a segment is urgent.
o ACK: When ACK field is set, then it validates the acknowledgement number.
o PSH: The PSH field is used to inform the sender that higher throughput is needed so if
o RST: The reset bit is used to reset the TCP connection when there is any confusion
o FIN: The FIN field is used to inform the receiving TCP module that the sender has
Advantages of TCP:
Offers congestion control to prevent network congestion and ensure fair sharing of
network resources.
simultaneously.
Works well for applications that require high levels of reliability and accuracy, such as
Disadvantages of TCP:
Can be slower than UDP due to its reliability mechanisms and flow control.
Requires more overhead in terms of processing and network resources than UDP.
May not be suitable for applications that require real-time communication, such as gaming
or live video streaming, due to its error checking and congestion control mechanisms.
High-level application layer support
The application layer in wireless communication provides high-level support to the applications
that communicate over the network. The primary function of the application layer is to provide
an interface between the network and the application, allowing the application to communicate
with other devices over the network.
Some of the high-level application layer protocols used in wireless communication are HTTP
(Hypertext Transfer Protocol), SMTP (Simple Mail Transfer Protocol), FTP (File Transfer
Protocol), and DNS (Domain Name System).
It supports a wide range of applications, including web browsing, email, file transfer, and
video streaming.
It can introduce additional overhead and latency, which can slow down the communication
process.
It can increase the complexity of the network architecture, making it harder to manage
and troubleshoot.
It can pose security risks, as some protocols may be vulnerable to attacks and exploits.
Wireless Sensor Networks (WSNs) have some inherent characteristics such as limited
resources, unreliable wireless links, dynamic topology, and distributed architecture. To adapt to
are used that reduce energy consumption and prolong network lifetime.
2. Adaptive routing: Due to the dynamic topology of WSNs, adaptive routing protocols are
employed that can find and maintain the optimal path between source and destination
nodes.
3. Data aggregation: WSNs generate a large amount of data, which is transmitted over the
wireless links. Data aggregation techniques are used to reduce the amount of data
difficult to accurately locate nodes. Localization techniques are used to determine the
5. Security: Wireless links are susceptible to eavesdropping, jamming, and other attacks.
Security mechanisms are used to protect the confidentiality, integrity, and availability of
Wireless Sensor Networks (WSNs) are inherently dynamic due to the unpredictable behavior of
the sensors, the environment they operate in, and the wireless communication medium. The
dynamic nature of WSNs refers to the fact that the network topology, network conditions, and
network traffic can change frequently and unexpectedly. To adapt to this dynamic nature,
WSNs employ various techniques, such as dynamic routing, dynamic resource allocation, and
dynamic reconfiguration. These techniques allow the network to reconfigure itself to adapt to
the changing conditions and maintain optimal performance. The ability to adapt to the inherent
dynamic nature of WSNs is critical to achieving reliable and efficient communication in these
networks.
Sensor Networks and mobile robots
Sensor networks and mobile robots are two technologies that have become increasingly
important in recent years due to their wide range of applications in various fields. Sensor
networks are a collection of small devices equipped with sensors that can collect and transmit
On the other hand, mobile robots are autonomous machines that can move around and interact
The integration of these two technologies can provide many benefits. Mobile robots can be
equipped with sensors and used to gather data from hard-to-reach areas or dangerous
environments.
They can also be used to move sensor nodes around, which can help to increase coverage or
In addition, sensor networks can be used to provide information to mobile robots, which can
help them navigate through complex environments. The information collected by the sensor
network can also be used to make decisions about the robot's behavior, such as where to go
Overall, the combination of sensor networks and mobile robots has the potential to
Security in Ad Hoc networks refers to the protection of the network from unauthorized
access, data theft, and other security threats. Security in Ad Hoc networks can be achieved
Ad hoc networks are vulnerable to various types of security attacks due to their
The two main categories of security attacks in ad hoc networks are passive attacks and
active attacks.
Encryption and authentication techniques can be used to protect against security attacks
in ad hoc networks.
Public key cryptography is commonly used for secure key exchange, while symmetric key
Other security mechanisms that can be used in ad hoc networks include firewalls,
In ad hoc networks, key management is an important aspect of security. Here are some points
Ad hoc networks have dynamic topology and frequent node movement, which makes key
management challenging.
In ad hoc networks, two key management approaches are commonly used: centralized and
distributed.
In centralized key management, a central authority is responsible for key generation and
In distributed key management, each node generates and distributes its own keys. This
approach is more resilient but may lead to key inconsistencies and vulnerabilities.
A common approach to key management in ad hoc networks is to use a combination of
1. Ad Hoc networks are vulnerable to attacks due to their decentralized nature and lack of
data confidentiality.
2. Secure routing protocols are designed to detect and prevent attacks such as blackhole,
3. In secure routing, each node is assigned a security level based on its role in the network.
Nodes with higher security levels are responsible for maintaining the network's security
4. Secure routing protocols use various techniques such as authentication, encryption, and
digital signatures to protect the data being transmitted over the network.
5. One popular secure routing protocol for Ad Hoc networks is the Secure Ad Hoc On-
Demand Distance Vector (SAODV) protocol, which is an extension of the Ad Hoc On-
6. SAODV uses public key cryptography and digital signatures to provide secure routing.
Each node has a public key and a private key, and messages are encrypted and signed
7. Another secure routing protocol for Ad Hoc networks is the Dynamic Source Routing
(DSR) protocol, which uses digital signatures and certificates to authenticate nodes and
8. Secure routing in Ad Hoc networks is an ongoing research area, and new protocols and
techniques are constantly being developed to improve the security of these networks.
Cooperation in MANETs
Cooperation in MANETs can refer to the collaboration among nodes in the network to achieve a
common goal or to improve network performance. Here are some points on cooperation in
MANETs:
Cooperation among nodes in MANETs can improve the reliability and robustness of the
network. By sharing information and resources, nodes can work together to overcome the
Cooperative routing protocols can be used in MANETs to improve the routing efficiency
and reduce the overhead of the network. These protocols rely on the cooperation of
nodes to forward packets to their destinations, and can adapt to changes in network
In cooperative spectrum sensing, nodes in MANETs can work together to detect and
classify the available spectrum bands for use in cognitive radio networks. This can
Cooperative caching is another technique that can be used in MANETs to improve data
accessibility and reduce the latency of data retrieval. By storing frequently accessed
data in the caches of nearby nodes, the network can reduce the number of hops required
These nodes may refuse to cooperate or provide false information, which can compromise
the reliability and security of the network. Therefore, secure and trust-based
A system called an intrusion detection system (IDS) observes network traffic for malicious
It is software that checks a network or system for malicious activities or policy violations.
It works by monitoring and analyzing network traffic for suspicious behavior or known attack
patterns, and generating alerts or taking automated actions to block or mitigate the threats.
It analyzes the data flowing through the network to look for patterns and signs of
abnormal behavior.
The IDS compares the network activity to a set of predefined rules and patterns to
identify any activity that might indicate an attack or intrusion.
If the IDS detects something that matches one of these rules or patterns, it sends an
alert to the system administrator.
The system administrator can then investigate the alert and take action to prevent any
damage or further intrusion.
(NIDS) are set up at a planned point within the network to examine traffic from all
subnet and matches the traffic that is passed on the subnets to the collection of known
attacks. Once an attack is identified or abnormal behavior is observed, the alert can be
sent to the administrator. An example of a NIDS is installing it on the subnet where
firewalls are located in order to see if someone is trying to crack the firewall.
Host Intrusion Detection System (HIDS): Host intrusion detection systems (HIDS) run
on independent hosts or devices on the network. A HIDS monitors the incoming and
outgoing packets from the device only and will alert the administrator if suspicious or
malicious activity is detected. It takes a snapshot of existing system files and compares
it with the previous snapshot. If the analytical system files were edited or deleted, an
alert is sent to the administrator to investigate. An example of HIDS usage can be seen
system (PIDS) comprises a system or agent that would consistently reside at the front
end of a server, controlling and interpreting the protocol between a user/device and the
server. It is trying to secure the web server by regularly monitoring the HTTPS protocol
stream and accepting the related HTTP protocol. As HTTPS is unencrypted and before
instantly entering its web presentation layer then this system would need to reside in
1. Signature-based Method: Signature-based IDS detects the attacks on the basis of the
the network traffic. It also detects on the basis of the already known malicious
instruction sequence that is used by the malware. The detected patterns in the IDS are
known as signatures. Signature-based IDS can easily detect the attacks whose pattern
(signature) already exists in the system but it is quite difficult to detect new malware
attacks as new malware is developed rapidly. In anomaly-based IDS there is the use of
machine learning to create a trustful activity model and anything coming is compared with
that model and it is declared suspicious if it is not found in the model. The machine
based IDS as these models can be trained according to the applications and hardware
configurations.
Benefits of IDS
Detects malicious activity: IDS can detect any suspicious activities and alert the system
Improves network performance: IDS can identify any performance issues on the
Provides insights: IDS generates valuable insights into network traffic, which can be
1. False Positives: IDS may generate false positives, which means it can raise an alarm for
2. False Negatives: IDS may also miss actual attacks, which can go undetected, leading to
3. High Maintenance Cost: IDS requires continuous maintenance and monitoring, which can
4. Complex Setup: The setup and configuration of IDS can be complex, requiring specialized
5. Limited Coverage: IDS can only detect known attacks and may fail to identify new or
unknown attacks.
6. Performance Overhead: IDS can add overhead to the network and may impact
7. Inability to Prevent Attacks: IDS can only detect and report attacks, it cannot prevent
attacks.
8. Privacy Concerns: IDS may raise privacy concerns, as it involves monitoring and analyzing
Sensor network hardware refers to the physical components and devices that are used to
construct wireless sensor networks (WSNs). These hardware devices include sensors,
Sensors are the most important hardware component in WSNs. These devices are responsible
for collecting and measuring the physical parameters of the environment such as temperature,
humidity, pressure, light, sound, and motion. Microcontrollers are used to process the data
collected by sensors and to communicate with other nodes in the network. Radios are used to
transmit and receive data wirelessly between nodes. Power sources are used to provide energy
Advances in technology have led to the development of low-power, low-cost sensors and radios,
which have made it possible to deploy large-scale WSNs for various applications. The choice of
hardware depends on the specific requirements of the application, such as the type of sensors
needed, the range of communication required, the power source availability, and the
environmental conditions.
Overall, the selection and deployment of appropriate hardware components play a crucial role in
Berkeley motes
Berkeley motes are a popular platform for sensor networks, and their key features can be
summarized as follows:
1. Low-power: Motes are designed to operate on very low power, allowing them to run on
environments.
5. Sensor interfaces: Motes have interfaces for connecting to a variety of sensors, making
6. Modular: Motes are modular, allowing users to add or remove components as needed to
7. Open-source: Motes are based on open-source hardware and software, making them
Limited resources: Sensor nodes have limited processing power, memory, and battery life,
which makes it challenging to develop efficient algorithms and programs that can operate
Network topology: Sensor networks can have complex topologies with dynamic
Data management: Sensor networks generate large amounts of data, which must be
efficiently collected, processed, and stored. This requires specialized data management
techniques and algorithms that can handle the high data rates and limited storage
Security: Sensor networks are often deployed in remote and hostile environments, making
them vulnerable to attacks and security breaches. Ensuring the security and privacy of
between different nodes and systems can be challenging, especially when using different
Energy efficiency: Sensor nodes are typically battery-powered and have limited energy
to maximizing the lifespan of the sensor network and minimizing the need for frequent
battery replacements.
develop programming techniques and algorithms that can scale to large networks without