UNIT-4 Data Link Layer of IoT

You might also like

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

INTERNET OF THINGS UNIT-4

UNIT-4 Data link layer of IoT

Wireless Communication Technology


The physical come data link layer uses wire or wireless Technologies. Examples of wireless
communication Technologies are NFC, RFID, Zigbee, Bluetooth, RF transceivers, and RF modules. In
previous units, already discussed Bluetooth and Wi-Fi technology.

Near-Field Communication (NFC)

NFC is a short-distance (20 cm) wireless communication technology. It enables data


exchange between cards in proximity and other devices. Near-field communication is the ultimate in
connectivity. With NFC, you can transfer information between devices quickly and easily with a
single touch—whether paying bills, exchanging business cards, downloading coupons, or sharing a
research paper.NFC devices transmit and receive data at the same instance and the setup time
(time taken to start the communication) is 0.1 s. The device or its reader can generate RF fields for
nearby passive devices such as passive RFID. An NFC device can check the RF field and detect the
collision of transmitted signals. The device can check collision when the received signal bits do not
match the transmitted signal bits.

Features of an NFC device are:


➔ The range of functioning is within 10 to 20 cm. The device can also communicate with Bluetooth
and Wi-Fi devices in order to extend the distance from 10 cm to 30 m or higher.
➔ The device is able to receive and pass the data to a Bluetooth connection or standardized LAN or
Wi-Fi using information handover functions. Device data transfer rates are 106 kbps, 212 kbps,
424 kbps, and 848 kbps (bps stands for a bit per second, kbps for kilobit per second).

Three modes of communication are:


1. Point-to-point (P2P) mode: Both devices use the active devices in which RF fields alternately
generate when communicating.
2. Card-emulation mode: Communication without interruption for the read and write as required in
a smart card and smart card reader. FeliCa "and Mifare standards are protocols for reading and
writing data on the card device and reader, and then the reader can transfer information to
Bluetooth or LAN.

N.Kishore Chandra Dev,Asst Prof., SRKREC 1


INTERNET OF THINGS UNIT-4

3. Reader mode: Using NFC the device reads passive RFID device. The RF field is generated by an
active NFC device. This enables the passive device to communicate.

Radio Frequency Identification (RFID)

Radio Frequency Identification (RFID) is an automatic identification method. Radio Frequency


Identification (RFID) refers to a wireless system comprised of two components: tags and readers.
The reader is a device that has one or more antennas that emit radio waves and receive signals
back from the RFID tag. Tags, which use radio waves to communicate their identity and other
information to nearby readers, can be passive or active. Passive RFID tags are powered by the
reader and do not have a battery. Active RFID tags are powered by batteries.
The object can then be tracked for movements. The object may be a parcel, person, bird, or animal.
loT applications of RFID are in business processes, such as parcel tracking and inventory control,
sales log-ins, and supply-chain management.

How does RFID work?


Every RFID system consists of three components: a scanning antenna, a transceiver, and a
transponder. When the scanning antenna and transceiver are combined, they are referred to as an
RFID reader or interrogator.
➔ There are two types of RFID readers -- fixed readers and mobile readers.

N.Kishore Chandra Dev,Asst Prof., SRKREC 2


INTERNET OF THINGS UNIT-4

➔ The RFID reader is a network-connected device that can be portable or permanently attached.
➔ It uses radio waves to transmit signals that activate the tag.
➔ Once activated, the tag sends a wave back to the antenna, where it is translated into data.
➔ The transponder is in the RFID tag itself.
➔ The read range for RFID tags varies based on factors including the type of tag, type of reader,
RFID frequency and interference in the surrounding environment or from other RFID tags and
readers.
➔ Tags that have a stronger power source also have a longer read range.
➔ RFID tags can store a range of information from one serial number to several pages of data.
➔ Readers can be mobile so that they can be carried by hand, or they can be mounted on a post or
overhead.
➔ Reader systems can also be built into the architecture of a cabinet, room, or building.

Features of RFID:
➔ A unique ID: As automation and artificial intelligence become increasingly prevalent in business;
there needs to be a closer relationship between computers and the physical environment. RFID
provides the means to accurately identify individual components, batches of materials,
construction equipment, retail goods, or other items.
➔ Automatic recognition: Tags are attached to items and transmit the stored ID to readers. The
readers may be positioned at fixed points such as ‘goods out’ or ‘goods in’ or at specific locations

N.Kishore Chandra Dev,Asst Prof., SRKREC 3


INTERNET OF THINGS UNIT-4

within a chemical processing plant, As each item passes by, the reader will automatically scan
the ID.
➔ No need for batteries: Passive RFID tags – the most common type – are activated by the reader’s
power source so they do not require batteries. This means that tags can be very small – tiny
enough for them to be embedded in miniature devices. They also have a very long life and some
can survive outdoors in all conditions for ten years and beyond. Typically, passive tags are used
for items that need to be read within a range from 1mm up to about 10m.
➔ Can detect ‘hidden’ objects: Unlike bar codes, with RFID the object being scanned does not
necessarily have to be within the direct line of sight. Files in racks or items moving on conveyor
belts, can be detected simply by positioning the reader correctly.
➔ Multiple tags can be read at once: One RFID reader can collect data from a large number of tags
simultaneously – unlike barcodes where each item has to be scanned separately. This makes it
possible to collect data en masse which can save a huge amount of time. The contents of an
entire pallet can be scanned as it leaves the warehouse, or a stock check of the contents of a
shelving rack can be carried out without removing each item.
➔ Rugged and weatherproof: RFID tags can be more robust than barcodes or other print labels
and can be used even in the most demanding environments.
➔ Tracking assets and managing inventory
➔ Saving time and money through automation
➔ Improving data accuracy and availability

RF Transceivers and RF Modules

RF transmitters, receivers, and transceivers are the simplest RF circuits. A transceiver


transmits the RF from one end and receives the RF from the other end, but internally has an
additional circuit, which separates the signals from both ends. An oscillator generates RF pulses of
the required active duty cycle and connects to a transmitter. BT, ZigBee, and Wi-Fi radios deploy
ISM band transceivers, which have comparatively complex circuits.
IoT/M2M applications deploy ISM band RF modules with transceivers or just transmitters or
receivers. A number of systems use RF modules for applications needing wireless connectivity; for
example, security, telemetry, telematics, fleet management, Home automation, healthcare,
automobiles wireless tire pressure monitors, backup cameras and GPS navigation service, payment
wallets, RFID, and maintenance.

N.Kishore Chandra Dev,Asst Prof., SRKREC 4


INTERNET OF THINGS UNIT-4

RF technology consists of the following elements:


➔ RF interface/physical layer, RF signals transmitted between the nodes or endpoints, i.e. the
sensors, actuators, controllers, and a gateway where signals are received. Physical layer
specifications consist of signal aspects and characteristics, including the frequencies, modulation
format, power levels, the transmitting and receiving mode, and signaling between end-point
elements.
➔ RF network architecture includes the overall system architecture, backhaul, server, and
bidirectional end-devices with radio duty cycling in the applications. Radio duty cycling means
managing the active intervals, transmission and receiving schedule, and time-intervals actions on
an event during the active intervals and actions during the inactive (sleep) intervals using the RF
Integrated Circuits (RFICs).

GPRS/GSM Cellular Networks-Mobile Internet

An loT/M2M communication gateway can access a Wireless Wide Area Network (WWAN).
The network access may use a GPRS cellular network or a new-generation cellular network for
Internet access.
A mobile phone provision for a USB wired port, BT, and Wi-Fi connectivity. Wireless
connectivity for the Internet uses data connectivity using GSM, GPRS, UMTS/LTE, and WiMax
services of a mobile service provider or Wi-Fi using a modem. A phone, generally, provisions for a
number of sensors also; for example, acceleration, GPS, and proximity.

Wireless USB

Wireless USB is a wireless extension of USB 2.0 and it operates at ultra-wideband (UWB)
5.1 GHz to 10.6 GHz frequencies. It is for short-range personal area networks (high speed 480 Mbps
3 m or 110 Mbps 10 m chanrnel). FCC recommends a host wire adapter (HWA) and a device wire
adapter (DWA), which provides a wireless USB solution. Wireless USB also supports dual-role
devices (DRDs). A device can be a USB device as well as a limited-capability host.

N.Kishore Chandra Dev,Asst Prof., SRKREC 5


INTERNET OF THINGS UNIT-4

Wired Communication Technology

Wired communication can be serial asynchronous communication (for example, UART


interface) or synchronous serial communication (for example, SPI interface or parallel input, output,
and input-output ports at the devices). Communication can be over a bus in a number of systems
(chips, units, integrated circuits, ports, or interfacing circuits) connect through a common set of
interconnections. manner. Communication is between a master at a given instance (sender) and the
destined address only from a source at an instance. The signals may be sent in a serial or parallel
bus refers to a number of systems connected through a common set of control, that address data
signals such that the data signals are accepted by the device at the destination and address the
computer (listener) at an instance. Wired communication can be done using Ethernet IEEE 802.2 bus
specifications. A MAC sublayer data frame may be according to Ethernet Protocol. Wired
communication can also use a USB port, a micro USB, or a USB 3.0 adapter.

UART/USART Serial Communication


A Universal Asynchronous Transmitter (UART) enables serial communication (transmission)
of 8 bits serially with a start bit at the start of transmission of a byte on the serial Transmitter Data
(TxD) output line.
➔ Serial means present one after another at successive time intervals.
➔ Asynchronous refers to all bytes in a frame transmission, which can result in variation in time
interval spacing or phase differences between successive bytes and in-between wait intervals.
➔ This is because the clock information of the transmitter does not transmit along with the data.
The receiver clock also does not synchronize with the data.
➔ Further, successive sets of bytes may wait after transmission till an acknowledgment is received
from the receiving end.
➔ The intervals of each transmitted bit are controlled by a clock.
➔ When the clock period is T 0.01 µs, then the period for transmission of a byte on TxD = 10 T= 0.1
µs. A byte's transfer rate is 1 MBps.
➔ The reciprocal of T in UART is called the Baud rate.
➔ When an additional bit appends between the stop bit and the last bit of the byte, then T= 0.11
µs. An additional bit can be used to identify the received byte on the serial line as the address or
data. It can be used for error detection.
➔ UART receives the byte at RxD (transmitter data) input line.

N.Kishore Chandra Dev,Asst Prof., SRKREC 6


INTERNET OF THINGS UNIT-4

➔ A Universal Synchronous Asynchronous Transmitter (USART) enables serial communication


(transmission) in synchronous as well as asynchronous modes. Synchronous means all bytes in a
frame transmit with equal time spacing or equal phase differences.

Serial Peripheral Interface


Serial Peripheral Interface (SPI) is one of the widely used serial synchronous communication
methods. The Source of serial synchronous output or input is called the master when it also controls
the synchronizing clock information to the receiver. A receiver of serial synchronous input or output
is called a slave, when along with the serial data it also receives the synchronizing Clock information
from the master. Four sets of signals, viz., SCLK, MISO, MOSI, and S5 Slave select) are used on four
wires. When SS is active, then the device functions as a slave.
Master Input Slave Output (MISO) and Master Output Slave Input (MOSI) are synchronous
serial bits I/Os at the master and slave and IOs are as per synchronising clock of the master SCLK.
MOSI is output from the master and input at the slave and SCLK (clock information or signal) is from
the master to the slave. The slave synchronises and receives the input bits at MOSI from the master
as per the SCLK input at the slave. MISO is synchronous serial input at the master for the serial
output from the slave. The slave synchronises output as per SCLK of the master. The master
synchronizes the input as per SCLK of the master.
I2C Bus
A number of device-integrated circuits for sensors, actuators, flash memory and touchscreens
need data exchanges in a number of processes. ICs mutually network through a common
synchronous serial bus, called an inter-integrated circuit (I2C). Four potential modes of operation
(viz. master transmit, master receive, slave transmit and slave receive) for I2C bus devices and
generally most devices have a single role and use two modes only.
The I2C was originally developed at Philips Semiconductors. There are three I2C bus
standards: Industrial 100 kbps I2C, 100 kbps SM I2C and 400 kbps I2C. I2C bus has two lines that
carry the signals-one line is for the clock and one is for bidirectional data. I2C bus protocol has
specific fields. Each field has a specific number of bits, sequences and time intervals between them.
Wired USB
Universal Serial Bus (USB) is for fast serial transmission and reception between the hosts, the
embedded system, and distributed serial devices; for example, like connecting a keyboard, printer or
scanner. USB is a bus between the host system and a number of interconnected peripheral devices.

N.Kishore Chandra Dev,Asst Prof., SRKREC 7


INTERNET OF THINGS UNIT-4

➔ Maximum 127 devices can connect with a host. USB standard provides a fast (up to 12 Mbps) as
well as a low-speed (up to 1.5 Mbps) serial transmission and reception between the host and
serial devices. Both the host and device can function in a system.
➔ USB three standards are USB 1.1 (1.5 and 12 Mbps), 2.0 (mini size connector) 480 Mbps, 3.0
(micro size connector) 5 Gbps and 3.1 (super speed 10 Gbps).
Features of a USB are:
➔ USB data format and transfer serial signals are Non-Return to Zero (NRZI) and the clock is
encoded by inserting synchronous code (SYNC) field before each packet.
➔ The receiver synchronises bit recovery clock continuously.
➔ The data transfer is of four types-controlled data transfer, bulk data transfer, interrupt-driven
data transfer and isosynchronous transfer.
➔ USB is a polled bus.
➔ Polling mode functions as: A host controller regularly polls the presence of a device as scheduled
by the software. It sends a token packet. The token consists of fields for type, direction, USB
device address and device end-point number.
➔ The device does handshaking through a handshake packet, indicating successful or unsuccessful
transmission. A CRC field in a data packet permits error detection.
➔ A USB supports three types of pipes-Stream with no USB-defined protocol is used when the
connection is already established and the data flow starts,
➔ Default control ís for providing access. Message is for control functions of the device. The host
configures each pipe with the data bandwidth to be used, transfer service type and buffer sizes.

Ethernet
The most popular and oldest LAN technology is Ethernet Protocol, so it is more frequently
used in LAN environments and is used in almost all networks like offices, homes, public places,
enterprises, and universities. Ethernet has gained huge
popularity because of its maximum rates over longer
distances using optical media.
➔ Ethernet standard is IEEE 802.2 (ISO 8802.2)
protocol for local area networks of computers,
workstations, and device LANs. Each frame at a LAN
consists of a header.

N.Kishore Chandra Dev,Asst Prof., SRKREC 8


INTERNET OF THINGS UNIT-4

➔ Ethernet enables the services of local device nodes, computers, systems, and local resources,
such as printers, hard disk space, software, and data.
➔ the main reason to use Ethernet widely is, simple to understand, maintain, and implement,
provides flexibility and permits less cost network implementation.
How Ethernet Protocol Works?
Ethernet protocol mainly works in the first two layers in the OSI network model data-link &
physical. Ethernet at the first layer uses signals, bitstreams that move on the media, physical
components that situate signals on media & different topologies.
➔ Ethernet plays a key role at Layer 1 in the communication that occurs between different devices,
however, every function of this has some limitations.
➔ The sub-layers of Data Link give significance to technological compatibility & computer
communications.
➔ Ethernet protocol simply divides the Data Link layer functions into two separate sublayers like
the Logical Link Control sublayer & the Media Access Control sublayer.
➔ The functions of the Data Link layer in the OSI model are allocated to both the sublayers like
LLC & MAC.
➔ The Logical Link Control (LLC) handles the communication between the upper layers & the
lower layers.
➔ The LLC layer uses the data of network protocol like IPv4 packet & adds control data to help in
delivering the packet toward the destination node.
➔ The second layer (Layer 2) interacts through the higher layers using LLC which can be
implemented within software & its implementation is independent of the physical devices.
Advantages
The advantages of Ethernet protocol include the following.
➔ Uses wired bus topology, and transmission speeds are 10 Mbps, 100 Mbps (unshielded and
shielded wires), 1 Gbps (high-quality coaxial cable), 4 Gbps (in twisted pair wiring mode), and 10
Gbps (fiber-optic cables).
➔ Uses MAC-based on CSMA/CD (Carrier Sense Multiple Access with Collision Detection). The
CSMA/CD mode is half-duplex (wired mode) which means transmit (Tx) and receive (Rx) signals
can be sent on the same wire or data path.
➔ Security, speed, efficiency, and reliability.
➔ The Gigabit Ethernet provides very fast speed like 1Gbps. Its speed mainly ranges from above 10
times as compared to Fast Ethernet.
➔ Less cost.

N.Kishore Chandra Dev,Asst Prof., SRKREC 9


INTERNET OF THINGS UNIT-4

➔ It does not need any hubs or switches


➔ Simple maintenance
➔ It is very strong toward the noise.
➔ The data transfer doesn’t degrade.
➔ The quality of data transfer is good.

Applications
The applications of Ethernet protocol include the following.
➔ It is simply used for connecting several devices within a network through each other.
➔ It is also used for connecting Wi-Fi router to the entry port of an internet otherwise telephone
line.
➔ It can also be used to connect devices wirelessly that need a network or internet to work like
laptops, TV, electronic gadgets, etc.
➔ These are used in different organizations like hospitals. Companies, schools, etc
➔ These are very famous due to their security, dependability & speed.

Network Layer of IoT

Network is the OSI Level 3 layer and is the internet layer in the TCP-IP model. Like Physical
and MAC layers, the network layer is also part of the infrastructure layer in IoT reference
architecture. This layer is responsible for addressing and routing of data packets. At this layer, the
datagram from the transport layer is encapsulated in data packets and delivered to their
destinations using IP addressing. IPv4 had been the standard protocol for the network layer until
now. The IPv4 has a limited address space which has already been exhausted and is incapable to
cope with the scalability of the IoT applications. The new IPv6 standard has been developed to
accommodate address space sufficient to enable addressing the billions of IoT devices.

IPv4
An IP stands for internet protocol. An IP address is assigned to each device connected to a
network. Each device uses an IP address for communication. It also behaves as an identifier as this
address is used to identify the device on a network. It defines the technical format of the packets.
Mainly, both the networks, i.e., IP and TCP, are combined together, so together, they are referred to
as a TCP/IP. It creates a virtual connection between the source and the destination.

N.Kishore Chandra Dev,Asst Prof., SRKREC 10


INTERNET OF THINGS UNIT-4

We can also define an IP address as a numeric address assigned to each device on a network.
An IP address is assigned to each device so that the device on a network can be identified uniquely.
To facilitate the routing of packets, TCP/IP protocol uses a 32-bit logical address known as
IPv4(Internet Protocol version 4).
An IP address consists of two parts, i.e., the first one is a network address, and the other one
is a host address.
Network part: The network part indicates the distinctive variety that’s appointed to the network.
The network part conjointly identifies the category of the network that’s assigned.
Host Part: The host part uniquely identifies the machine on your network. This part of the IPv4
address is assigned to every host.
IPv4
IPv4 is version 4 of IP. It is a current version and the most commonly used IP address. It is a
32-bit address written in four numbers separated by a 'dot', i.e., periods. This address is unique for
each device.
For example, 66.94.29.13
➔ The above example represents the IP address in which each group of numbers separated by
periods is called an Octet. Each number in an octet is in the range of 0-255.
➔ This address can produce 4,294,967,296 possible unique addresses.

Characteristics of IPv4
➔ IPv4 could be a 32-Bit IP Address.
➔ IPv4 could be a numeric address, and its bits are separated by a dot.
➔ The number of header fields is twelve and the length of the header field is twenty.
➔ It has Unicast, broadcast, and multicast styles of addresses.
➔ IPv4 supports VLSM (Virtual Length Subnet Mask).
➔ IPv4 uses the Post Address Resolution Protocol to map to the MAC address.
➔ RIP may be a routing protocol supported by the routed daemon.
➔ Networks ought to be designed either manually or with DHCP.
➔ Packet fragmentation permits from routers and causes host.

N.Kishore Chandra Dev,Asst Prof., SRKREC 11


INTERNET OF THINGS UNIT-4

IPv4 Datagram Header

➔ Size of the header is 20 to 60 bytes.


➔ VERSION: Version of the IP protocol (4 bits), which is 4 for IPv4
➔ HLEN: IP header length (4 bits), which is the number of 32-bit words in the header. The
minimum value for this field is 5 and the maximum is 15.
➔ Type of service: Low Delay, High Throughput, Reliability (8 bits)
➔ Total Length: Length of header + Data (16 bits), which has a minimum value of 20 bytes and a
maximum is 65,535 bytes.
➔ Identification: Unique Packet Id for identifying the group of fragments of a single IP datagram
(16 bits)
➔ Flags: 3 flags of 1 bit each: reserved bit (must be zero), do not fragment flag, more fragments
flag (same order)
➔ Fragment Offset: Represents the number of Data Bytes ahead of the particular fragment in the
particular Datagram. Specified in terms of a number of 8 bytes, which has the maximum value of
65,528 bytes.
➔ Time to live: Datagram’s lifetime (8 bits), It prevents the datagram to loop through the network
by restricting the number of Hops taken by a Packet before delivering to the Destination.
➔ Protocol: Name of the protocol to which the data is to be passed (8 bits)
➔ Header Checksum: 16 bits header checksum for checking errors in the datagram header
➔ Source IP address: 32 bits IP address of the sender
➔ Destination IP address: 32 bits IP address of the receiver

N.Kishore Chandra Dev,Asst Prof., SRKREC 12


INTERNET OF THINGS UNIT-4

➔ Option: Optional information such as source route, record route. Used by the Network
administrator to check whether a path is working or not.
➔ Due to the presence of options, the size of the datagram header can be of variable length (20
bytes to 60 bytes).
IPv6
Protocol Version 6 is a network layer protocol that allows communication to take place over
the network. IPv6 was designed by Internet Engineering Task Force (IETF) in December 1998 with
the purpose of superseding the IPv4 due to the global exponentially growing number of internet
users.
The common type of IP address (is known as IPv4, for “version 4”). Here’s an example of what
an IP address might look like:
25.59.209.224
An IPv4 address consists of four numbers, each of which contains one to three digits, with a
single dot (.) separating each number or set of digits.
➔ Each of the four numbers can range from 0 to 255. This group of separated numbers creates the
addresses that let you and everyone around the globe send and retrieve data over our Internet
connections.
➔ The IPv4 uses a 32-bit address scheme allowing to store 2^32 addresses which is more than 4
billion addresses.
➔ To date, it is considered the primary Internet Protocol and carries 94% of Internet traffic. Initially,
it was assumed it would never run out of addresses but the present situation paves a new way to
IPv6, let’s see why? An IPv6 address consists of eight groups of four hexadecimal digits.
➔ Here’s an example IPv6 address:
3001:0da8:75a3:0000:0000:8a2e:0370:7334
➔ This new IP address version is being deployed to fulfill the need for more Internet addresses. It
was aimed to resolve issues which are associated with IPv4.
➔ With 128-bit address space, it allows 340 undecillion unique address spaces. IPv6 is also called
IPng (Internet Protocol next generation).
➔ IPv6 support a theoretical maximum of 340, 282, 366, 920, 938, 463, 463, 374, 607, 431, 768,
211, 456. To keep it straightforward, we will never run out of IP addresses again.

Types of IPv6 Address


➔ Unicast addresses It identifies a unique node on a network and usually refer to a single sender or
a single receiver.

N.Kishore Chandra Dev,Asst Prof., SRKREC 13


INTERNET OF THINGS UNIT-4

➔ Multicast addresses It represents a group of IP devices and can only be used as the destination
of a datagram.
➔ Anycast addresses It is assigned to a set of interfaces that typically belong to different nodes.

Advantages of IPv6
➔ Reliability
➔ Faster Speeds: IPv6 supports multicast rather than broadcast in IPv4.This feature allows
bandwidth-intensive packet flows (like multimedia streams) to be sent to multiple destinations
all at once.
➔ Stronger Security: IPSecurity, which provides confidentiality, and data integrity, is embedded into
IPv6.
➔ Routing efficiency
➔ Most importantly it’s the final solution for growing nodes in Global-network.

6LoWPAN
Internet layer IPv6 receives and transmits from/to the adaptation 6LoWPAN protocol layer.
The data stack uses 6LoWPAN (IPv6 Over Low is used at Adaptation Power Wireless Personal Area
Network) protocol at the adaptation layer before a data laver before the data stack transmits to IPv6
Internet layer. A stack transmits to IPv6 IEEE 802.15.4 WPAN device has a 6LowPAN interface serial
port Internet layer for connectivity.
➔ 6LoWPAN is an adaptation-layer protocol for 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
include 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
offset. Fragments reassembly time limit can be set equal to 60s.
➔ Figure (a) shows networked devices physical layer in IEEE 802.15.4 WPAN.
➔ Figure (b) shows data-link sublayer and adaptation layer 6LoWPAN protocol

N.Kishore Chandra Dev,Asst Prof., SRKREC 14


INTERNET OF THINGS UNIT-4

➔ Figure shows that IPv6 over IEEE 802.15.4 standard network nodes uses the headers, security
and application data as follows: IPvó header = 40 B; UDP header = 8 B. device node MAC
address 25 B; AES-128 security = 21 B; Total device node frame size = 127 B (maximum).
Therefore, maximum 33 Octets are left for the application data from the device. MAC is data
communication protocol sublayer at the data-link layer.
➔ IPv6 Maximum Transmission Unit (MTU) at link layer 1280 B. Therefore, link-layer frame
fragmentation is needed in order to communicate a frame of 127 B over IEEE 802.15.4 nodes
(device). The frame MTU is 1280 B for transmission to the network layer. Fragments from frames
from the device of 127 B each reassemble into an IPv6 frame. Also, IPv6 MTU at data-link layer
1280 B fragments into frames of 127 B each for a single transfer to a device node.
➔ Specifies the IETF recommended methods for the reassembly of fragments and IPv6.

6LoWPAN has the following features:


➔ UDP (or ICMP) headers compression (6LoWPAN-hc adaptation layer), neighbor 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 query
messages.

N.Kishore Chandra Dev,Asst Prof., SRKREC 15


INTERNET OF THINGS UNIT-4

➔ 6LoWPAN can be implemented using Berkley IP implementation with the 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.
➔ It is used with IEEE 802.15,.4 in the 2.4 GHz band.
➔ Outdoor range: ~200 m (maximum)
➔ Data rate: 200kbps (maximum)
➔ a Maximum number of nodes: ~100

Advantages of 6LoWPAN:
➔ 6LoWPAN is a mesh network that is robust, scalable, and can heal on its own.
➔ It delivers low-cost and secure communication in IoT devices.
➔ It uses IPv6 protocol and so it can be directly routed to cloud platforms.
➔ It offers one-to-many and many-to-one routing.
➔ In the network, leaf nodes can be in sleep mode for a longer duration of time.

Applications of 6LoWPAN:
➔ It is a wireless sensor network.
➔ It is used in home automation,
➔ It is used in smart agricultural techniques, and industrial monitoring.

TCP/IP Suite

TCP/IP suite means a set of protocols with layers for the Internet. TCP/IP suite of Application
layers protocol examples are HTTPS, HTTP, protocols most used MQTT, XMPP, SOAP, FTP, TFTP,
Telnet, PoP3, SMTP, SSL/TLS protocols for the global and others for communication using TCP
stream. DNS, TFTP, Internet networking Bootpc, Bootps, SNMP, DHCP, CoAP, LWM2M and others
are for datagram communication using UDP Application layer security protocols are TLS and DTLS.
➔ TCP is a transport layer, connection-oriented protocol that enables acknowledged data flow.
➔ UDP is another transport layer protocol that is a connectionless protocol and is meant for
datagram communication.
➔ Other protocols in the TCP/IP suite for the transport layer are RSVP and DCCP. Internet layer
protocol is IPv4/1Pv6/RPL/ICMP/ICMPv6/IPSec or other. Data-link layer protocol is
PPP/ARP/RARP/NDP, MAC, or other.

N.Kishore Chandra Dev,Asst Prof., SRKREC 16


INTERNET OF THINGS UNIT-4

➔ A MAC protocol is Ethernet or DSL or ISDN or other. Figure shows the protocol layers and
representative protocols at each layer.

TCP/UDP Transport Layer for the Data Stack from or to Application Layer Port Following
subsections describe the TCP and UDP transport layer protocols. TCP/IP transport layer receives or
transmits the data segment and datagram from or to a port at the application layer. Following
subsections describe TCP and UDP protocols.

TCP(Transmission Control Protocol)


TCP (Transmission Control Protocol) is one of the main protocols of the Internet protocol
suite. It lies between the Application and Network Layers which are used in providing reliable
delivery services. It is a connection-oriented protocol for communications that helps in the exchange
of messages between different devices over a network.
Working of TCP
To make sure that each message reaches its target location intact, the TCP/IP model breaks
down the data into small bundles and afterward reassembles the bundles into the original message
on the opposite end.
➔ Sending the information in little bundles of information makes it simpler to maintain efficiency as
opposed to sending everything in one go.
➔ After a particular message is broken down into bundles, these bundles may travel along
multiple routes if one route is jammed but the destination remains the same.

N.Kishore Chandra Dev,Asst Prof., SRKREC 17


INTERNET OF THINGS UNIT-4

➔ For example, When a user requests a web page on the internet, somewhere in the world, the
server processes that request and sends back an HTML Page to that user.
➔ The server makes use of a protocol called the HTTP Protocol. The HTTP then requests the TCP
layer to set the required connection and send the HTML file.
➔ Now, the TCP breaks the data into small packets and forwards it toward the Internet Protocol
(IP) layer. The packets are then sent to the destination through different routes.
➔ The TCP layer in the user’s system waits for the transmission to get finished and acknowledges
once all packets have been received.

Features of TCP/IP
Some of the most prominent features of Transmission control protocol are
1. Segment Numbering System: TCP keeps track of the segments being transmitted or being
received by assigning numbers to each and every single one of them. A specific Byte Number is
assigned to data bytes that are to be transferred while segments are assigned sequence numbers.
Acknowledgment Numbers are assigned to received segments.
2. Flow Control: Flow control limits the rate at which a sender transfers data. This is done to ensure
reliable delivery. The receiver continually hints to the sender on how much data can be received
(using a sliding window)
3. Error Control: TCP implements an error control mechanism for reliable data transfer
➔ Error control is byte-oriented
➔ Segments are checked for error detection
➔ Error Control includes – Corrupted Segment & Lost Segment Management, Out-of-order
segments, Duplicate segments, etc.
4. Congestion Control: TCP takes into account the level of congestion in the network. Congestion
level is determined by the amount of data sent by a sender
Advantages
➔ It is a reliable protocol
➔ It provides an error-checking mechanism as well as one for recovery
➔ It gives flow control
➔ It makes sure that the data reaches the proper destination in the exact order that it was sent
➔ Open Protocol, not owned by any organization or individual
➔ It assigns an IP address to each computer on the network and a domain name to each site thus
making each device site to be distinguishable over the network.

N.Kishore Chandra Dev,Asst Prof., SRKREC 18


INTERNET OF THINGS UNIT-4

Disadvantages
➔ TCP is made for Wide Area Networks, thus its size can become an issue for small networks with
low resources
➔ TCP runs several layers so it can slow down the speed of the network
➔ It is not generic in nature. Meaning, it cannot represent any protocol stack other than the TCP/IP
suite. E.g., it cannot work with a Bluetooth connection.

User Datagram Protocol (UDP)


User Datagram Protocol (UDP) is a Transport Layer protocol. UDP is a part of the Internet
Protocol suite, referred to as UDP/IP suite. Unlike TCP, it is an unreliable and connectionless
protocol. So, there is no need to establish a connection prior to data transfer.
➔ Though Transmission Control Protocol (TCP) is the dominant transport layer protocol used with
most of the Internet services; provides assured delivery, reliability, and much more but all these
services cost us additional overhead and latency.
➔ Here, UDP comes into the picture. For real-time services like computer gaming, voice or video
communication, and live conferences; we need UDP.
➔ Since high performance is needed, UDP permits packets to be dropped instead of processing
delayed packets. There is no error checking in UDP, so it also saves bandwidth.
➔ User Datagram Protocol (UDP) is more efficient in terms of both latency and bandwidth.

UDP Header
➔ UDP header is an 8-bytes fixed and simple header, while for TCP it may vary from 20 bytes to 60
bytes.
➔ The first 8 Bytes contain all necessary header information and the remaining part consist of data.
➔ UDP port number fields are each 16 bits long, therefore the range for port numbers is defined
from 0 to 65535; port number 0 is reserved.
➔ Port numbers help to distinguish different user requests or processes.
➔ Source Port: Source Port is a 2 Byte long field used to identify the port number of the source.
➔ Destination Port: It is a 2 Byte long field, used to identify the port of the destined packet.
➔ Length: Length is the length of UDP including the header and the data. It is a 16-bits field.
➔ Checksum: Checksum is 2 Bytes long field. It is the 16-bit one’s complement of the one’s
complement sum of the UDP header, the pseudo-header of information from the IP header, and
the data, padded with zero octets at the end (if necessary) to make a multiple of two octets.

N.Kishore Chandra Dev,Asst Prof., SRKREC 19


INTERNET OF THINGS UNIT-4

Note: Unlike TCP, the Checksum calculation is not mandatory in UDP. No Error control or flow
control is provided by UDP. Hence UDP depends on IP and ICMP for error reporting.

Applications of UDP:
➔ Used for simple request-response communication when the size of data is less and hence there is
lesser concern about flow and error control.
➔ It is a suitable protocol for multicasting as UDP supports packet switching.
➔ UDP is used for some routing update protocols like RIP(Routing Information Protocol).
➔ Normally used for real-time applications which can not tolerate uneven delays between sections
of a received message.
➔ Following implementations use UDP as a transport layer protocol:
◆ NTP (Network Time Protocol)
◆ DNS (Domain Name Service)
◆ BOOTP, DHCP.
◆ NNP (Network News Protocol)
◆ Quote of the day protocol
◆ TFTP, RTSP, RIP.
➔ The application layer can do some of the tasks through UDP-
◆ Trace Route
◆ Record Route
◆ Timestamp
➔ UDP takes a datagram from Network Layer, attaches its header, and sends it to the user. So, it
works fast.

N.Kishore Chandra Dev,Asst Prof., SRKREC


20

You might also like