0% found this document useful (0 votes)
19 views34 pages

10-A5-IP For IoT NW Layer

The document discusses the relevance of the Internet Protocol (IP) as a network layer for the Internet of Things (IoT), highlighting its advantages such as ubiquity, scalability, and interoperability. It addresses challenges faced by constrained devices in using IP, including overhead and power limitations, and presents strategies for adapting or adopting IP in IoT networks. The document also explores common protocols and adaptation techniques like 6LoWPAN and RPL for efficient communication in low-power and lossy networks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views34 pages

10-A5-IP For IoT NW Layer

The document discusses the relevance of the Internet Protocol (IP) as a network layer for the Internet of Things (IoT), highlighting its advantages such as ubiquity, scalability, and interoperability. It addresses challenges faced by constrained devices in using IP, including overhead and power limitations, and presents strategies for adapting or adopting IP in IoT networks. The document also explores common protocols and adaptation techniques like 6LoWPAN and RPL for efficient communication in low-power and lossy networks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

IP as the IoT Network Layer

N Amanquah
Overview
• What is IP, what is it used for?
• Why relevant for IoT?
• Challenges with using IP in IoT for constrained devices
• Optimizing for IoT
• Adapting vs Adopting
• Common Protocols

• Objective:
• To understand how IP may be used to good advantage in IoT networks, and
adjustments that may be need.
• Also explore options for routing factoring in IP
What is IP
• IP is a protocol:
• “set of rules, for routing and addressing packets of data so that they can travel
across networks and arrive at the correct destination”
• Delivery is solely based on addresses in packet header.
• IP address uniquely identifies a device on Internet or network
• Routers use IP addresses and a routing algorithm to forward packets
• Eg IP address: 192.168.1.5
• Private addresses
• Public addresses (static & dynamic)

Check your IP address with ipconfig/ifconfig


IPv4 & IPv6
• IPv4 introduced in 1983
• Not enough addresses in IPv4, (4.3 billion addresses)
• IPv6 gives us more unique addresses
• IoT can take advantage of IPv6!

• 32-bit address vs 128-bit address


• IPv4 binary bits separated by a dot(.), IPv6 binary bits separated by colon(:)
• >>>see your PC 4 groups vs 8 groups of 4
• 172.16.4.23 vs fe80::ef:ccca:5738:8674
• fe80:0000:0000:0000:00ef:ccca:5738:8674 (16 bytes)
• IPv6 is not yet completely adopted
IP packet
IPv6 addresses are 16 bytes long
Min header =40bytes

IPv4: 20-bytes mandatory


Packet encapsulation review
• Looked at wireshark log, for accessing example.com

1-HTTP 2-TCP

3-IP
An architectural design for L3:

What IP does for us


Assorted Lower (connectivity)
layers
Assorted Upper (application)
HTTP FTP SMTP POP layers

TCP UDP
L3 (network layer) independent of
IP (network layer)
L1 & L2 or >L4

CSMA/CA CSMA/CD 802.15.4e MAC

FHSS DSSS CDMA 802.15.4 PHY

802.15.4 wont work this way


Why is IP relevant for IoT?
Routing
• Need to reach a remote DB or server.
• For message to reach destination,
• IP addresses should be on same network (same prefix)
• Suitable Mask
• subnet mask splits the IP address into the host and network addresses,
• Need for routers otherwise

Check hops taken using tracert/traceroute


Why consider IP for IoT?
• IP is
• Ubiquitous. –both general purpose & embedded systems
• Used in both IT and OT
• IP is scalable >> billions of internet users
• robust, some optimizations needed for voice, video etc
• Open and standards based, enables interoperability
• Versatile - handles both wired & wireless
• Stability & resilient – use in critical infrastructure & services -military, financial
• Manageable – well understood NW management * security
• Adoption in consumer market –common protocol to add on IoT devices to
• Basis for further innovation. Taken as a given, leverage IoT underpinning.
Strategies for networking with or w/o IP
• Without IP, need multiprotocol routers
• Adopt: Replace all non-IP layers with IP versions
• Adapt: Use gateways to translate between networks

• Examples:
• SCADA devices tend to tunnel serial data through IP network
• Zigbee devices forward data to gateway which translates between IP and
Zigbee
Challenges with using IP in IoT for
constrained devices
Challenges using IP in IoT (constrained devices)
• Some networks pass unidirectional data. eg
• Infrequent reporting of few bytes of data eg switch state, water meter reading
• Full IP stack is overkill.
• Without 2-way data, cannot update firmwire OTA
• Overhead of implementing IP
• IPv4 -20byte header, IPv6 is 40bytes,
• On top of this: UDP has 8, TCP has 20bytes
• For small infrequent data, overhead likely >> actual data
• Should IP be run? Should control plane IP based network services be run?
• Data Flow model: between which devices does data flow
• In IP, peers communicate. In IoT, most data is limited to a few application servers.
• Network Diversity:
• Adaptation is PHY+MAC combo specific. There will be islands of different technologies joined
by a gateway
Challenges using IP in IoT (constrained devices)
• Constrained devices may not have power and memory to run full IP
stack
• IoT devices often communicate over LLN. Lost packets compound
• Topology changes may occur. Convergence may be a challenge.
• Devices may be sleeping, to conserve power, not available to route for
others.

Good reasons to optimize


Adaptation or Adoption
Adaptation or Adoption of IP
• 3 options:
• Class 0: Constrained devices/constrained resources:
• limited security & limited management features, few bytes of communications: use
adaptation model. [uses gateways and proxies]
• Class 1: Devices with enough power to implement stripped down IP stack OR
non-IP stack
• Can connect to IP network directly but cant run routing protocols like OSPF etc
• Adopt IP OR use gateway for non-IP stack
• Class 2: Devices with constrained networking (but capable) eg limited bw.
• Adoption model.
• Benefit for lightweight comms

• IETF RFC 7228 defines classes:


The working environment:
Working on Lossy networks
• LLN – low-power and lossy networks
• (lossy refers to network unreliability caused by disruptions in data flow or
packet loss)

• In general for lossy networks, underreact to failure


• Over reaction leads to network collapse.
• Keep control plane messaging to a minimum
• Conserve power, save bandwidth
Which IP version to support in an IoT network
• There is a move to IPv6 for IoT (lots of addresses available)
• IPv4 is entrenched.
• èsupport both IPv4 and v6 (because of legacy nodes)
• Considerations:
• Old cellular technologies for links use IPv4
• Legacy serial communications are supported on IPv4
• Some newer technologies only support IPv6 eg IEEE802.15.4 (WPAN), 1901.2
and Routing protocol for LLNs (RPL) is IPv6 only
Adaptation:
• Adaptation layer: Packages IP into lower layer protocols
• 6LoWPAN is an adaptation protocol
Adaptation strategies
• Header compression
Adaptation strategies -II
• Fragmentation
• IPv6 Max Transmission Unit (MTU) is at least 1280, max of 64 KiB
• For 802.15.4, MTU is 127.
• Fragmentation of IPv6 packets required. Done seamlessly
• Mesh-Under routing
• Can occur only in a single IP subnet, is a Layer 2 routing technique
• “Mesh addresses” from 6LowPAN are used for routing in the adaptation layer
• Multiple link hops may be needed for a single IP hop
• An edge gateway ends the mesh-under domain
• If different Link Layer technologies used, should use Mesh-Over routing
instead.
Common Protocol Examples
#1: TSCH: An adaptation layer for a deterministic
MAC
• TSCH- Time Slotted Channel Hopping 6LowPAN-Header Compression

• An add on to the 802.15.4 MAC


• TDMA schedule used for communication
• Deterministic. Suitable for industrial applications.
• IPv6 over TSCH is called 6TiSCH
• 6top is the sublayer b/t MAC and 6LoWPAN
#2: Routing Protocol over LLNs(RPL)
• Routing Protocol over Low-Power Lossy Networks à IPv6 based
• All nodes act as routers.
• Storing mode à keep full routing table
• Power and memory intensive, but shorter paths taken bt src and dest.
• All nodes make their own decisions
• Non-storing mode à store list of parents
• Results in directed acyclic graph (DAG). Only gateways store full table
• Data moves up to root to make decisions
• Suitable for constrained device.
• Bridging OT and IT with 6TiSCH
• Interview: https://www.iot-inc.com/bridging-ot-it-with-6tisch-video/
• Or : https://www.youtube.com/watch?v=M44PGBuBT0o
Supplementary information
Courtesy Mr Gatsi
TCP/IP Protocol Suite

OSI & TCP/IP Models


IPv4 Addresses: Classful IP addressing
Exceptions & Special Cases
• Special cases:
• "loopback address" : 127.0.0.1 ❖ Non-routable addresses :
• 10.0.0.0 to
• 172.16.0.0 to
• 192.168.0.0 to
• Non-routable addresses cannot connect to the Internet
• Used within organizations to manage IP addresses
• IANA – Internet Assigned Numbers Authority
• Exemptions
• if hostid = 000....0 => IP address of the local network
• if hostid = 111....1 => "broadcast" address of the local network
IP Addresses and Subnetworks
• Subnetting allows arbitrary complexity of internetworked LANs within
an organization and insulates overall Internet from growth of network
numbers and routing complexity
• To the Internet, the network a appears like a single network
• CIDR: Classless Inter-Domain Routing →Classless addressing
• Other notation used to represent the netmask: CIDR notation
• CIDR format: IP address/’number bits for network portion’
• number after the ‘/’ represents the number of 1’s in the netmask
• E.g. : 132.212.203.0/24 indicates that the netmask is 255.255.255.0
Example of subnets
IPv6 addresses
• Three types of addresses:
• Unicast: The address corresponds to a single computer. A datagram sent to
the address is routed along a shortest path to the computer
• Multicast: The address corresponds to a set of computers, and membership in
the set can change at any time. IPv6 delivers one copy of the datagram to
each member of the set
• Anycast: The address corresponds to a set of computers that share a common
prefix. A datagram sent to the address is delivered to exactly one of the
computers (e.g. the computer closest to the sender),
IPV6 format
• Colon Hex format
• Optimization is achieved by using zero compression
• FF0C:0:0:0:0:0:0:B1 ➔FF0C::B1
• Representation of IPv4 in IPv6 addresses:
• Any IPv6 address that begins with 80 zero bits followed by 16 one bits
contains an IPv4 address in the low-order 32 bits
• IPv6 uses multicast addresses instead of broadcast

You might also like