the internet of things - cs.unibo.it · 4 ipv4 protocol ip-based network layer solutions l. bononi,...
TRANSCRIPT
TheInternetofThings:IP-basedNetworkLayerSolu<ons
MASTERDEGREEINCOMPUTERSCIENCEDEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
Coursewebsite:h8p://www.cs.unibo.it/projects/iot/
2
IoTProtocolStack
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
3
IoTProtocolStack
IEEE802.3 IEEE802.11 IEEE802.15 IEEE802.16
IPv4andIPv6+6LoWPAN
TCP UDP
MQTT CoAP AMQP HTTP OTHERS
PHY/MACPROTOCOLS
NETWORKPROTOCOLS
TRANSPORTPROTOCOLS
MESSAGINGPROTOCOLS
PROPRIETARYSTACKS
OTHERS
TCP/IPSTACK
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
4
IPv4Protocol
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q IPversion4(IPv4)² FirstversiondeployedbytheARPANETprojectin1983² Uses32-bitnetworkaddresses(addressspaceà4294967296values).² IPv4canbepublic(i.e.routableovertheInternet)orprivate² EachIPv4addresscontainstwoparts:the(i)networkiden^fier
andthe(ii)hostiden^fier.Thenetworkmaskindicatesthenumberofbits(overthe32)usedtorepresentthenetworkiden^fier.
192 168 10 3
NETWORKIDENTIFIER HOST
PRIVATEADDRESS /24
MASK
5
IPv6Protocol
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q Themigra<onprocesstoIPv6involves:networkinfrastructures,routers,applica^ons
q Completemigra^onexpectedby2025
q IPversion6(IPv6)² DevelopedbytheInternetEngineeringTaskForce(1998).² ReplaceIPv4andaddresstheIPv4addressexhaus^onproblem.² Addi^onalrou^ngfunc^onali^es(notincludedinIPv4).² Notcompa^blewiththeIPv4protocol.
6
IPv6Protocol
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q IPversion6(IPv6)adop^onworldwide
7
IPv6Protocol
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q NovelfeaturesoftheIPv6protocol(comparedtoIPv4)1.Extendedaddressingcapabili<es
IPv4address:32bit,IPv6address:128bità2128combina<onsavailable!
3FFE:085B:1F1F:0000:0000:0000:00A9:1234
8groupsof16-bithexadecimalnumbersseparatedby“:”
Leading zeros can be removed à 3FFE:85B:1F1F::A9:1234
8
IPv6Protocol
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q NovelfeaturesoftheIPv6protocol(comparedtoIPv4)1.Extendedaddressingcapabili<es
ThreetypesofIPv6addresses:
² Unicast:one-to-onecommunica^on² Mul<cast:one-to-manycommunica^on² Anycast:one-to-a-group,andasingledes^na^onischosen² Broadcast:notsupported
9
IPv6Protocol
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q NovelfeaturesoftheIPv6protocol(comparedtoIPv4)1.Extendedaddressingcapabili<es
Link-Local Site-Local Global
Anetworkinterfacecanhavemul^pleaddresses
LINK-LOCALADDRESSES
² Startusingalink-localprefixFE80::/10² Containtheinterfaceiden^fier(e.g.MACaddress)inthemodifiedEUI-64format.² Canbeusedtoreachtheneighboringnodesa8achedtothesamelink² IPv6routersmustnotforwardpacketshavinglink-localsource/des^na^on² AllIPv6enabledinterfaceshavealink-localunicastaddress.
10
IPv6Protocol
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q NovelfeaturesoftheIPv6protocol(comparedtoIPv4)1.Extendedaddressingcapabili<es
Link-Local Site-Local Global
Anetworkinterfacecanhavemul^pleaddresses
SITE-LOCALADDRESS
² Startusingalink-localprefixFC00::/7² Similarproper^esasIPV4privateaddresses
GLOBALADDRESS
² CanbeusedtorouteIPdatagramsovertheInternet² Variableprefix,definedfromrouteradver^sements.SomeIPaddressescanbereserved.
11
IPv6Protocol
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
IPv4header,20Byte
Version Traffic Class Flow Label
Payload Length Next Header Hop Limit
Source Address
Destination Address
IPv6heade
r,40Byte
q NovelfeaturesoftheIPv6protocol(comparedtoIPv4)2.IPHeaderre-newed
Version IHL Type of Service Total Length
Identification Flags Fragment Offset
Time to Live Protocol Header Checksum
Source Address Destination Address
Options Padding
12
IPv6Protocol
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q NovelfeaturesoftheIPv6protocol(comparedtoIPv4)2.IPHeaderre-newed
Version IHL Type of Service Total Length
Identification Flags Fragment Offset
Time to Live Protocol Header Checksum
Source Address Destination Address
Options Padding
IPv4header,20Byte
FieldsremovedintheIPv4header:
² ChecksumàreplicatedinMACandTSPheader,notneededattheIPlayer.
² Fragmenta<onàfragmenta^onisperformedbyend-points,whilemightnotbesupportedbyrouters.
² Op<onsàreplacedbypointertonextheaderextension(nextheader).
13
IPv6Protocol
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q NovelfeaturesoftheIPv6protocol(comparedtoIPv4)2.IPHeaderre-newed
Version Traffic Class Flow Label
Payload Length Next Header Hop Limit
Source Address
Destination Address IPv6heade
r,40ByteIden^fypossibleQoSrequirements
Iden^fyasource-des<na<ontrafficflow
Pointertonextheaderextension(op^onal)
IPv6headerNextheader=TCP TCPheader+data
IPv6headerNextheader=Rou^ng
Rou^ngheaderNextheader=TCP TCPheader+data
14
IPv6Protocol
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q NovelfeaturesoftheIPv6protocol(comparedtoIPv4)3.IPAddressassignmentprocess,threeways
² Manualconfigura^onàlikeusingthe“ifconfig”u^lity
² Statefulconfigura^onàusingDHCPv6protocol
² Statelessautoconfigura<onànoDHCP,IPv6nodescanconnecttoanetworkandautoma<callygenerateglobalIPv6addresseswithouttheneedformanualconfigura^onorhelpofaserver.
ROUTERADVERTISEMENT(RA)
IPv6address=interfaceiden<fier+RAprefix
15
IPv6Protocol
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q NovelfeaturesoftheIPv6protocol(comparedtoIPv4)3.IPAddressassignmentprocess,threeways
² Manualconfigura^onàlikeusing“ifconfig”u^lity
² Statefulconfigura^onàusingDHCPv6protocol
² Statelessautoconfigura<onànoDHCP,IPv6nodescanconnecttoanetworkandautoma<callygenerateglobalIPv6addresseswithouttheneedformanualconfigura^onorhelpofaserver.
ROUTERADVERTISEMENT(RA)IPv6address
CheckforpossibleIPduplicates,usingtheNeighbourDiscoveryProtocol(NDP)
16
IPv6Protocol
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
² Dual-stackapproach SomerouterswillsupportbothIPv4andIPv6protocols
² GRETunnellingapproachCommunica^ontunnelsenablecommunica^onbetweenIPv6subnetworksoverIPv4links
IPv6networkIPv6network IPv4networkD-S D-S
q Managingtransi^onfromIPv4toIPv6
17
IPv6ProtocolandtheIoT
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q BenefitsofusingIPv6protocolsonIoTscenarios:² Address/manage/accessanyIoTdevicefromtheInternet.² EasilyconnecttootherIPnetworkswithouttheneedfor
transla<ongatewaysorproxies.² Usewell-knownsocketAPIforthedeploymentofnetwork
applica^on.² Easilyre-usetoolsformanaging,commissioninganddiagnosing
IP-basednetworks.² LeverageontheaddressingcapabilityoftheIPv6protocol.
18
IPv6ProtocolandtheIoT
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q Atthesame^me,suppor^ngIPv6overIoTscenariospresentseveralchallenges:² IPv6datagramsarenotanaturalfitforIEEE802.15.4networks
² MTUsizeofanIEEE802.15.4frameis127bytes,whiletheminimumIPv6framesizeis1280bytes;
² TheIPv6headersize(40bytes)canoccupy1/3oftheMTU² IPv6assumesthatalinkisasinglebroadcastdomain,whiletheassump^on
doesnotholdinmul^-hopwirelesssensornetworks.² IPv6includesop<onalsupportforIPsecurity(IPsec),authen^ca^onand
encryp^onbutthesetechniquesmightbetoocomplexforIoT-devices.
19
IPv6ProtocolandtheIoT
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q Worstcasescenariocalcula^ons.² MaximumfrasesizeinIEEE802.15.4à127bytes² Reducedbythemaxframeheader(25bytes)à102bytes² Reducedbythehighestlinklayersecurity(21bytes)à81bytes² ReducedbystandardIPv6header(40bytes)à41bytes² ReducedbystandardUDPheader(8bytes)à33bytes² Only33bytesledfordatapayload!
FRAMEHEADER(25) LLSEC(21) IPv6HEADER(40) UDP(8) PAYLOAD(33)
20
6LoWPAN
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q SetofstandardsdefinedbytheInternetEngineeringTaskForce(IETF)enablingtheefficientuseofIPv6overlow-power,low-ratewirelessnetworksonsimpleembeddedIoTdevices.Itprovides:² AnovelAdapta<onLayer;² Severalop<miza<onofIPv6func^onali^es.
² RFC4919(firstspecifica^on,2007)² RFC4944(auto-configura^on)² RFC6282(headercompression)² RFC7400(headercompression)² …
21
6LoWPANMarketShare
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
Source:h8ps://www.ee^mes.com/document.asp?doc_id=1324664
22
6LoWPAN
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
RR R
HH H
R R RR
H H H H H
INTERNET
Edgerouter
Edgerouter Edgerouter
Backhaullink
RouterRouter
R
RR
H
H
H
SimpleLoWPAN
ExtendedLoWPANAd-HocLoWPAN
ThreeNetworkArchitectures
23
6LoWPAN
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
RR R
HH H
R R RR
H H H H H
INTERNET
Edgerouter
Edgerouter Edgerouter
Backhaullink
RouterRouter
R
RR
H
H
HSimpleLoWPAN
ExtendedLoWPAN Ad-HocLoWPAN
Threetypesofnodes:Hostsàend-usersleepydevice,RoutersàforwarddatainsidetheLoWPANEdgeRoutersàconnectaLoWPANtoan
externalIPv6network
24
6LoWPAN
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q 6LoWPANProtocolStackvsEthernetProtocolStack
ETHERNETPHY
ETHERNETMAC
IPv6
TCP UDP ICMP
APPLICATIONS
ETHE
RNETPRO
TOCO
LSTAC
K
IEEE802.15.4PHY
IEEE802.15.4MAC
LOWPAN
UDP ICMP
APPLICATIONS
6LoW
PANPRO
TOCO
LSTAC
K
6LoWPANcanworkwithotherlink-layerprotocolsbesideIEEE802.15.4.Requirements:² Uniqueaddressing² Unicasttransmissions² MTUsize>30bytes
UDPisthemostcommonTSPprotocolwith6LOWPAN,sinceitsheadercanbeeasilycompressed…
25
6LoWPAN
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q Use-cases:Large-scaleIoTDeploymentSM
ARTLIGH
TINGSYSTEM
WAS
TEM
ANAG
EMEN
TSYSTEM
26
6LoWPAN
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q Use-cases:Interoperable,SmartEnvironmentsSM
ARTOFFICE
SMAR
TBU
ILDING
h8ps://iot6.eu/iot6_%20use_cases
27
Digression:IEEE802.15.4
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q Low-power,low-costtechnologyforWirelessPersonalAreaNetworks(WPANs)
Source:h8p://file.scirp.org/Html/1-4000110_65802.htm
28
Digression:IEEE802.15.4
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q IEEE802.15.4àstandardforthedeploymentofWPAN.Characteris^cs:lowcomplexity,low-powerforlow-dataratewirelessconnec^vityamongfixedandportabledevices.
Thespecifica^onsdefinethePHYtechniquesandMAClayer,whiletheupperlayersaredefinedbytheZigbeestack.
PHYLAYER
MACLAYER
NETWORKLAYER
PROFILES
APPLICATIONS
}}}
IEEE
ZIGBEE
USER-DEFINED
29
Digression:IEEE802.15.4
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q IEEE802.15.4àstandardforthedeploymentofWPAN.Characteris^cs:lowcomplexity,low-powerforlow-dataratewirelessconnec^vityamongfixedandportabledevices.
Feature Descrip<onSpectrumbands 2.4GHz,915MHzor868MHz
Data-rate Upto250Kbs(2.4GHz)
Range <30meters
Channels 16(2.4GHz)
Channelaccess CSMA/CAorslo8edCSMA/CA
30
Digression:IEEE802.15.4
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q IEEE802.15.4àstandardforthedeploymentofWPAN.Characteris^cs:lowcomplexity,low-powerforlow-dataratewirelessconnec^vityamongfixedandportabledevices.
STARTOPOLOGY ADHOCTOPOLOGYPANCOORDINATOR
31
Digression:IEEE802.15.4
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
NetworkBEACON,sendbythePANcoordinator,andcontainingnetwork-relatedinfo.Usedalsoforsynchronizingeachdevicewiththestartoftheconten^on-freeopera^ons.
Conten^on-periodslots.AccessedbyusingCSMA/CAprotocol.
Conten^on-Freeperiodslots.ReservedbyPANcoordinatortoapplica^onswithQoSrequirements.
Inac^veperiods(neededforenergysavingonba8ery-constraineddevices)
Conten^onPeriod CFPeriod Inac^ve
32
Digression:IEEE802.15.4
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q PerformanceofIEEE802.15.4networks(ArduinoXbeetestbed).
Source:www.arduino.cc
33
6LoWPAN
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q Mainopera<ons:
² DeviceAddressing² Rou^ng(differentfromforwarding)² HeaderExtensions² Headercompression² Fragmenta^on² Bootstrapping&Devicediscovery² …
34
6LoWPAN:Addressing
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q IPv6addressesaretypicallyformedautoma<callyfromtheprefixoftheLoWPANedgerouter,andtheMACaddressofthewirelesscard.
q TheIEEE802.15.4supportstwoMACaddressformat:² 64-bitEUI-64addressACDE:4812:3456:7890+2001:ODB8:0BAD:FADE EUI-64MACaddress NetworkPrefix
² 48-bitEUI-64addressPANNetworkIden^fier(16bits)+16bits(zeros)+PANAddress(16bits)
35
6LoWPAN:Rou<ng
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q 6LoWPANsupportstwodifferentrou<ngmodesMESH-UNDERROUTING
APPLICATIONS
UDP
LoWPAN
MAC802.15.4
PHY802.15.4
APPLICATIONS
UDP
LoWPAN
MAC802.15.4
PHY802.15.4
LoWPAN
MAC802.15.4
PHY802.15.4
² Usesthelayer-two(MAClayer)addressestoforwarddatapackets.
² Amesh-undernetworkisasingleIPsubnetwithasingleedgerouter.
² Usefulforsmallorlocalnetworks.
36
6LoWPAN:Rou<ng
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q 6LoWPANsupportstwodifferentrou<ngmodesROUTEOVERROUTING
APPLICATIONS
UDP
LoWPAN
MAC802.15.4
PHY802.15.4
APPLICATIONS
UDP
LoWPAN
MAC802.15.4
PHY802.15.4
LoWPAN
MAC802.15.4
PHY802.15.4
² Usesthelayer-three(IPv6)addressestoforwarddatapackets.
² IPv6addressesmustberoutable(Globalonly).² Deployscalable,large-scalenetworks.
37
6LoWPAN:ExtensionHeaders
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q AnalogouslytoIPv6,6LoWPANusestheExtensionHeadersfortheop^onaldataandforspecificuse-cases.
q Two6LoWPANExtensionHeadersaredefined:FRAGMENTHEADERàusedincaseofpacketfragmenta^on,seenextslides
MESHHEADERàusedbyMESH_UNDERrou^ng,itcontains:<ORIGINATOR_MAC,DESTINATION_MAC,NUM_HOPS_LEFT>
J.Olsson,6LoWPANDemys^fied,Whitepaperh8p://www.^.com/lit/wp/swry013/swry013.pdf
38
6LoWPAN:Fragmenta<on
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q AllIPv6subnetworkshavetoprovideaminimumMTUof1280bytes(recommended:1500bytes).² IPV6doesprovideitsownfragmenta^onfor
datagramslargerthantheminimumMTU(1280bytes).² 6LoWPANprovidesfragmenta^oninordertofitthe
sizeof802.15.4MTU(127bytes)² Mesh-Underàfragmentsarereassembledatthedes^na^on.
If any fragment ismissing, the complete packetmust be re-transmikedbythesourcenode.
39
6LoWPAN:Fragmenta<on
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q AllIPv6subnetworkshavetoprovideaminimumMTUof1280bytes(recommended:1500bytes).² IPV6doesprovideitsownfragmenta^onfor
datagramslargerthantheminimumMTU(1280bytes).² 6LoWPANprovidesfragmenta^oninordertofitthe
sizeof802.15.4MTU(127bytes)² Route-overà fragments are reassembled at every hop (and
fragmented again). If is fragment is missing, the completepacketmustbere-transmikedbythepreviousnode.
40
6LoWPAN:Fragmenta<on
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q FragmentinfoarecontainedintheFragmentHeader.q AllFragmentscarrythesametagvalue,assigned
sequentuallybythesourceoffragmenta^on.
11000 SIZE TAG
11000 SIZE TAG OFFSET
FIRSTFRAGMENT
OTHERFRAGMENTs
41
6LoWPAN:HeaderCompression
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q 6LoWPANcanusestate-lessorshared-contextheadercompressionmechanisms.
J.Olsson,6LoWPANDemys^fied,Whitepaperh8p://www.^.com/lit/wp/swry013/swry013.pdf
42
6LoWPAN:HeaderCompression
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q 6LoWPANcanusestate-lessorshared-contextheadercompressionmechanisms.
J.Olsson,6LoWPANDemys^fied,Whitepaperh8p://www.^.com/lit/wp/swry013/swry013.pdf
43
6LoWPAN:HeaderCompression
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q 6LoWPANcanusestate-lessorshared-contextheadercompressionmechanisms.
J.Olsson,6LoWPANDemys^fied,Whitepaperh8p://www.^.com/lit/wp/swry013/swry013.pdf
44
6LoWPAN:DeviceDiscovery
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q TheIPv6NeighbourDiscoveryProtocolisusedbyIPv6nodestofindrouters,todeterminetheirlink-layeraddressandtomaintainreachibilityinfoaboutthepaths.² RouterssendAnnouncementmessages(RA)in
mul^cast,a8achingtheirnetworkprefix.² IPv6nodescansolicitaRAmessagebyusingaRouter
Solicita<on(RS)message.² EachIPv6nodebuildsitsownaddress:<Prefix,MAC>
45
6LoWPAN:DeviceDiscovery
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q DifferencescomparedtothestandardNDPv6protocol² In802.15.4networks,6LoWPANnodesmightbelongto
differentbroadcastdomains(e.g.mul^-hopscenarios).² RAmessagesmustbefloodedintheen^re6LoWPAN.
R H
R
R
R
H
H
H
6LoWPAN
EDGEROUTERRAfromtheIPv6ROUTER
RAfromtheER
RAfromeach6LoWPANrouter
46
6LoWPAN:DeviceDiscovery
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q DifferencescomparedtothestandardNDPv6protocol.² The6LoWPANEdgeRoutermaintainsawhiteboardofallthe
IPv6addressregisteredinthe6LoWPAN.² ItalsoperformsDuplicateAddressDetec<on(DAD).
HEDGEROUTER
ROUTERSOLICITATION
ROUTERADVERTISEMENT
NODEREGISTRATION
NODECONFIRMATION
HEDGEROUTER
RRS
RA
NRNR
NCNCSI
NGL
E-HO
PTO
POLO
GY
MULTI-H
OPTO
POLO
GY
47
RPLProtocol:Rou<ngover6LoWPAN
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q RPLàIPv6Rou^ngProtocolforLow-PowerandLossyNetworks
² StandardizedbytheIETFin2011(currentdraz:RFC6550)² DeFactostandardrou<ngprotocolforIoTscenarioscharacterizedbythepresenceof
low-power,resource-constraineddevices.² Itsupports:point-to-point,point-to-mul^pointandmul^point-to-pointcommunica^ons.² Itseparatespacketprocessingandforwardingfromtherou^ngop^miza^onobjec^ve
(e.g.minenergy,maxthroughput,mindelay,etc).² ItcanbeusedtodisseminateIPv6or6LoWPANspecificinfo(e.g.neighbourdiscovery).² Itdoesnotrelyonanyspecificlink-layerprotocol(althoughitiscommonlycoupledwith
theIEEE802.15.4standard).
RPLIETFspecifica^ons(RFC6550)--h8ps://tools.ie{.org/html/rfc6550
48
RPLProtocol:Rou<ngover6LoWPAN
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q RPLcreatesarou^ngtopologyintheformofaDes<na<on-OrientedDirectedAcyclicGraph(DODAG)² Directedgraphwithoutcycles,orientedtowardsaroot
node(theedgerouter).
O.Iova,G.P.Picco,T.Istomin,andC.Kiraly,RPL,theRou^ngStandardfortheInternetofThings...OrIsIt?,Communica^onMagazine:54(12),16-22,2016
ER
R R R
R R
R
ER
R R R
R R
R
PHYSICALLINKS
RPLDO
DAG
49
RPLProtocol:Rou<ngover6LoWPAN
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q IncaseofExtendedLoWPANs(i.e.presenceofmul^pleEdgeRouters),RPLmightcreatemul<pledisjointDODAGs,routedatdifferentER.
O.Iova,G.P.Picco,T.Istomin,andC.Kiraly,RPL,theRou^ngStandardfortheInternetofThings...OrIsIt?,Communica^onMagazine:54(12),16-22,2016
ER
R R R
R R
R
RPLDO
DAG
ER
R R R
R R R
BACKBONELINK
50
RPLProtocol:Rou<ngover6LoWPAN
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q InordertocreateandmaintaintheDODAG,theRPLprotocolintroducesthefollowingcontrolpackets:² DIO(DODAGInforma^onObject)àusedtoenstablishthe
upwardpath(fromleafstoroot)² DAO(Des^na^onAdver^smentObject)àusedtoenstablishthe
downlinkpath(fromroottoleafs)² DIS(DODAGInforma^onSolicita^on)àusedbyaninternalnode
inordertosolicitatethetransmissionofDIOmessages² DAO-ACK(Des^na^onAdver^sementObjectAcknowledgement)
51
RPLProtocol:Rou<ngover6LoWPAN
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q Twomodesofopera^on:storingandnon-storing² Storingàeachnodekeepsarou<ngentryforallthe
des^na^onsreachableviaitssub-DODAG.² Non-Storingàtherootistheonlynetworknodemaintaining
rou^nginforma^on;sourcerou^ngisusedfordownwardrou^ng.
O.Iova,G.P.Picco,T.Istomin,andC.Kiraly,RPL,theRou^ngStandardfortheInternetofThings...OrIsIt?,Communica^onMagazine:54(12),16-22,2016
ER
1 2 3R44
5SOURCE DESTINATION
StoringMode:² Node4forwards
datatowardNode2² Node2stores
rou<nginfoforallitssubgraph(nodes4and5)
ER
1 2 3R44
5SOURCE DESTINATION
Non-storingMode:² Node4always
forwardsdatatowardtheroot
Containstheinfoaboutnext-hops
52
RPLProtocol:Rou<ngover6LoWPAN
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q EachnodeoftheDODAGhasitsownrankvalue.
ER
R R R
R R
R
Rank0
Rank1
Rank2
Rank8
Rank4
Rank6
Rank1
² Abstractnumericvalue,expressionofarela^veposi^onwithinaDODAGVersion.
² RankofthenodesmustmonotonicallydecreasetowardstheDODAGdes^na^on.
² Rankisusedtoavoidanddetectloops.
PROPERTIES
HOWTOCOMPUTEIT?
² RankiscomputedaccordingtotheObjec<veFunc<oninuse(seenextslides)
53
RPLProtocol:Rou<ngover6LoWPAN
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q Crea^onoftheupwardpaths(assumedatstart-up)
ER
R R R
R R
R
DIOmessage
1. TheEdgeroutercreatestheDIOmessage,containingitsrankandDODAGid,andsendsitinmul<cast.
RECEIVINGNODES
2.Eachnodeestablishestheupwardlinktowardthesender.
3.Eachnodecomputesitsownrankvalue,basedontheroot’srankandontheObjec<veFunc<on.
4.EachnoderebroadcaststheDIOmessage(followingtheTricklealgorithm),byincludingitsowncomputedrank.
Rank:2
54
RPLProtocol:Rou<ngover6LoWPAN
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q Crea^onoftheupwardpaths(assumedatstart-up)
ER
R R R
R R
R
Anodereceivingmul^pleDIOmessages(e.gthebluenode)
2.BasedontheusedmetricandconstraintsdefinedbytheObjec^veFunc^on,itchoosesanappropriateparent:
Ø Mul^pleparentscanbeestablished,butapreferredparentisselected;
Ø Ifthenodehasalreadyitsownrank,andthereceivedoneisgreaterthanthelocalrank,theDIOmessageisdiscarded(loopavoidance)
3.Asbefore,eachnoderebroadcaststheDIOmessage(followingtheTricklealgorithm),byincludingitsown computedrank.
Rank:2 Rank:3
Therou^ngprocedureendswhenreachingtheleafnodes.
55
RPLProtocol:Rou<ngover6LoWPAN
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q Crea^onofthedownwardpaths(fromleaftoedgerouter)
1.EachnodeperiodicallygeneratesaDAOmessageandsendsittothedes^na^on,byusingtheupwardpathestablishedthroughtheDIOmessage.
2.AlltheintermediateparentsextendtheDAOmessagebyaddingtheirIPv6addressintheTransitInforma<onOp<on.
NON-STORINGMODE
ER
1 2 3
4 5
6
DAOmessage
6-4
6-4-1
56
RPLProtocol:Rou<ngover6LoWPAN
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q Crea^onofthedownwardpaths(fromleaftoedgerouter)
1.EachnodeperiodicallygeneratesaDAOmessageandsendsittoallparentsnode(differentlytothepreviouscase,themessageisnotforwardedtowardtheroot).
2.Eachparentmaintainsaddi^onalrou^ngtablesforallthenodesofitssub-DODAG.
STORINGMODE
ER
1 2 3
4 5
6
DAOmessage
57
RPLProtocol:Rou<ngover6LoWPAN
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q Tricklealgorithmàdatadissemina^onschemeforlossysharedmedium(e.g.low-powerandlossynetworks).
² Itcanbeappliedtoawiderangeofprotocoldesignproblems(besideourtopic,i.e.theDIOmessagedissemina^oninRPL)
² Threeconfigura<onparameters:theminimumintervalsizeImin,themaximumintervalsizeImax,andaredundancyconstantk.
² Inaddi^on,Tricklemaintainsthreevariables:ü Iàthecurrentintervalsize.ü tàa^mewithinthecurrentinterval.ü càacounter.
Tricklealgorithm–IETFspecifica^ons:h8ps://tools.ie{.org/html/rfc6206
58
RPLProtocol:Rou<ngover6LoWPAN
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q TheTrickleexecu^onfollowsfiverules:1. Atstartup,itsetsItoavalueintherangeof[Imin,Imax],cto0andttoa
randompointintheinterval,[I/2,I];2. WheneverTricklehearsatransmissionthatis"consistent",itincrements
thecounterc;3. At^met,Trickletransmitsifandonlyifthecountercislessthanthe
redundancyconstantk.4. WhentheintervalIexpires,Trickledoublestheintervallength(I).5. IfTricklehearsatransmissionthatis"inconsistent"andIisgreaterthan
Imin,setsItoIminandttoarandompointintheinterval[I/2,I](step1).
Themeaningofconsistentandinconsistentdependsonthespecificuse-case!
Tricklealgorithm–IETFspecifica^ons:h8ps://tools.ie{.org/html/rfc6206
59
RPLProtocol:Rou<ngover6LoWPAN
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q TheTrickleexecu^onfollowsfiverules:1. Atstartup,itsetsItoavalueintherangeof[Imin,Imax],cto0andttoa
randompointintheinterval,[I/2,I];2. WheneverTricklehearsatransmissionthatis"consistent",itincrements
thecounterc;3. At^met,Trickletransmitsifandonlyifthecountercislessthanthe
redundancyconstantk.4. WhentheintervalIexpires,Trickledoublestheintervallength(I).5. IfTricklehearsatransmissionthatis"inconsistent"andIisgreaterthan
Imin,setsItoIminandttoarandompointintheinterval[I/2,I](step1).
EXAMPLE:CONSISTENCYofTOPOLOGYinRPL-DIOmessages…
Tricklealgorithm–IETFspecifica^ons:h8ps://tools.ie{.org/html/rfc6206
60
RPLProtocol:Rou<ngover6LoWPAN
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q TheObjec<veFunc<on(OF)definesthespecificmetrics/constraintstouseforfindingminimumcostpaths.
² Howtocomputetherank;² Howtoselecttheparents(andthepreferredparent);² Howtocomputethepathcost.
Ø EXAMPLE1.Determinetheshortestroute(METRIC)byavoidinglow-energynodes(CONSTRAINT).
Ø EXAMPLE2.Determinethelowestend-to-enddelay(METRIC)byavoidinglow-qualitylinks(CONSTRAINT).
61
RPLProtocol:Rou<ngover6LoWPAN
IP-BASEDNETWORKLAYERSOLUTIONS L.BONONI,M.DiFELICE,DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING,UNIVERSITYOFBOLOGNA,ITALY
q Twoobjec^vefunc^onshavebeendefinedsofar:² OF0:Objec^veFunc^onZeroà
usehopcountasdefaultrou^ngmetric.
² OF1:MinimumRankwithHysteresisObjec^veFunc^onàSelectrouteswhichminimizeanaddi^vemetric.DefaultMetric:ExpectedTransmissionNumber(ETX)
MinimumRankwithHysteresisObjec^veFunc^on–IETFspecifica^ons:h8ps://tools.ie{.org/html/rfc6719