Professional Documents
Culture Documents
WSN Lab Manual PDF
WSN Lab Manual PDF
WSN Lab Manual PDF
COMMUNICATION TECHNOLOGY
CERTIFICATE
Reg. No. __________________ Section _____ Roll No: ______ has satisfactorily completed the
lab exercises prescribed for Network Design and Wireless Sensor Networks Lab [ICT 4161 ] of
7th semester B.Tech (CCE) degree at MIT, Manipal, in the academic year 2017-2018.
Date: __________________
Signature
Faculty in-charge
CONTENTS
Lab Page
Title Signature Remarks
No. No.
Instructions to Students ii
i
COURSE OBJECTIVES
To understand the functionalities of various layers of OSI model.
To demonstrate the working of network components such as switch, router, gateways,
etc.
To inculcate the use of tools in network topology design.
To understand the distributed sensing capabilities and the ease of deployment provided
by a wireless communication paradigm.
To efficiently design WSN communication system for a given set of parameters and
constraints.
COURSE OUTCOMES
Students will be able to
Design the network for different applications, configure and manage the network
components
Analyze the different types of sensors to be used based on the problem definition.
Design and develop the WSN communication system for the given parameters and
constraints in real time.
Understand and deploy machine to machine communication systems
EVALUATION PLAN
Split up of 60 marks for Regular Lab Evaluation
Execution: 2 Marks
Regular Evaluation (50 Marks) Record: 4 Marks
Evaluation: 4 Marks
Mini Project 10 Marks
End Semester Lab evaluation: 40 marks (Duration 2 hours)
Program write up and Execution: 20 Marks
Mini-Project: 20 Marks
INSTRUCTIONS TO STUDENTS
Pre- Lab Session Instructions
1. Students should carry the Lab Manual Book and the required stationery to every lab
session
2. Be in time and follow the institution dress code
3. Must sign in the log register provided
ii
4. Make sure to occupy the allotted seat and answer the attendance
5. Adhere to the rules and maintain the decorum
iii
iv
LAB NO: 1
Objective
1. Develop an understanding of the basic functions of Packet Tracer.
2. To build a network using packet tracer
3. To demonstrate use of different network components such as routers, switches etc
4. Observe traffic behavior on the network.
Cisco Packet Tracer is a powerful network simulation program that allows students to
experiment with network behavior and ask “what if” questions. As an integral part of the
Networking Academy comprehensive learning experience, Packet Tracer provides simulation,
visualization, authoring, assessment, and collaboration capabilities and facilitates the teaching
and learning of complex technology concepts.
Packet Tracer supplements physical equipment in the classroom by allowing students to create a
network with an almost unlimited number of devices, encouraging practice, discovery, and
troubleshooting. The simulation-based learning environment helps students develop 21st century
skills such as decision making, creative and critical thinking, and problem solving. Packet Tracer
complements the Networking Academy curricula, allowing instructors to easily teach and
demonstrate complex technical concepts and networking systems design.
Packet Tracer complements the Networking Academy curricula, allowing instructors to easily
teach and demonstrate complex technical concepts and networking systems design. Instructors
can customize individual or multiuser activities, providing hands-on lessons for students that
offer value and relevance in their classrooms. Students can build, configure, and troubleshoot
networks using virtual equipment and simulated connections, alone or in collaboration with other
students. Packet Tracer offers an effective, interactive environment for learning networking
concepts and protocols. Most importantly, Packet Tracer helps students and instructors create
their own virtual “network worlds” for exploration, experimentation, and explanation of
networking concepts and technologies.
Key Features
Packet Tracer Workspaces: Cisco Packet Tracer has two workspaces—logical and physical. The
logical workspace allows users to build logical network topologies by placing, connecting, and
clustering virtual network devices. The physical workspace provides a graphical physical
dimension of the logical network, giving a sense of scale and placement in how network devices
such as routers, switches, and hosts would look in a real environment. The physical view also
provides geographic representations of networks, including multiple cities, buildings, and wiring
closets.
1
LAB NO: 1
Packet Tracer Modes: Cisco Packet Tracer provides two operating modes to visualize the
behavior of a network—real-time mode and simulation mode. In real-time mode the network
behaves as real devices do, with immediate real-time response for all network activities. The
real-time mode gives students a viable alternative to real equipment and allows them to gain
configuration practice before working with real equipment. In simulation mode the user can see
and control time intervals, the inner workings of data transfer, and the propagation of data across
a network. This helps students understand the fundamental concepts behind network operations.
A solid understanding of network fundamentals can help accelerate learning about related
concepts.
Protocols: Cisco Packet Tracer supports the following protocols:
A client has requested that you set up a simple network with two PCs connected to a switch.
Verify that the hardware, along with the given configurations, meet the requirements of the
client. Following are the steps to setup the above given scenario
1. IP address: 192.168.10.11
2
LAB NO: 1
3
LAB NO: 1
Now, we will connect them by selecting fast ethernet interfaces on both ends.
Now, we have connect the devices. Further, we will go to the router CLI mode and enter the
following commands.
Step by step , we will have to do the following things.
4
LAB NO: 1
Now, we have accessed both interfaces one by one and we have assigned IP addresses
respectively.
5
LAB NO: 1
Now, we have accessed both interfaces one by one and we have assigned IP addresses
respectively.
See the difference the lights have changed the color from Red to Green. Now, lets assign IP
addresses to the PCs.
Click on PC1, go to Desktop, then click IP Configuration.
PC1:
6
LAB NO: 1
PC2:
Now, our communication is enabled and we are able to communicate from PC1 to PC2 via
Router.
Click on the packet in the right panel on the packet tracer, then click on PC1 and then click on
PC2. You will see the successful packet tracer (status is shown in the bottom right corner)
7
LAB NO: 1
Lab Exercises
1. Set up a network with 4 switches and 8 PC’s and verify the connectivity between all the
PC’s.
2. Design and configure a network using 4 PC’s and a router. Configuration should be done
using Command Line Interface (CLI).
8
[OBSERVATION SPACE]
LAB NO: 1
9
[OBSERVATION SPACE]
LAB NO: 1
10
[OBSERVATION SPACE]
LAB NO: 1
11
[OBSERVATION SPACE]
LAB NO: 1
12
LAB NO: 2
Objective:
1. To understand working principle of various routing protocols using packet tracer.
2. To make use of various routing protocols to route packets between the systems.
RIPv1
A classful protocol, broadcasts updates every 30 seconds, hold-down period 180 seconds. Hop
count is metric (Maximum 15).
RIP supports up to six equal-cost paths to a single destination, where all six paths can be placed
in the routing table and the router can load-balance across them. The default is actually four
paths, but this can be increased up to a maximum of six. Remember that an equal-cost path is
where the hop count value is the same. RIP will not load-balance across unequal-cost paths.
RIPv2
RIPv2 uses multicasts, version 1 use broadcasts,
RIPv2 supports triggered updates—when a change occurs, a RIPv2 router will immediately
propagate its routing information to its connected neighbors.
RIPv2 is a classless protocol. RIPv2 supports variable-length subnet masking
(VLSM)
RIPv2 supports authentication. You can restrict what routers you want to participate in RIPv2.
This is accomplished using a hashed password value.
13
LAB NO: 2
RIP Timers
RIP uses four different kinds of timers to regulate its performance:
14
LAB NO: 2
Assign ip address to PC. Select pc and double click on it. Select ip configurations from
desktop tab and set ip address given as in table. To configure router double click on it and
select CLI.To configure this topology use this step by step guide.
15
LAB NO: 2
changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface
FastEthernet0/0, changed state to up
R1(config-if)#exit
R1(config)#interface fastethernet 0/1
R1(config-if)#ip address 20.0.0.1 255.0.0.0
R1(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/1,
changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface
FastEthernet0/1, changed state to up
R1(config-if)#exit
R1(config)#interface serial 0/0/0
R1(config-if)#ip address 50.0.0.1 255.0.0.0
R1(config-if)#clock rate 64000
R1(config-if)#bandwidth 64
R1(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial0/0/0, changed
state to down
R1(config-if)#exit
R1(config)#router rip
R1(config-router)#network 10.0.0.0
R1(config-router)#network 20.0.0.0
R1(config-router)#network 50.0.0.0
R1(config-router)#exit
16
LAB NO: 2
changed state to up
R2(config-if)#exit
R2(config)#interface serial 0/0/0
R2(config-if)#ip address 50.0.0.2 255.0.0.0
R2(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial0/0/0, changed
state to up
R2(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface
Serial0/0/0,
changed state to up
R2(config-if)#exit
R2(config)#router rip
R2(config-router)#network 30.0.0.0
R2(config-router)#network 40.0.0.0
R2(config-router)#network 50.0.0.0
R2(config-router)#exit
To test rip routing do ping from pc0 to all pc and vice versa. If you get replay then you have
successfully configured rip routing.
17
LAB NO: 2
Router 1
R1>enable
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#interface serial 0/3
R1(config-if)#ip address 10.10.10.1 255.255.255.252
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#
R1(config)#interface serial 0/2
R1(config-if)#ip address 10.10.10.5 255.255.255.252
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown
Router 2
Router#enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2
R2(config)#interface serial 0/2
R2(config-if)#ip address 10.10.10.6 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip address 192.168.10.1 255.255.255.0
R2(config-if)#no shutdown
Router 3
Router#enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R3
R3(config)#interface serial 0/2
R3(config-if)#ip address 10.10.10.2 255.255.255.252
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface fastEthernet 0/0
R3(config-if)#ip address 192.168.1.1 255.255.255.0
R3(config-if)#no shutdown
18
LAB NO: 2
R3>enable
R3#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#router ospf 1
R3(config-router)#network 192.168.1.0 0.0.0.255 area 0
R3(config-router)#network 10.10.10.0 0.0.0.3 area 0
OSPF routing configuration has been finished successfully, now test your network whether
they can ping with each other or not.
Various Commands
19
LAB NO: 2
Lab Exercises
1. Using RIP, configure the below network and verify the connectivity between PC0
and PC1.
2. For the above given scenario, configure the network using OSPF and verify the
connectivity between the PC’s.
20
[OBSERVATION SPACE] LAB NO: 2
21
[OBSERVATION SPACE] LAB NO: 2
22
[OBSERVATION SPACE] LAB NO: 2
23
[OBSERVATION SPACE] LAB NO: 2
24
LAB NO: 3
Objective:
1. To configure DHCP using packet tracer.
2. To examine NAT on a Multi-Function Device
The use of Network Address Translation (NAT) has been widespread for a number of years; this
is because it is able to solve a number of problems with the same relatively simple configuration.
At its most basic, NAT enables the ability to translate one set of addresses to another; this
enables traffic coming from a specific host to appear as though it is coming from another and do
it transparently.
NAT Concepts
There are a number of different concepts that must be explained in order to really get a good
understanding of how NAT operates, which ultimately makes the configuration of NAT
increasingly simple. This section reviews these different concepts and begins with an
understanding of how NAT can be used. Some of the main uses for NAT include:
Translation of non-unique addresses into unique addresses when accessing the Internet:
This is one of the most common uses of NAT today; almost every household that has a “router”
to access the Internet is using NAT on this device to translate between internal private address
and public Internet addresses.
Translation of addresses when transitioning internal addresses from one address range
into another (this is common when the organization of addresses within a company is
being changed):
This is often done when a company is transitioning their IP addressing plan; common scenarios
include when expanding (and the IP addressing plan was not built sufficiently when the initial
addresses were assigned) and when a company is merging with another with potential
overlapping addresses.
When simple TCP load sharing is required across many IP hosts:
This is very common, as many highly used servers are not really a single machine but a bank of
several machines that utilize load balancing. In this scenario, commonly, a single public address
is translated into one of several internal addresses in a round robin fashion. This is not a
complete list of every possible way that NAT can be configured but simply a list of the most
common ways that it is used in modern networks.
25
LAB NO: 3
There are a couple of main concepts that also must be reviewed and understood before
configuring NAT:
1. Inside and Outside Addresses
2. NAT types
1. Inside and Outside Addresses
In typical NAT configurations, interfaces are placed into one of two categories (or locations):
inside or outside. Inside indicates traffic that is coming from within the organizational network.
Outside indicates traffic that is coming from an external network that is outside the
organizational network.
These different categories are then used to define different types of address depending on
location of the address and how it is being “seen”. These different types include:
a) inside local address: This is the inside address as it is seen and used within the
organizational network.
b) inside global address: This is the inside address as it is seen and used on the outside of the
organizational network.
c) outside local address: This is the outside address as it seen and used within the
organizational network.
d) outside global address: This is the outside address as it is seen and used on the outside of
the organizational network.
2. NAT Types
Another important concept to be familiar with is the different types of NAT and how they are
defined. On most networks there are three different types of NAT that are defined:
a. Static address translation (Static NAT): This type of NAT is used when a single
inside address needs to be translated to a single outside address or vice versa.
b. Dynamic address translation (Dynamic NAT): This type of NAT is used when an
inside address (or addresses) need to be translated to an outside pool of addresses
or vice versa.
c. Overloading (Port Address Translation (PAT): This type of NAT is a variation on
dynamic NAT. With dynamic NAT, there is always a one to one relationship
between inside and outside addresses; if the outside address pool is ever
exhausted, traffic from the next addresses requesting translation will be dropped.
With overloading, instead of a one to one relationship, traffic is translated and
given a specific outside port number to communicate with; in this situation, many
internal hosts can be using the same outside address while utilizing different port
numbers.
26
LAB NO: 3
Using NAT we can hide real IP address, we can translate private IP address to public IP address
and vice versa. As we all know in internet only public IP addresses are used and some IP in
every class has been reserved for use in LOCAL AREA CONNECTION say LAN and these
ranges of IP are known as Private IP Address. Private Addresses can only be used in LAN and it
can’t be used in internet. But our PC with private address can communicate with PC or Machine
having public IP address using NAT(Network Address Translation).
A public IP address is an IP address that can be accessed over the Internet. Like postal address
used to deliver a postal mail to your home, a public IP address is the globally unique IP address
assigned to a computing device. Private IP address on the other hand is used to assign computers
within your private space without letting them directly expose to the Internet. For example, if
you have multiple computers within your home you may want to use private IP addresses to
27
LAB NO: 3
address each computer within your home. In this scenario, your router get the public IP address,
and each of the computers, tablets and smartphones connected to your router (via wired or wifi)
get a private IP address from your router via DHCP protocol.
Internet Assigned Numbers Authority (IANA) is the organization responsible for registering IP
address ranges to organizations and Internet Service Providers (ISPs). To allow organizations to
freely assign private IP addresses, the Network Information Center (InterNIC) has reserved
certain address blocks for private use.
The following IP blocks are reserved for private IP addresses.
28
LAB NO: 3
To allow direct access to a local device which is assigned a private IP address, a Network
Address Translator (NAT) should be used.
How to configure NTP Server and NTP Client on cisco Router
Whenever we talks about cisco routers and how to set clock or accurate time on routers it
becomes so important because a variety of services depend on it. We need to monitor our routers
and secure our routers through server configuration. We use to configure syslog server for
monitoring routers log and incident happening over routers. The logging service shows each log
entry with the date and time and all details which are directly or indirectly related to NTP Server.
It becomes very critical if you’re trying to track a specific incident or troubleshoot a problem.
Cisco routers have two types of clocks :
[1] A battery-powered hardware clock, referenced as the ‘calendar’ in the IOS CLI,
and
[2] a software clock, referenced as the ‘clock’ in the IOS CLI.
The software clock is the primary source for time data and runs from the moment the system is
up and running. The software clock can be updated from a number of sources.
29
LAB NO: 3
Solved Example:
1. Configure DHCP on routers for the given topology
Lets config Router 2 as DHCP Server and set the clients to get there IP addresses from DHCP
Server.
In the R2 while you are in the config mode, type the command ‘ip dhcp excluded-address
192.168.10.1 192.168.10.20‘ and then press enter. This command ‘ip dhcp excluded-address’
will create an exclusive range of IP addresses which reserved for Network Servers and DHCP
Server will not assign theme to clients.
The ‘ip dhcp pool‘ command create a pool for a network. You can create many pools on a router
for all Local area network that connected to the router.
R2>enable
R2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#ip dhcp excluded-address 192.168.10.1 192.168.10.20
R2(config)#ip dhcp pool mynetwork (you can give any name)
R2(dhcp-config)#
R2(dhcp-config)#network 192.168.10.0 255.255.255.0
R2(dhcp-config)#default-router 192.168.10.1
R2(dhcp-config)#dns-server 192.168.10.100
31
LAB NO: 3
R2(dhcp-config)#
Now go to client setting and set the IP Configuration to DHCP and see the client get new IP
address from DHCP Server.
32
LAB NO: 3
Configure the R1 to relay the DHCP client request. It will not work without routing. So
configure Routers with static or dynamic routing. Here I’m testing with RIP.
R1>enable
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip helper-address 10.10.10.2
R1(config-if)#exit
R1(config)#router rip
R1(config-router)#network 10.10.10.0
R1(config-router)#network 192.168.30.0
R1(config-router)#exit
Go to the client IP configuration setting and see the forwarded request by DHCP Server.
33
LAB NO: 3
Lab Exercises
1. Configure static NAT for the below given scenario. Also ping a private IP address given
and mention your inference.
34
LAB NO: 3
35
[OBSERVATION SPACE]
LAB NO: 3
36
[OBSERVATION SPACE]
LAB NO: 3
37
[OBSERVATION SPACE]
LAB NO: 3
38
[OBSERVATION SPACE]
LAB NO: 3
39
[OBSERVATION SPACE]
LAB NO: 3
40
[OBSERVATION SPACE]
LAB NO: 3
41
LAB NO: 4
Objective:
1. To configure Virtual Local Area Networks (VLANs) using Virtual Trunk Points (VTPs)
2. To configure Password Authentication Protocol (PAP) to validate users before allowing
them access to server resources
Two VLANs consisting of two servers and workstations of which one workstation has been
placed along with the servers in VLAN 1, while the second workstation is placed in VLAN 2.
In this scenario, both workstations require access to the File and Print servers, making it a very
simple task for the workstation residing in VLAN 1, but obviously not for our workstation in
VLAN 2. we need to somehow route packets between the two VLANs and the good news is that
there is more than one way to achieve this and that's what we'll be covering.
42
LAB NO: 4
In addition, each host (servers and workstations) must either use the router's interface connected
to their network as a 'default gateway' or a route entry must be created to ensure they use the
router as a gateway to the other VLAN/Network. This scenario is however expensive to
implement because we require a dedicated router to router packets between our VLANs, and is
also limited from an expandability prospective.
43
LAB NO: 4
The router will need to be configured with two virtual interfaces, one for each VLAN, with the
appropriate IP Address assigned to each one so routing can be performed.
44
LAB NO: 4
In order for the server to perform the routing, it requires two network cards - one for each VLAN
and the appropriate IP Addresses assigned, therefore we have configured one with IP Addresses
192.168.1.1 and the other with 192.168.2.1. Once this phase is complete, all we need to do is
enable IP routing on the server and we're done.
Lastly, each workstation must use the server as either a gateway, or a route entry should be
created so they know how to get to the other network.
The Cisco Catalyst 3550 series switches used here are layer 3 switches with built-in routing
capabilities, making them the preferred choice at a reasonable cost. Of course, the proposed
solution shown here is only a small part of a large scale network where switches such as the
Catalyst 3550 are usually placed as core switches, connecting all branch switches together
(2924's in this case) via superfast fiber Gigabit or Fast Ethernet links, ensuring a fast and reliable
network backbone.
VLAN Configuration and InterVLAN routing for Cisco Layer 3 switches (3550, 3560 series,
3750 series, 4500 series and 6500 series switches) 3550 Catalyst will be configured with two
virtual interfaces, one for each
VLAN, and of course the appropriate IP Address assigned to them to ensure there is a logical
interface connected to both networks. Then we need to issue the 'IP Routing' command to enable
the InterVLAN Routing service.
45
LAB NO: 4
The diagram above was designed to help you 'visualise' how switches and their interfaces are
configured to specific VLAN, making the InterVLAN routing service possible. The switch above
has been configured with two VLANs, VLAN 1 and 2. The Ethernet interfaces are then assigned
to each
VLAN, allowing them to communicate directly with all other interfaces assigned to the same
VLAN and the other VLAN, when the internal routing process is present and enabled.
What is VLAN
VLAN is a logical grouping of networking devices. When we create VLAN, we actually break
large broadcast domain in smaller broadcast domains.
Consider VLAN as a subnet. Same as two different subnets cannot communicate with each other
without router, different VLANs also requires router to communicate.
Advantage of VLAN
VLAN provides following advantages:-
Solve broadcast problem
Reduce the size of broadcast domains
Allow us to add additional layer of security
Make device management easier
Allow us to implement the logical grouping of devices by function instead of location
VLAN Membership
VLAN membership can be assigned to a device by one of two methods
1. Static
2. Dynamic
46
LAB NO: 4
These methods decide how a switch will associate its ports with VLANs.
1. Static
Assigning VLANs statically is the most common and secure method. It is pretty easy to set up
and supervise. In this method we manually assign VLAN to switch port. VLANs configured in
this way are usually known as port-based VLANs.
Static method is the most secure method also. As any switch port that we have assigned a VLAN
will keep this association always unless we manually change it. It works really well in a
networking environment where any user movement within the network needs to be controlled.
2. Dynamic
In dynamic method, VLANs are assigned to port automatically depending on the connected
device. In this method we have configure one switch from network as a server. Server contains
device specific information like MAC address, IP address etc. This information is mapped with
VLAN.
Switch acting as server is known as VMPS (VLAN Membership Policy Server). Only high end
switch can configured as VMPS. Low end switch works as client and retrieve VLAN
information from VMPS. Dynamic VLANs supports plug and play movability. For example if
we move a PC from one port to another port, new switch port will automatically be configured to
the VLAN which the user belongs. In static method we have to do this process manually.
VLAN Connections
During the configuration of VLAN on port, we need to know what type of connection it has.
Switch supports two types of VLAN connection
Access link
Trunk link
Access link
Access link connection is the connection where switch port is connected with a device that has a
standardized Ethernet NIC. Standard NIC only understand IEEE 802.3 or Ethernet II frames.
Access link connection can only be assigned with single VLAN. That means all devices
connected to this port will be in same broadcast domain.
For example twenty users are connected to a hub, and we connect that hub with an access link
port on switch, then all of these users belong to same VLAN. If we want to keep ten users in
another VLAN, then we have to purchase another hub. We need to plug in those ten users in that
hub and then connect it with another access link port on switch.
47
LAB NO: 4
Trunk link
Trunk link connection is the connection where switch port is connected with a device that is
capable to understand multiple VLANs. Usually trunk link connection is used to connect two
switches or switch to router. Remember, VLAN can span anywhere in network, that is happen
due to trunk link connection. Trunking allows us to send or receive VLAN information across
the network. To support trunking, original Ethernet frame is modified to carry VLAN
information.
Lab Exercises
1. Company has three offices. Offices are connected with each other via layer 2 links. For
redundancy purpose each office has one more layer 2 link. Company has two department
sales and management. In each office we have one PC from each department. Company
has one router. You can use router's Ethernet port for inter VLAN communication.
Configure VLAN VTP DTP and Router on Stick
48
[OBSERVATION SPACE]
LAB NO: 4
49
[OBSERVATION SPACE]
LAB NO: 4
50
[OBSERVATION SPACE]
LAB NO: 4
51
[OBSERVATION SPACE]
LAB NO: 4
52
LAB NO: 5
Objective
1. To create and configure wireless network using packet tracer
2. To configure VOIP
For providing wireless module, go to the PC physical mode Go to PC, and remove wired LAN
and install WMP300N Module.
53
LAB NO: 5
54
LAB NO: 5
As this wireless router provides us with the DHCP service, so we can obtain IP automatically by
using this service for our PCs.
55
LAB NO: 5
56
LAB NO: 5
Now click on connect button and give the passkey you have set in the router
57
LAB NO: 5
Now you can see that the PC has been connected to the router, you can also check the signal
strength and quality by clicking on Link Information
58
LAB NO: 5
Lower Cost
In general phone service via VOIP costs less than equivalent service from traditional sources.
This is largely a function of traditional phone services either being monopolies or government
entities. There are also some cost savings due to using a single network to carry voice and data.
This is especially true when users have existing under-utilized network capacity that they can use
for VOIP without any additional costs. .
In the most extreme case, users see VOIP phone calls (even international) as FREE. While there
is a cost for their Internet service, using VOIP over this service may not involve any extra
charges, so the users view the calls as free. There are a number of services that have sprung up to
facilitate this type of "free" VOIP call. Examples are: FreeWorldDialup and Skype .
Increased Functionality
VOIP makes easy some things that are difficult to impossible with traditional phone networks.
59
LAB NO: 5
Incoming phone calls are automatically routed to your VOIP phone where ever you plug it into
the network. Take your VOIP phone with you on a trip, and anywhere you connect it to the
Internet, you can receive your incoming calls.
Call center agents using VOIP phones can easily work from anywhere with a good Internet
connection.
Lab Exercise
1. In the below topology, we have three pc connected with Linksys Wireless routers.
60
LAB NO: 5
2. Configure VOIP for the below given topology and call IP Phone1 from IP Phone0
61
LAB NO: 6
62
LAB NO: 6
63
LAB NO: 6
64
LAB NO: 6
65
LAB NO: 6
66
LAB NO: 6
Objective:
1. To identify the different gas sensors used with Waspmote Gases sensor board.
2. To make use of Waspmote Gases sensor board and sensors for measuring the levels of
gases present.
WASPMOTE
Waspmote is an open source wireless sensor platform which focuses on the implementation of
low consumption modes to allow the sensor nodes (“motes”) to be completely autonomous and
battery powered. Waspmote is based on a modular architecture: -integrate only the modules
needed in each device optimizing costs.
Waspmote counts with 2 sleep modes, Deep Sleep and Hibernate. In deep sleep, the device is
completely slept and the sensors powered. Sensors may generate an interruption to wake the
main microcontroller up when the value read goes above or below a pre-programed threshold.
Values of the sensor thresholds are controlled by software via digital potentiometers (digipots).
The consumption in Deep Sleep mode is 55µA. In Hibernate, the consumption is only 0.7µA. All
systems are switched off to ensure minimum consumption. Waspmote will be woken up by an
alarm from the internal clock.
Waspmote has two types of nodes:
(i) End Nodes have sensors integrated and are used to gather information and send (mesh
networking) to the Gateway (GW). Each End Node is equipped with a 6LoWPAN
radio, sensors, and a battery.
(i) Gateway takes the information sent by the End Nodes and sends it to the Tunneling
server by using the Ethernet IPv4 interface. Each GW Node is equipped with a
6LoWPAN radio, an Ethernet interface, anda battery.
Waspmote can be programmed in two ways: basic programming done from the USB port, and
Over the Air Programming (OTAP) once the node has been installed.
67
LAB NO: 6
Temperature, humidity, air pressure, CO2 (socket 1A), O2 (socket 1B), NO2 (socket 3B), O3 or
VOC (socket 2B). Sockets 2A, 3 and 4 are available for the rest of the sensors. CO and NH3
sensors can only be placed in the sockets 3 or 4.
GAS SENSORS
Name of Sensor Type of Measureme Response Output range Average
Sensor nt range Time Consumption
O2 (SK 25) Analog 0 ~ 30 % 15 seconds 0~10 mV approx. 50mA
5.5mV~8.8mV at
21%
CO2 (TGS 4161) Analog 350 ~ 10000 1.5 220~490 mV at 350 0µA
ppm minutes ppm
68
LAB NO: 6
2. Configuration of the sensor’s amplification gain and load resistance (the latter if necessary)
using the function SensorGasv20.configureSensor(SENSOR, GAIN, RESISTOR).
3. Turn on the RTC to avoid possible conflicts in the I2C bus using the function RTC.ON().
4. The sensor is switched on (except for the CO and NH3 sensors) using the function
SensorGasv20.setSensorMode(SENS_ON,SENSOR).
5. Wait for the necessary amount of time for the sensor’s response depending on the accuracy
required. The function delay(TIME)may be used.
6. Read the sensor using the function SensorGasv20.readValue(SENSOR).
7. If necessary, switch off the sensors and the board using the functions
SensorGasv20.setSensorMode(SENS_OFF, SENSOR)andSensorGasv20.OFF ().
Lab Exercises
1. Design an application that measures the level of Oxygen(O2) and Carbon-dioxide (CO2)
gases in the room and display an alert message if the levels cross optimum levels.
For CO2 :
250-350 ppm: normal background concentration in outdoor ambient air.
350-1000 ppm: concentrations typical of occupied indoor spaces with good air exchange.
For O2 : 19.5 % to 21 %.
Additional Exercises
1. Design an application that displays a warning message if traces of (i) Ammonia gas, (ii)
Nitrogen Dioxide gas are found in your environment beyond acceptable limits.
(The U. S. Occupational Safety and Health Administration (OSHA)has set a 15-minute
exposure limit for gaseous ammonia of 35 ppm by volume in the environmental air and
an 8-hour exposure limit of 25 ppm by volume.)
2. Measure the concentrations of different air pollutant gases present in a room and convey
periodical data to a device.
69
[OBSERVATION SPACE] LAB NO: 6
70
[OBSERVATION SPACE] LAB NO: 6
71
[OBSERVATION SPACE] LAB NO: 6
72
[OBSERVATION SPACE] LAB NO: 6
73
[OBSERVATION SPACE] LAB NO: 6
74
LAB NO: 7
Objective:
1. To experiment with basic functionalities of Arduino board.
2. To estimate the atmospheric parameters using Arduino board and sensors.
ARDUINO
Arduino is an open source prototype platform based on an easy to use hardware and software. It
consists of a programmable circuit board and a readymade software called Arduino IDE, which
is used to write code/sketch to be uploaded to the physical board. Arduino boards can read inputs
- light on a sensor, a finger on a button, or a Twitter message - and turn it into an output -
activating a motor, turning on an LED, publishing something online. All the tasks can be
accomplished by sending a set of instructions to the microcontroller on the board.
ARDUINO BOARD
Arduino boards can be of various types depending on the different microcontrollers used. The
differences are based on the number of inputs and outputs, speed, operating voltage, form factor,
etc. For the lab, Arduino Uno board will be used, which has 6 analog inputs, 6 pins for PWM,
16MHz clock speed, and is based on ATMEGA328 microcontroller.
The Serial Monitor displays serial data being sent from the Arduino board. To send data to the
board, the required text may be entered and "send" button or enter pressed. The baud rate can be
chosen from the drop-down that matches the rate passed to Serial.begin() in the sketch.
ARDUINO LIBRARIES
Libraries are a collection of code that makes it easy to connect to a sensor, display, module, etc.
Libraries provide extra functionality for use in sketches, e.g. working with hardware or
manipulating data. To use a specific library in a sketch, it can be selected from the Sketch menu.
The Library Manager can be used for installing new libraries.
75
LAB NO: 7
1 → Power USB
2 → Power (Barrel Jack)
3 → Voltage Regulator
4 → Crystal Oscillator
5,17 → Arduino Reset
6,7
→ Pins (3.3V, 5V, GND, Vin)
8,9
10 → Analog Pins
11 → Main Microcontroller
12 → ICSP pin
13 → Power LED indicator
14 → TX and RX LEDs
15 → Digital I/O
16 → AREF
BUILT-IN EXAMPLES
Built-in Examples are sketches included in the Arduino Software (IDE), These sketches may be
accessed from the toolbar menu: File > Examples. These simple programs demonstrate all basic
Arduino commands. They span from a Sketch Bare Minimum to Digital and Analog IO, to the
use of Sensors and Displays.
The DHT11 detects water vapor by measuring the electrical resistance between two
electrodes. The humidity sensing component is a moisture holding substrate with electrodes
applied to the surface. When water vapor is absorbed by the substrate, ions are released by the
substrate which increases the conductivity between the electrodes. The change in resistance
between the two electrodes is proportional to the relative humidity. Higher relative humidity
decreases the resistance between the electrodes, while lower relative humidity increases the
resistance between the electrodes.
The DHT11 measures temperature with a surface mounted NTC temperature sensor (thermistor)
built into the unit.
76
LAB NO: 7
An IC mounted on the back of the unit converts the resistance measurement to relative
humidity. It also stores the calibration coefficients, and controls the data signal transmission
between the DHT11 and the Arduino.
Connections: Connect the sensor to the Arduino using the pin details as shown below:
DHT11 ARDUINO
Pin 1: Power Supply Vcc
Pin 2: Serial Data Output Analog0
Pin 3: No Connections -
Pin 4: Ground GND
After setting up the connections, the sketch written to measure temperature and humidity can be
uploaded to Arduino. The DHT11 library is used in the sketch as well. The serial monitor is used
to observe the data readings from the sensor.
Lab Exercises
1. Write a program to blink an LED in Arduino Uno board when the temperature recorded
is:
i. Below 25ºC
ii. Above 32ºC
iii. Below 25ºC or above 32ºC
2. Design a program that displays the humidity of air every 60 seconds and displays:
i. Low humidity for relative humidity less than 30 %
ii. Healthy humidity for relative humidity more than 30 % and less than 50%
iii. High humidity for relative humidity more than 50%
3. Develop a simple web application that displays the temperature and humidity records
collected through Arduino sensors over a period of time.
Additional Exercise
1. Design an application that sends periodical average temperature and humidity collected
using Arduino sensors.
77
[OBSERVATION SPACE] LAB NO: 7
78
[OBSERVATION SPACE] LAB NO: 7
79
[OBSERVATION SPACE] LAB NO: 7
80
[OBSERVATION SPACE] LAB NO: 7
81
[OBSERVATION SPACE] LAB NO: 7
82
LAB NO: 8
Objective:
1. To measure proximity of an object using infrared sensor.
2. To compare the performance of infrared and ultrasound sensors in target estimation.
ULTRASOUND SENSOR
Ultrasound Sensors/ Ultrasonic Sensors are primarily used in projects that involves distance
measurement. They can be used to find the distance to an object, or to detect when something is
near the sensor like a motion detector. They are ideal for projects involving navigation, object
avoidance, and home security. They work just as well in the dark as they do in the light because
they use sound to measure distance.
Sensor Specifications
83
LAB NO: 8
Working
The HC-SR04 has two metal cylinders called transducers at the front. One is a transmitting
transducer and the other one is a receiving transducer. The transmitting transducer converts an
electrical signal into the ultrasonic pulse, and the receiving transducer converts the reflected
ultrasonic pulse back into an electrical signal. The IC labelled MAX3232 at the back of the
sensor controls the transmitting transducer. The IC labelled LM324 at the back amplifies the
signal generated by the receiving transducer into a signal that’s strong enough to transmit to the
Arduino.
For measuring distance, an ultrasound needs be generated. For this, the Trig should be set on a
high signal for a minimum of 10µs. The sensor module, on receiving this signal, sends out an 8-
cycle sonic burst of frequency 40KHz from the transmitting transducer. If an object is within
measurable range, the 8-pulses hits the receiving transducer at the sensor. This is received at the
Echo pin, which outputs a high voltage signal equal to the total time taken by the 8-pulseto travel
from the transmitting transducer and back to the receiving transducer. To get the distance of the
object, the total time is halved and multiplied with the speed of sound.
INFRARED SENSOR
The Infrared Sensor can be used for obstacle sensing, color detection (between basic contrasting
colors), fire detection, line sensing, and as an encoder sensor.IR sensors are highly susceptible to
ambient light. The FC-51 IR sensor is suitably covered to reduce effect of ambient light on the
sensor. It has built-in IR transmitter and IR receiver that sends out IR energy and looks for
reflected IR energy to detect presence of any obstacle in front of the sensor module. The module
has on board potentiometer that lets user adjust detection range. The sensor has very good and
stable response even in ambient light or in complete darkness.
Sensor Specifications
Sensor Name: FC-51Infrared Obstacle Avoidance Proximity Sensor
Voltage: 3V–6V
Current: 23mA at 3.3V, 43mA at 5V
Detection Angle: 35º
Detection Range: 2cm – 30 cm (adjustable)
Connections
FC-51 ARDUINO
Pin 1: Vcc +5V
Pin 2: Ground GND
Pin 3: OUT Digital Output Pin
Fig 8.2. The FC-512 IR Sensor
84
LAB NO: 8
Working
The IR transmitter sends an infrared signal to be ultimately received by an IR receiver on being
reflected from a surface/object. In case of a reflective surface, the signal is reflected off in some
directions including that of the IR receiver. If the IR receiver captures the signal, it indicates the
presence and detection of an object. However, if the surface is absorbent (like black color) or if
the object is absent, the signal is not reflected and hence not detected by the receiver. There is an
IC (LM393) which is an open-collector voltage comparator. It provides an output if there is a
pull-up resistance between the output of the IC (DO) and the power supply Vcc. The output DO
is:
high if the object is not detected;
low if the object is detected.
Lab Exercises
1. Design one application which can compute the proximity of any object using an
ultrasound sensor.
2. Design one application which can compute the proximity of any object using an infrared
sensor.
3. Test and compare the precision of proximity calculations of any object/surface by using
both ultrasound and infrared sensors.
Additional Exercise
1. Write a program that can compute distance of an object using ultrasound sensor while
taking into consideration the environmental parameters of humidity and temperature.
85
[OBSERVATION SPACE] LAB NO: 8
86
[OBSERVATION SPACE] LAB NO: 8
87
[OBSERVATION SPACE] LAB NO: 8
88
[OBSERVATION SPACE] LAB NO: 8
89
[OBSERVATION SPACE] LAB NO: 8
90
[OBSERVATION SPACE] LAB NO: 8
91
LAB NO: 9
Objective:
1. To design a system for movement detection using sensors.
2. To demonstrate applications of various home safety sensors.
PIR SENSOR
PIR sensors are pyroelectric or “passive” infrared sensors which can be used to detect changes in
infrared radiation levels. The sensor is split in half, and any significant difference in IR levels
between the two sections of the sensor will cause the signal pin to swing HIGH or LOW. Hence,
it can be used as a motion detector when IR levels move across and trigger the sensor, like
human movement across a room.
Sensor Specifications
Sensor Name: HC-SR501 PIR Sensor
Input Voltage: 5V – 20V
Output Signal: 0.3V – 5V
Sentry Distance Maximum 7m
Sentry Angle: 110º
Connections
HC-SR501 ARDUINO
Pin 1: Ground GND
Pin 2: OUT Digital Output Pin
Pin 3: Vcc +5V
92
LAB NO: 9
halves. When the warm body leaves the sensing area, the reverse happens, whereby the sensor
generates a negative differential change. These change pulses are detected as presence (or
absence) of a motion. When the PIR detects motion, the output pin will go "high" to 3.3V and
light up the LED.
The PIR has a trim-pot on the back for adjusting sensitivity. This can be adjusted if the PIR is too
sensitive or not sensitive enough - clockwise makes it more sensitive.
The sketch for the PIR sensor can be written to just keeps track of whether the input to pin 2 is
high or low. The state of the pin should also be tracked, so that it prints out a message when
motion has started and stopped.
Lab Exercises
1. Develop an application that detects the presence of an intruder by lighting up an LED.
Use PIR sensor.
2. Modify the above application to send alert messages to a device on detection of an
intruder.
Additional Exercise
1. Develop an automatic lighting system in a room using PIR sensor.
93
[OBSERVATION SPACE] LAB NO: 9
94
[OBSERVATION SPACE] LAB NO: 9
95
[OBSERVATION SPACE] LAB NO: 9
96
[OBSERVATION SPACE] LAB NO: 9
97
LAB NO: 10
Objective:
1. To develop a system for water level monitoring in a tank using sensor.
2. To understand working of various sensors for resource conservation.
Sensor Specifications:
Sensor Name: Water Level Sensor
Operating Voltage: 5V
Working Current: Less than 20mA
Sensor Type: Analog
Working Temperature: 10ºC - 30ºC
Operating Humidity: 10% ~ 90% non-condensing
Connections
To detect whether it is raining, the sensor should be positioned horizontally, so that rain falling
on the sensor film will contribute to the readings of the pin S.An analog value
between VCC and GNDwill be given by pin S. The value read will be higher depending on the
sensor surface is covered with water. This is because the water acts as a conductor.
98
LAB NO: 10
Lab Exercise
1. Develop an application that measures the water level in a water tank and triggers any
form of alarm when water reaches a specific level.
Additional Exercise
1. Make use of both water level sensor and ultrasound sensor to detect water level in a water
tank. Compare the precision with the previous applications. Design the application to be
accessed remotely.
99
[OBSERVATION SPACE] LAB NO: 10
100
[OBSERVATION SPACE] LAB NO: 10
101
[OBSERVATION SPACE] LAB NO: 10
102
[OBSERVATION SPACE] LAB NO: 10
103
[OBSERVATION SPACE] LAB NO: 10
104