You are on page 1of 47

Architecture and Design

Principles for IoT

Module2
Soorya Krishna K
Oct 2021 to March 2022
Vision & Mission of the Institute
Vision

To be a premier institute of professional education and


research, responsive to the needs of industry and society.
Mission

To achieve academic excellence through innovative teaching-


learning practice, by providing conducive research
environment, industry-institute interaction and skill
development, leading to professionals with ethical values
and
IoT & social responsibilities.
WSN,7th Sem, Soorya Krishna, SIT, ECE 2
Department Vision

To be a centre of excellence in Electronics and


Communication Engineering with quality
education and research, responsive to the
needs of industry and society.

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 3


Department Mission

To achieve academic excellence through
innovative teaching-learning practice.

To inculcate the spirit of innovation,
creativity and research.

To enhance employability through skill
development and industry-institute
interaction.

To develop professionals with ethical values
and social responsibilities.
IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 4
POs
PO1. Engineering knowledge: Apply the knowledge of mathematics, science, engineering
fundamentals, and an engineering specialization to the solution of complex engineering
problems.
PO2. Problem analysis: Identify, formulate, review research literature, and analyze complex
engineering problems reaching substantiated conclusions using first principles of mathematics,
natural sciences, and engineering sciences.
PO3. Design/development of solutions: Design solutions for complex engineering problems and
design system components or processes that meet the specified needs with appropriate
consideration for the public health and safety, and the cultural, societal, and environmental
considerations.
PO4. Conduct investigations of complex problems: Use research-based knowledge and research
methods including design of experiments, analysis and interpretation of data, and synthesis of
the information to provide valid conclusions.
PO5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern
engineering and IT tools including prediction and modeling to complex engineering activities
with an understanding of the limitations.
PO6. The engineer and society: Apply reasoning informed by the contextual knowledge to assess
societal, health, safety, legal and cultural issues and the consequent responsibilities relevant to
the professional engineering practice.

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 5


POs
PO7. Environment and sustainability: Understand the impact of the professional engineering
solutions in societal and environmental contexts, and demonstrate the knowledge of, and
need for sustainable development.
PO8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities
and norms of the engineering practice.
PO9. Individual and team work: Function effectively as an individual, and as a member or
leader in diverse teams, and in multidisciplinary settings.
PO10. Communication: Communicate effectively on complex engineering activities with the
engineering community and with society at large, such as, being able to comprehend
and write effective reports and design documentation, make effective presentations, and
give and receive clear instructions.
PO11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a
member and leader in a team, to manage projects and in multidisciplinary
environments.
PO12. Life-long learning: Recognize the need for, and have the preparation and ability to
engage in independent and life-long learning in the broadest context of technological
change.

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 6


Program Educational Objectives
(PEOs)

Graduates will be,


PEO1: Competent professionals in the field of
Electronics and Communication Engineering to
pursue careers in diverse fields and higher
education.
PEO2: Proficient in designing innovative solutions to
real life problems that are technically sound,
economically viable and socially acceptable.
PEO3: Capable of working in teams and adapting to
new technologies as per the society needs with
ethical values.
IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 7
Program Specific Outcomes (PSOs)

PSO1: Hardware and hardware-software co-design: Ability to


identify, design, simulate, analyse and develop
Electronic circuits and systems, using modern
engineering tools and programming languages.

PSO2: Domain specific skills: Ability to work in the field


of Embedded System, VLSI, Image Processing, Machine
learning and Network Engineering.

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 8


Course Oucome (Cos): At the end of the
course the student will be able to:

COs Statements RBT Level

CO 1 Understand the architecture and design principles of IoT. L1, L2, L3

CO 2 Describe the OSI Model for the IoT/M2M Systems. L1, L2, L3

CO 3 Learn the programming for IoT Applications. L1, L2, L3

CO 4 Analyze
network. basic protocols and architecture in wireless sensor L1, L2, L3

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 9


Course Learning Objectives:
Course Objectives: This course will enable students to:

Understand various sources of IoT & M2M communication


protocols.
Describe Cloud computing and design principles of IoT.
Become aware of MQTT clients, MQTT server and its
programming.
Understand the architecture and design principles of
WSNs.
Enrich the knowledge about MAC and routing protocols in
WSNs.
IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 10
Syllabus

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 11


INTERNET CONNECTIVITY

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 12


IoT Definition
• The Internet is a vast global network of
connected servers, computers, tablets and
mobiles that is governed by standard
protocols for connected systems. It enables
sending, receiving, or communication of
information, connectivity with remote
servers, cloud and analytics platforms.
• thing is a word used to refer to a physical
object, an action or idea. Example —an
umbrella is a useful thing in rainy days.

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 13


INTERNET-BASED COMMUNICATION

When data transmits from layer i to the next layer j ,


following are the actions that occur:
● Each layer’s processing of data is as per the
protocol used for communication by that layer.
● Each layer sends the data stack received from the
previous upper layer plus a new header, and thus
creates a fresh stack after performing the actions
specified at that layer.
● Layer j will specify new parameters as per protocol
and create fresh stack for the subsequent lower layer.
● The process continues until data communicates
over the complete network.
IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 14
INTERNET-BASED COMMUNICATION

When data is received at the next layer i from a layer j , i.e.


IoT device physical layer to the
IoT application, the following actions are performed:
● Each layer performs the processing as per the header
field bits, which are received according to the protocol to be
used for decoding the fields for the required actions at that
layer.
Each layer receives the data stack from the previous lower
layer and after the required actions, it subtracts the header
words and creates a new stack specified for the next
higher layer.
● The process continues until the data is received at the
port on the highest application layer.

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 15


INTERNET-BASED COMMUNICATION

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 16


Internet Protocol Version 4

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 17


Internet Protocol Version 6
• Provisions a larger addressing space
• ● Permits hierarchical address allocation, and thus
route aggregation across the Internet, and limit the
expansion of routing tables
• ● Provisions additional optimisation for the delivery of
services using routers, subnets and interfaces
• ● Manages device mobility, security and
configuration aspects
• ● Expanded and simple use of multicast addressing
• ● Provisions jumbo grams (big size datagram)
• ● Extensibility of options

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 18


Internet Protocol Version 6
While an IPv4 address is of size 32-bit,
the IPv6 address has a size of 128 bits.
IPv6 has a vastly enlarged address
space compared to Ipv4.
The IPv6 address provides a numerical
label.
It identifies a network interface of a
node or other network nodes and
subnets participating in IPv6 Internet.
IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 19
RPL [IPv6 Routing Protocol for Low
Power Lossy Networks (LLNs)]
Low data transfer rate relative to IP, a low
packet delivery-rate and unstable links.
IETF has given specifications for RPL for the
ROLL network.
RPL is a non-storing routing mode.
IoT/M2M low power lossy environment uses
RPL protocol.
Internet layer IPv6 receives and transmits
from/to data-adaptation layer when using
IEEE 802.15.4 WPAN devices.
IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 20
RPL [IPv6 Routing Protocol for Low
Power Lossy Networks (LLNs)]
Low power nodes need to confine communication to the
nearest
upwards or downwards.
Lossy environment needs disjoint nodes, as in case of error or
no acknowledgment, a repeat transmission can be made
using the same previous instance.
Data communicate with optimum data size at an instance.
Data flow between the nodes is as per Destination Oriented
Directed Acyclic Graph (DODAG) model.
Directed acyclic graph is a data flow model between the
nodes.
Destination orientation means either upwards (for transport)
or downward directed (for device-layer end-node) in a tree-
like structure of DODAGs.
IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 21
The features of RPL are
A routing protocol for the LLNs
● RPL-controlled messages are Destination Advertisement Object (DAO), DODAG
Information Object (DIO) and DAG Information Object (DIO)
● Transfers data at an RPL instance data point to point (one device nodes to one
receiver
node) as well as point to multipoint (one to many device nodes) or multipoint to point
(many device nodes to one receiver node)
● Sends or receives multiple DODAGs at each instance
● Sends data from DODAGs to DODAG root or DODAG leaves to support low data
transfer rate, compared to IP low packet delivery rate
● Supports unstable links
● Has optimisation objective for an RPL instance
● Supports coexistence of different optimisation objectives using multiple RPL instances
● Supports nodes, inform parents of their presence and reach ability to descendants
using DIOs
● Supports soliciting (seeking) information of a DODAG using DIS
● Supports destination, inform nodes for discovery of an RPL instance, know about
configuration parameters and select DODAG parents using DIOs

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 22


Example
Problem
(a) Give an example of the DODAG data-flow approach for RPL assuming routing nodes
at four ranks (levels) 0, 1, 2 and 3 consisting of 3, 6, 3 and 6 nodes, respectively. The
node communicates in the RPL network environment. (b) How do the paths (called RPL
instances) establish for DODAG data flow? (c) List the DODAG
characteristics taking the nodes assumed in the example.

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 23


Example

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 24


Example

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 25


Example

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 26


6LoWPAN

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 27


6LoWPAN
6LoWPAN has the following features:
● Specifies the IETF recommended methods for reassembly of
fragments, and IPv6 and UDP (or ICMP) headers compression
(6LoWPAN-hc adaptation layer), neighbour discovery (6LoWPAN-
nd adaptation layer), and
● Supports mesh routing
ICMP stands for Internet Control Message Protocol.
Routers or other devices on the network send error messages or
relay the query messages.
6LoWPAN can be implemented using Berkley IP implementation
with operating system TinyOS or 3BSD or other implementations
for IoT nodes from Sensinode or Hitachi or others.
IPv6 network layer has two options, viz. RH4 routing header and
hop-to-hop header RPL option.

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 28


6LoWPAN
6LoWPAN is an adaptation-layer protocol for the IEEE 802.15.4
network devices.
The devices are the nodes having low speed and low power. They
are the WPAN nodes of a multiple device mesh network.
Low-power devices need to limit data size per instance. Data
compression reduces data size. Fragmentation of data also
reduces data size per instance.
Features of 6LoWPAN are header
compression, fragmentation and reassembly.
When data is fragmented before communication, the first
fragment header has 27 bits which includes the datagram size (11
bits) and a datagram tag (16 bits).
Subsequent fragments have header 8 bits which include the
datagram size, datagram tag and the offset. Fragments
reassembly time limit can be set equal to 60s.
IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 29
IP ADDRESSING IN THE IoT

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 30


IP ADDRESSING IN THE IoT

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 31


IP ADDRESSING IN THE IoT

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 32


IP ADDRESSING IN THE IoT

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 33


IP ADDRESSING IN THE IoT

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 34


IP ADDRESSING IN THE IoT

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 35


IP ADDRESSING IN THE IoT

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 36


IP ADDRESSING IN THE IoT

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 37


IP ADDRESSING IN THE IoT

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 38


IP ADDRESSING IN THE IoT

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 39


IP ADDRESSING IN THE IoT

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 40


APPLICATION LAYER PROTOCOLS:
HTTP, HTTPS
• Hyper Text Transfer Protocol (HTTP) port number is 80. A web HTTP
server listens to port 80 only and responds to port 80 only.
• An HTTP port sends application data stack at the output to the lower
layer using the HTTP protocol.
• An HTTP port uses a URL like http://www. mheducation.com/. The
default port is taken as 80. The port number can be specified after the
TLD. For example, after ‘.com’ in URL http://www.
mheducation.com:80/.
• HTTPS (HTTP over Secure Socket Layer or TLS) port number is 443. An
HTTPS port sends a URL; for example,
https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers. Here,
TLD is .org, domain name is wikipedia.org and Subdomain name is
en.Resource URL is at /wiki/List_of_TCP_and_UDP_port_numbers.
• The port receives the data stack at the input at the receiver end. Each
port at the application layer uses a distinct protocol.
• A port is assigned a number according to protocol used for transmission
and reception.

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 41


HTTP Features
• HTTP is the standard protocol for· requesting a URL defined web-page
resource, and for sending a response to the web server.
• An HTTP client requests an HTTP server on the Internet and the server
responds by sending a response. The response may be with or without
applying a process.
• HTTP is a stateless protocol. This is because for an HTTP request, the protocol
assumes a fresh request.
• It means there is no session or sequence number field or no field that is
retained in the next exchange. This makes a current exchange by an HTTP
request independent of the previous exchanges. The later exchanges do not
depend on the current one.
• E-commerce like application needs a state management mechanism. The
stateless feature of HTTP is compensated by a method as: A cookie is a text
file which creates during a particular pair of exchanges of HTTP request and
response. The creation is either at a CGI or processing program.
• For example, JavaScript or script or at a client. A prior exchange may then
depend on this cookie. The cookie thus provides an HTTP state management
mechanism.

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 42


HTTP Features
• ●Basically, HTTP is a file transfer-like protocol. We use it more efficiently than
the FTP (a protocol for a file transfer on the Internet) because in FTP, we have to
give a certain command. Then, a communication establishes between two
systems just to retrieve a specified file. On the other hand, HTTP is simple.
There are no command line overheads. This makes it easy to explore a website
URL. A request (from a client) and reply (from a server) is the paradigm.
• The HTTP protocol is very light (a small format) and thus speedy as compared
to other protocols, such as FTP. HTTP is able to transfer any type of data to a
client provided it is capable of handling that data.
• HTTP is flexible. Assume during a client web connection, the connection breaks.
The client can start by re-connecting. Being a stateless protocol, HTTP does not
keep track of the state as FTP does. Each time a connection establishes
between the web server and the client, both these interpret this connection as a
new connection. Simplicity is a must because a webpage has the URL resources
distributed over a number of servers.
• HTTP protocol is based on Object Oriented Programming System (OOPS).
Methods are applied to objects identified by a URL. It means as in the normal
case of an Object Oriented Program, various methods apply on an object.

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 43


HTTP Features
Following features have been included from HTTP 1.0 and 1.1 version onwards:
(a) Multimedia file access is feasible due to provision for the MIME (Multipurpose
Internet Mail Extension) type file definition. Eight HTTP specific specified methods and
extension methods included from HTTP 1.1 version onwards. The HTTP specific
methods are as follows.
1. GET. 2. POST. 3. HEAD. 4. CONNECT. 5. PUT. 6. DELETE. 7. TRACE. 8. OPTIONS.
Earlier versions, GET follows a space and then the document name.
The server returns the documents and closes the connection. The POST method permits
form processing as using it the client transmits the form data or other information to
the server from 1.1.
Also, the server does not close the connection after response and thus response
can be processed before it is sent. A provision of user authentication exits besides the
basic authentication. Digest Access Authentication prevents the transmission of
username and password as HTML or text from HTTP 1.1 version onwards.
A host header field adds to support those ports and virtual hosts that do not accept
or send IP packets. An Error report to Client when an HTTP request is without a Host
header field from HTTP 1.1 version onwards.
An absolute URL is acceptable to the server. In the earlier version, only a proxy server
accepted that.

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 44


HTTP Features
Message Headers uses are: A message during a request from a client or during a
response from a server consists of two parts—a start-line, none or several message-
headers
(fields) and empty line, and body of the message. Message headers are
Common (general) headers are added when requesting a server and when responding
to a client. A header includes MIME version, OPTIONS, cacheable or not cacheable,
and transfer to close or not close the connection.
❍ Request headers are for a request and client information to a server. The header
includes acceptable media or preferred specification—specifies about acceptability
of HTML or HTML or text or any other type informs if a special type of character
set acceptable.
❍ Entity headers contain information about the entity body contained in the message
or in case the body is not present then information about the entity is not present
its body. For example, information for content-length in bytes.
❍ Response headers are present in the response for server information to a client.

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 45


HTTP Features

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 46


HTTP Features

IoT & WSN,7th Sem, Soorya Krishna, SIT, ECE 47

You might also like