politecnico di milanohome.deib.polimi.it/cesana/teaching/iot/como/classes/5-6lowpan.pdf · o...
TRANSCRIPT
o Slide/Figures Sourcesn IPSOAlliance Webinar “6LowPANfor IPSmart
Objects”n 6LoWPAN:TheWirelessEmbeddedInternet,
Shelby&Bormann,ISBN:978-0-470-74799-5,(c)2009JohnWiley&SonsLtd
ACKs
o AnAdaptationLayertofitIPv6overLow-PowerwirelessAreaNetworks
o DefinedbyIETFstandardsn RFC4919,4944n draft-ietf-6lowpan-hcand-ndn draft-ietf-roll-rpl
Whatis6LoWPAN?
IPv6
o Low-powerRF+IPv6=TheWirelessEmbeddedInternet
o 6LoWPANmakesthispossibleo Thebenefitsof6LoWPANinclude:
n Open,long-lived,reliablestandardsn Easy learning-curven TransparentInternet integrationn Networkmaintainabilityn Globalscalabilityn EnablesastandardsocketAPIn Minimaluseofcodeandmemoryn Directend-to-endInternetintegration
o Multipletopologyoptions
Benefitsof6LoWPANTechnology
EvolutionofWirelessSensorNetworks
ScalabilityPrice
Cabling
Cables
Proprietaryradio + network
20001980s 2006
Vendorlock-in
IncreasedProductivity
ZigBee
Complex middleware
6lowpanInternet
Open developmentand portability
Z-Wave, prop. ISM etc.
ZigBee andWHARTAny vendor
6lowpanISA100
2008 ->
o LoWPANs arestubnetworkso SimpleLoWPAN
n SingleEdgeRoutero ExtendedLoWPAN
n MultipleEdgeRouterswithcommonbackbonelinko Ad-hocLoWPAN
n NorouteoutsidetheLoWPANo InternetIntegrationissues
n Maximumtransmissionunitn Applicationprotocolsn IPv4interconnectivityn FirewallsandNATsn Security
Architecture
IPv6-LoWPAN Router Stack
o Efficientheadercompressionn IPv6baseandextensionheaders,UDPheader
o Fragmentationn 1280byteIPv6MTU->127byte802.15.4
frames
AdaptationFeatures
o Supportfore.g.64-bitand16-bit802.15.4addressing
o Usefulwithlow-powerlinklayerssuchasIEEE802.15.4,narrowbandISMandpower-linecommunications
o Networkautoconfiguration usingneighbor discoveryo Unicast,multicastandbroadcastsupport
n Multicastiscompressedandmappedtobroadcasto SupportforIProuting(e.g.IETFRPL)o Supportforuseoflink-layermesh(e.g.802.15.5)
Additional Features
o IPv6(RFC2460)=thenextgenerationInternetProtocoln CompleteredesignofIPaddressingn Hierarchical128-bitaddresswithdecoupledhostidentifiern Statelessauto-configurationn Simpleroutingandaddressmanagement
o MajorityoftrafficnotyetIPv6but...n MostPCoperatingsystemsalreadyhaveIPv6n GovernmentsarestartingtorequireIPv6n MostroutersalreadyhaveIPv6supportn SotheIPv6transitioniscoming
o 1400%annualgrowthinIPv6traffic(2009)
InternetProtocolv6
IPv4vs.IPv6Addressing
Image source: Indeterminant (Wikipeida) GFDL
IPv4: 7x10-6[addresses/m2] IPv6: 666x1021 [addresses/m2]
o 6LoWPANisanadaptationheaderformatn EnablestheuseofIPv6overlow-powerwirelesslinksn IPv6headercompressionn UDPheadercompression
o FormatinitiallydefinedinRFC4944o Updatedbydraft-ietf-6lowpan-hc (workinprogress)
The6LoWPANFormat
o Statelesscompressiono Flow-independentcompressiono SimpletricksonIPv6/UDP
headern Commonvaluesforheader
fields=>compactformsn Version is always 6n TrafficClassandFlowLabel
arezeron PayloadLengthalwaysderived
fromL2headern SourceandDestination
Addressescanbeelided(link-local)and/orcompresseddependingonthe“context”ofthetransmission
6LowPANHeader Compression ataGlance
o 128-bitIPv6address=64-bitprefix+64-bitInterfaceID(IID)o The64-bitprefixishierarchical
n Identifiesthenetworkyouareonandwhereitisgloballyo The64-bitIIDidentifiesthenetworkinterface
n Mustbeuniqueforthatnetworkn Typicallyisformedstatelessly fromtheinterfaceMACaddress
o CalledStatelessAddressAutoconfiguration (RFC2462)o TherearedifferentkindsofIPv6addresses
n Loopback(0::1)andUnspecified(0::0)n Unicast withglobal(e.g.2001::)orlink-local(FE80::)scopen Multicastaddresses(startswithFF::)n Anycast addresses(special-purposeunicast address)
IPv6Addressing
o IPv6addressesarecompressedin6LoWPANo Prefix
n Addresseswithin6LoWPANtypicallycontaincommonprefixn Nodestypicallycommunicatewithoneorfewcentraldevicesn Establishstate(contexts)forsuchprefixes– onlystate
maintenancen Supportforupto16contexts6LoWPANcompressesIPv6
addressesbyo InterfaceID
n TypicallyderivedfromL2addr duringautoconfigurationn ElidewhenInterfaceIdentifiercanbederivedfromL2header
6LoWPANAddressing
o TF(TrafficClassandFlowLabel)n 0:Carried Inline (ECN+DSCP+Flow),1:ECN+Flow,2:ECN+DSCP,3:All zero
o NH(Next Header compression)n 0:CarriedInline,1:NextHeaderiscompressed
o HLIM(HopLimit=Inline,1,64,255)n 0:CarriedInline,1:1,2:64,3:255
o CID(Context Identifier Extension)n 0:No1-byteCIDidentifier, 1:1-byteidentifier follows
o SAC/DAC(Source/Destination Address Compression)n 0:Stateless,1:Context-based
o SAM/DAM(Source/Destination AddressMode)n 0:16bytes inline,1:8bytes inline,2:2 bytes inline,3:elided
o M(Multicast Destination)n 0:Destination isnotmulticast,1:Destination ismulticast
TheHeader Compression header
o Source/Destination Address Compression modes
o Stateless Mode(SAC/DAC=0)n Prefixislink-local(fe80::/10)
o Context-Based (SAC/DAC=1)n Prefixtakenfromstoredcontexts(upto16contexts)n CID=0,use ContextID =0n CID=1,include4-bitContextID forsource&destination
Addresses Compression
o Assumecommonvaluesforheaderfieldsanddefinecompactformsn Portswithin61616to61632(4bits)n Lengthderived from IPv6Lengthn Checksummaybeelidedifotherintegritychecksareinuse(e.g.Ipsec)
n C(Checksum):0:Inline,1:Eliden P(Ports):
o 0:Inlineo 1:Elide first8bitsofDest Porto 2:Elide first8bitsofSourcePorto 3:Elide first12bitsofSourceandDest Ports
UDPHeader Compression
o IPv6requires aminimum2-PDUof 1280byteso 802.15.4has amaximum payload of 127byteso IPv6packets should be fragmented by
6LowPANadaptation layer
Fragmentation
o dgram_size:size of thefragment inbyteso dgram_tag:fragmentation ID(commonto all
fragments)o dgram_offset:fragmentation offset(wordof 8
bytes).Elided inthe1° fragment
Fragmentation Header
o TheperformanceoflargeIPv6packetsfragmentedoverlow-powerwirelessmeshnetworksispoor!n Lostfragmentscausewholepackettobe
retransmittedn Low-bandwidthanddelayofthewirelesschanneln 6LoWPANapplicationprotocolsshouldavoid
fragmentationn Fragmentationhandledattheapplicationlayer
(COAP)n CompressionshouldbeusedonexistingIP
applicationprotocolswhenusedover6LoWPANifpossible
Fragmentation inPractice
o Autoconfiguration isimportantinembeddednetworkso Inorderfora6LoWPANnetworktostartfunctioning:
n Link-layerconnectivitybetweennodes(commissioning)n Networklayeraddressconfiguration,discoveryof
neighbors,registrations(bootstrapping)n Routingalgorithmsetsuppaths(routeinitialization)n Continuousmaintenance
6LoWPANSetup&Operation
o IPv6istheformat- NDisthebrainsn “One-hoproutingprotocol”definedinRFC4861
o Definestheinterfacebetweenneighborso FindingNeighbors
n NeighborSolicitation/NeighborAcknowledgemento FindingRouters
n RouterSolicitation/RouterAdvertisemento AddressresolutionusingNS/NAo DetectingDuplicateAddressesusingNS/NAo NeighborUnreachability DetectionusingNS/NAo DHCPv6maybeusedinconjunctionwithND
IPv6NeighborDiscovery
o StandardNDforIPv6isnotappropriatefor6LoWPAN:n AssumptionofasinglelinkforanIPv6subnetprefixn Assumptionthatnodesarealwaysonn Heavyuseofmulticasttraffic(broadcast/floodin6LoWPAN)n Noefficientmultihop supportovere.g.802.15.4
o 6LoWPANNeighborDiscoveryprovides:n Anappropriatelinkandsubnetmodelforlow-powerwirelessn Minimizednode-initiatedcontroltrafficn NodeRegistration(NR)andConfirmation(NC)n DuplicateAddressDetection(DAD)andrecoveryn SupportforextendedEdgeRouterinfrastructures
o NDfor6LoWPANhasbeenspecifiedindraft-ietf-6lowpan-nd(workinprogress)
6LoWPANNeighborDiscovery
o InnormalIPv6networksRAsaresenttoalinkbasedontheinformation(prefixetc.)configuredforthatrouterinterface
o InNDfor6LoWPANRAsarealsousedtoautomaticallydisseminaterouterinformationacrossmultiplehops
PrefixDissemination
o 6LoWPAN-NDOptimizesonlythehost-routerinterfacen RFC4861=signalingbetweenallneighbors(distributed)
o Nodesregisterwiththeirneighboringroutersn ExchangeofNR/NCmessagesn Bindingtableofregisterednodeskeptbytherouter
o Noderegistrationexchangeenablesn Host/routerunreachabilitydetectionn Addressresolution(apriori)n Duplicateaddressdetection
o Registrationsaresoftbindingsn PeriodicallyrefreshedwithanewNRmessage
NodeRegistration
0 1 2 30 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Type (NR)/(NC)| Code | Checksum |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| TID | Status |P|_____________________________|+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Binding Lifetime | Advertising Interval |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| |+ Owner Interface Identifier +| |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Owner Nonce |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Registration option(s)...+-+-+-+-+-+-+-+-+-+-+-+-+-+
NR/NCFormat
o Shortest-pathrouteso Avoidsoverlapo Minimumenergyconsumptiono Needsglobaltopologyinformation
WhatshouldbetheOptimum“Ideal”RoutingProtocolforWSNs
B
D E
FG
C
A
o Algorithmclassesn Distance-vector
Linksareassociatedwithcost,usedtofindtheshortestroute.Eachrouteralongthepathstorelocalnext-hopinformationabout itsroutetable.
n Link-stateEachnodeacquirescompleteinformationaboutthenetwork,typicallybyflooding.Eachnodecalculatedashortest-pathtreecalculatedtoeachdestination.
o TypesofSignalingn Proactive
Routinginformationacquiredbeforeitisneeded.n Reactive
Routinginformationdiscovereddynamicallywhenneeded.o Routemetricsareanimportantfactor
TypesofRoutingProtocols
o HereweconsiderIProuting(atlayer3)
o RoutinginaLoWPANn Single-interfaceroutingn Flataddressspace(exact-match)n Stubnetwork(notransitrouting)
6LoWPANRouting
o IPisagnostictotheroutingprotocolusedn Itforwardsbasedonroutetableentries
o Thus6LoWPANisroutingprotocolagnostico SpecialconsiderationforroutingoverLoWPANs
n Singleinterfacerouting,flattopologyn Low-powerandlossy wirelesstechnologiesn Specificdataflowsforembeddedapplications
o MANETprotocolsusefulinsomead-hoccasesn e.g.AODV,DYMO
o NewIETFworkinggroupformedn Routingoverlow-powerandlossy networks(ROLL)n Developedspecificallyforembeddedapplications
Protocolsfor6LoWPAN
o RoutingOverLowpowerandLossy networks(ROLL)n WorkinggroupattheIETF
o Standardizingaroutingalgorithmforembeddedapps
o Applicationspecificrequirementsn Homeautomationn Commercialbuildingautomationn Industrialautomationn Urbanenvironments
o Analyzedallexistingprotocolso SolutionmustworkoverIPv6and6LoWPANo Protocolin-progresscalledRPL“Ripple”
n Proactivedistance-vectorapproach
IETFROLL
o Constraineddevices!(fewKbytesofRAM,dozensofKbytesofFlash,8/16-bitmicro-controller)
o Low-speedhighlyunstablelossy links(oscillationavoidance isakey)
o Potentiallyverylargescale(10-100sKnodes)
o Unattendeddevicesinharshenvironments
Background
o Unicast/Anycast/Multicasto Adaptive Routing
n Different metricso Constraint-Based Routing
n Parallel Pathso Scalabilityo Goal:RPLbuilds upaDestination-Oriented
Directed Acyclic Graph (DODAG)o What DODAGdepends onthespecific
Objective Function (OF)
Requirements/Objectives
o Metric:scalarto capture thelink/pathperformance(reliability, interference,throughput,etc.)
o Constraint:criteria to eliminatelinks from aDODAG
o Routing OFcombines metric andconstraintsn Es:“find thepath with themaximum reliability
that does not traverseany non-encrypted link”
Metrics &Constraints
o Noden Residual Energy(node)n CPU,Storage,WorkLoad,Battery/Mains
o Linkn Troughput (local/globalmetric)n Latency (local/globalmetric)n Reliability (local/globalmetric)
o Expected Transmission Count (ETX)o LinkQuality Level (LQL)
o HopCount
TheMost CommonRouting Metric
o “Theaverage number of packettransmissions to successfully transmit apacket”
o Ex:n Being thepacket error probability from Ato B
andfrom Bto Ap andq,respectively,theETXis:1/[(1-p)(1-q)]
n p andqcanbe estimated through periodicbeaconing
TheETX
A B
o DODAGInformationObject (DIO)n LinkLocal Messages to Advertise/Build UpDODAGn Contains all theinformationto exchange
metrics/setconstraintso Destination Advertisment Object (DAO)
n Used to propagateinformationondestination(prefixes)
n Support to ptp andptmp traffico DODAGInformationSolicitation (DIS)
n Used to solicit DIOs
RPLMessages
o Thevery same networkmay support differentapplicationsn Es:networkwith battery- andmain-operated
devices,highandlowbandwidth links,andtwoapplications (telemetry andalarming)
n One “time sensitivepath”for alarms (lowlatency,highreliability,noconstraints onenergy)
n One “non-time-sensitive path”for telemetryenergy optimized (donot traversebattery-operated nodes)
MultipleRouting OFcalls forMultipleDODAGs
o OF1: use the LQL asa global metric,minimize thenumber of low andfair quality links,avoid non-encrypted links
o OF2: find the bestpath in terms oflatency whileavoiding poorquality links andbattery-operatednodes
o DATACENTRICPROTOCOLSn Flooding,Gossiping,SPIN,Directed Diffusion,SAR
(Sequential Assignment Routing),RumorRouting,Constrained Anisotropic Diffused Routing,COUGAR,ACQUIRE,ZigBee,RPL
o HIERARCHICALPROTOCOLSn LEACH,PEGASIS,TEEN(Threshold SensitiveEnergy
Efficient Sensor NetworkProtocol)o LOCATIONBASED(GEOGRAPHIC)PROTOCOLS
n MECN,SMECN(Small MinimumEnergyComNetw),GAF(Geographic Adaptive Fidelity),GEAR,Distributed Topology/Geographic,
TaxonomyofRoutingProtocolsforWirelessSensorNetworks