Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Exploring IoT Scenarios with Cisco Packet Tracer

Cisco Packet Tracer is a powerful network simulator that permits to investigate the
functioning of a computer network from different levels. As it is provided by Cisco, it
includes a series of original Cisco hardware such as switches or routers, which can be
managed from the console using the same Cisco commands as real devices. However,
this is not the objective of this lab; instead, we are going to explore the IoT features that
this simulator includes as well. You can download the installer for Windows x64, Linux
Ubuntu and MAC OS. Ask the instructor for the password.
The basic scenario is included in the .pkt file provided by the instructor:

Fig. 1. Smart home scenario.

PART 1. EXPLORING THE CURRENT SCENARIO


Now, let’s take some steps for exploring the simulator options and the scenario.
1. Open the .pkt file provided by the instructor

a. File→Open→Browse the system to find the file.


b. Wait until all the interfaces turn from red to green.
c. Now the scenario is running and working!

2. Explore the IoT scenario

a. Take a look at the available IoT end-devices.


At the bottom left corner of the Packet Tracer window, locate and click the [End Devices]
icon in the top row, and the [Home] icon in the bottom row of the Device-Type Selection
box.

Fig. 2. IoT device selection bar.

1
Across the bottom of the Packet Tracer window, the Device-Specific Selection box
displays the many different Smart Home IoT devices available. Move the mouse pointer
over each device and notice that the descriptive name of the device is displayed at the
bottom of the Device-Specific Selection box. Take a moment to look at each device type.

Fig. 3. IoT device detail.


b. Explore the Smart home scenario.
In the Logical workspace is a pre-built smart home network that consists of many wired
and wireless IoT devices, and network infrastructure devices. When you place your
curser over a device, such as the Smart Fan, an informational window opens containing
basic network information about that device.

Fig. 4. IoT device networking information.


To manipulate a device, simply hold down the Alt key on the keyboard and then left-click
the device. Try this on each of the smart devices to observe what they do.
The smart home network also consists of infrastructure devices such as a Home
Gateway. Click the Home Gateway icon to open the Home Gateway window.

Fig. 5. Home Gateway


The Physical tab is selected by default and shows a picture of the Home Gateway. It
shows the real aspect of the device, although not much information is given. To configure
and manipulate the gateway settings go to the Config tab. Now explore the different
options on the left panel.
Let’s focus on the LAN and Wireless options. The first one permits to configure the LAN
IP and netmask of the gateway. In this case, they are 192.168.1.254 and 255.255.255.0.

2
Fig. 6. Home Gateway LAN settings.
In “Wireless” we can configure the WiFi network generated by this device. We can
change the name of the network (SSID), the network channel, the coverage range, and
the security options. For connecting new devices to the network is important to remember
the SSID and the password, as you do at your home :)

Fig. 7. Home Gateway WiFi settings.


SSID: HomeNetwork; Security: WPA2-PSK, Pass Phrase: Secret Key. You can now
close the Home Gateway window.
Now, let’s explore our IoT devices from a control panel. To do so, we have a Tablet
device connected to our network.

Fig. 8. Tablet device.


We are now going to connect to a web server that is placed in the Home Gateway and
that enables the visualization and manipulation of the IoT devices connected to the
network. To do so, click on the tablet icon and move to the Desktop tab (you can now
explore the other tabs and options to be familiarized with the simulation environment).

3
Fig. 9. Tablet’s desktop applications.
Observe and explore the different available desktop applications.
Let’s open the Web browser and type the Home Gateway IP in the address bar:

Fig. 10. Home Gateway IoT server login.


The credentials are: Username: admin; Password: admin.

4
Now you are able to see our two smart devices connected to the IoT server. Manipulate
them from this menu and also by directly clicking (alt + left-click) on the device icon in
the scenario. You can see how the status of the device change in both places.

Fig. 11. IoT server placed in the Home Gateway.

PART 2: ADD A WIRED DEVICE TO THE SMART HOME SCENARIO


1. Add a wired device to the Smart Home scenario.

a. In the Device-Specific Selection box, click the Garage Door icon and then click
in the workspace where you would like to locate the Garage Door.
b. Cable the Garage Door to the Home Gateway. In the Device-Type Selection box,
click the [Connections] icon (this looks like a lightning bolt). Click the Copper
Straight Through connector type icon in the Device-Specific Selection box. Then
click the Garage Door icon and connect one end of the cable to the FastEthernet0
interface. Next, click the Switch icon and connect the other end of the cable to an
available Ethernet interface.

Fig. 12. Connecting a new wired device.

5
You can change the name of the new device by clicking in its name. Now, go to the tablet
device and open again the IoT server for checking if the Garage Door automatically
appears in the device list.
It seems that something is not going well. We have to configure the network setting of
the Garage Door to gain connectivity! To do so, click on the Garage Door icon and go to
the config tab.
First, we have to indicate where is the IoT Server. In Settings, mark the Home Gateway
option, in the IoT server menu.

Fig. 13. Configuring the Garage Door (1st step).


Second, we have to configure the network settings. Go to the FastEthernet0 menu and
select DHCP for the IP configuration. That’s all!

Fig. 14. Configuring the Garage Door (2nd step).

6
Now, the Garage Door should appear in the device list of the Home Gateway Home IoT
server. Again, you can change its status from this menu and directly from the scenario.

Fig. 15. Garage Door added to the Smart home device list.

2. Experiment by adding other wired IoT devices to the Smart home scenario

PART 3: ADD A WIRELESS DEVICE TO THE SMART HOME SCENARIO


1. Add a wireless device to the Smart Home scenario

a. Place a new device in the garden.


In the garden, we do not have available a wired connection. No problem! we can connect
the new device though the WiFi network generated by the Home Gateway. In the Device-
Specific Selection box click the Lawn sprinkler icon and then click in the garden, where
we would like to locate it. Now you can change its name.

Fig. 16. Lawn sprinkler installed in the garden.

7
b. Add a wireless interface to the Lawn sprinkler.
Click the Lawn sprinkler icon in the workspace to open the IoT device window. In the
bottom right corner of the IoT device window, click the Advanced button. Notice more
tabs become visible at the top of the window. Click the I/O Config tab.

Fig. 17. IoT device advanced I/O configuration.


Change the Network Adapter drop down list to PT-IOT-NM-1W, which is a wireless
adapter.
c. Connect the Lawn sprinkler to the WiFi network.
As we did with the Garage Door, click the Config tab and change the IoT Server to Home
Gateway.
Now, go to the Wireless0 options, and fill our WiFi network parameters (SSID and pass).

Fig. 18. Configuring the IoT device WiFi connection.

8
Close the configuration window and check if the Lawn sprinkler if wirelessly connected
to the Home Gateway and if it appears in the device list of the IoT Server in the Home
Gateway.

Fig. 19. Lawn sprinkler correctly configured.

2. Adding a Water meter


Some devices can interact with each other. In this case, we are going to place a water
consumption meter to monitor the Lawn sprinkler.
a. Place the Water meter close to the Lawn sprinkler.
In the Device-Specific Selection box click the Water level monitor icon and then click in
close to the Lawn sprinkler, where we would like to place it. Now you can change its
name.

Fig. 20. Water meter and Lawn sprinkler.

b. Connecting the Water meter to the network.

You may use the Ethernet interface already included in the Water meter to connect it to
the Switch. If we consider the lack of wired connectivity in the garden, you should connect
this element to the WiFi network as we did previously with the Lawn sprinkler. Go ahead!

9
If you have configured well your Water meter connection, it should appear in the device
list of the IoT Server. Now, switch on and off the Lawn sprinkler and observe how the
reading of the Water meter continuously varies.

Fig. 21. Water meter working.

PART 4: THINGS INTERACTION


Internet of Things is about devices doing actions automatically and interacting with each
other. Let’s create some IFTTT (If This, Then That) rules to enable the interaction
between two devices.
To start, install a Motion detector in the main door and connect it through the WiFi Home
network.

Fig. 22. Motion detector installed and connected to the WiFi network.
Now, we would like to create an automated action by which when the Motion detector
detects movement (alt + left-click on it) the lamp switches on. To do that, open the
IoTServer through the Tablet and go to the Conditions tab. Once there, the procedure is
quite simple. Click on Add and configure the options as in Fig. 23.

10
Fig. 23. Adding a IFTTT rule.
Press OK, and a new rule should be created. Now switch on/off the Motion detector. The
lamp only switches on, but not switches off! We should create a new rule for switching it
off, when the motion detector does not detect anything.

Fig. 24. Two rules defined.

Now the lamp should switch on/off when the Motion detector changes its status.

11
PART 5: LET YOUR IMAGINATION FLY

Now you have the basic knowledge to deploy your own smart environment. Go to your
favorite web browser, download a picture of your basic scenario (city, building, farm,
agriculture field, harbor, factory….) and turn it smart!
To add a new picture as the layout background, just select the “Set background image”
option in the top right corner of the workspace.

Fig. 25. Adding a new background image.

Begin by placing a Home Gateway (Network devices → Wireless Devices → Home


Gateway), place as many IoT devices as you desire and make them interact among each
other!

Fig. 26. Adding the Home Gateway.

12

You might also like