Final Exam Questions
How does this power saving mode work in WiFi?
* 802.11 stations can maximize battery life by shutting down the radio transceiver and sleeping periodically. * During sleeping periods, access points buffer any unicast frames for sleeping stations * These frames are announced by subsequent Beacon frames through using a bitmap indicating the stations for which packets are buffered * The STA wakes up at each red line and is sleeping immediately after any transmission.
Describe the Addressing scheme for 6LoWPAN architecture image on slide 62 CH7.
* Ad-Hoc LoWPAN: each node uses link local addresses because it is not internet connected. (1 link local, 0 global) Simple LoWPAN: each node has two addresses (1 linked local and 1 global) * Extended LoWPAN: each node has 3 addresses (1 linked local, 2 global) * Combination of the router and local server is a Multihoming network - allows: - Load balancing - Reliability - Robustness
Discuss the differences between bluetooth EDR, BLE, and Dual Mode and its applications:
* BR/EDR - high data rates. - The power consumption is higher. - short range continuous wireless connection - streaming audio * BLE - - ultra low power applications - Data rate is much lower. - Short bursts of long range radio connection - Ideal for IoT applications that don't require continuous connection but depend on long battery life. * Dual Mode - devices such as a phone use dual have dual mode chips where the EDR chip is used to connect to a device requires audio data stream, while the BLE mode is used to connect to a wearable or something with low data rate.
MAC Address vs ARP:
* Data link layer requires source and destination MAC address to send a frame * Data link layer needs to figure out MAC address of particular IP address * ARP - address resoution protocol - used to figure out mapping * If you hear ARP with your IP address you respond with MAC address. * ARP is used to get MAC address of next hop MAC address is used to get to each hop
What is the Discover feature in CoAP and how does it work?
* Ensure interoperability between CoAP endpoints * Includes technique for discovering and advertising resource descriptions. * Discover operation is added with a GET request on the predefined path /.well-known/core. * This returns list of available resources along with applicable paths in response.
How does 802.15.4 provide additional reliability?
* If a bit in a set is lost, it is corrected in hardware by checking what bit sequence is the closest and assigns that value. * Four bits correspond to a symbol. Bit mapping - finds closes bit pattern to recreate lost bits.
Why is HTTP bad for IoT?
* Implementation: Header lines have large byte overhead - need to include \r\n to indicate new header line. Probability of repeating these characters is very very unlikely. * ASCII characters require large byte overhead. * CoAP can send response in 1 byte whereas HTTP uses 1 byte per letter to send in ASCII format.
What are the important features of CoAP?
* Resource Observation * Blockwise Resource Transport * Resource Discovery - Server utilizes well - known URI paths to provide resource discovery for the client - can discover other clients in network. * Interacting with HTTP - CoAP is easily intractable with HTTP through a proxy due to common rest architecture. * Security: CoAP is secure b/c built on top of DTLS to guarantee integrity and confidentiality.
What are the important features of CoAP?
* Resource observation - On demand subscriptions to monitor resources of interest using publish/subscribe mechanism * Block wise resource transport - HTTP is not configured to allow firmware updates. CoAP will fragment and take care of this. - Benefits of fragmentation here is it is done in the App layer and the user has more control and modification abilities. - Lower layer may not be able to support fragmentation - IP layer may not be included in stack. * Resource discovery - server utilizes well known URI paths...provides resource discovery for client * Interacting with HTTP - common REST architecture enables CoAP to interact easily with HTTP through a proxy. * Security - CoAP is a secure protocol since it is built on top of datagram transport layer security (DTLS) to guarantee integrity and confidentiality of messages. Typically DTLS capable CoAP devices will support RSA and ESA or ECC and AES.
What are the principles of RESTful architectures?
* Resources - Objects are identified by uniform resource identifier (URI) * Representations - transfer JSON, XML, HTML, or format to represent data objects and attributes * Messages - GET, PUT, POST, DELETE - GET: used to retrieve info from the given server using a given URI - PUT: replaces all current representation of the target resource with the uploaded content. - POST: used to send data to the server - DELETE: Removes all the current representations of the target resource given by URI. * Stateless - server does not store past info of clients previous requests. No client context is stored on server.
Explain the figure in Slide 59 of CH 7
* Router distributes the router prefix * Established globally unique IP addresses using SLAAC bc network subnet distributes Routers and Host: The host is more resource constrained. * Host nodes have global address bc not behind NAT * Address of each node is generated using SLAAC. * 6LowPAN edge is responsible for decompressing header and sending to other routers.
Explain how CTS and RTS works and what problem is it used to prevent?
* STA 1 sends RTS to an AP, which send CTS to two STAs in a system. The CTS is used to control wait times between the two separate STAs that can't communicate to each other but send packets on the same channel. * The problem this serves to solve is the hidden node problem. * RTS and CTS is only used in environments w/ significant contention on transmission.
Why do we need to specify QoS for MQTT if it runs on TCP?
* TCP is mostly used for wired communications * TCP is not well suited for wireless communications * If we use TCP and QoS we have 100% guarantee of packet delivery.
How does the observer function in CoAP work and how does it reduce the overhead of IoT systems? Present Example:
* When client sends a GET request, it can include the "observer" option to indicate interest in the receive future changes of state of a subject. * Allows client to receive update when subject's state changes * Don't need to poll server, rather changing to an event driven mode where there is not two way communication - removing overhead of request packet. * Ex. Light and Sensor system - Light sends GET message with Observer function indicated. Light now receives updates based on changes in data until: - A Confirmable message is unacknowledged - The Client sends an explicit removal message. - Timeout happens
Explain the figure detailing the limitations of WiFi and Zigbee communication over various channels (Slide 122)
* Zigbee communicates best over channels 15, 20, 25, 26 because the packet delivery rate is the highest for zigbee on those channels. * The channels in which WiFi operates, Zigbee has lower Packet Delivery Rate because WiFi kicks Zigbee off.
Explain each field item of the MQTT CONNECT Packet: * clientID * cleanSession * Username * Passworrd * LastWillTopic * LastWillQoS * LastWillMessage * LastaWillRetain * keepAlive
* clientID - identification for clients * cleanSession - indicates whether client wants to establish a persistent session or not. * Username - can assign a username and password for unique clients * Passworrd * LastWillTopic * LastWillQoS * LastWillMessage * LastaWillRetain - used in case where client disconnects ungracefully, and informs all the other clients * keepAlive - time interval to maintain connection
CoAP vs MQTT and provide an example of smarthome. Ex: I would use ___ for ___ in a smart home.
CoAP would be used for communications between a sensor and a lamp. - One to One protocol best suited for transfering state info between client and server MQTT would be used for communications between many sensors in various locations of house and a thermostat. - Communications such as one to one, one to many, many to one. - Communications bus for live data.
Why is IPv6 a better option for IoT?
1. Addressing - 128 bit addressing is possible 2. Fixed length header * header format allows for faster processing * Header changes to facilitate Quality of Service 3. No fragmentation, no assembly. Ipv4 has fragmentation and is slower. 4. Link local addresses allows communication between devices in isolated network.
What are CoAP sublayers and what are their responsibilities?
1. Request / Response Sublayer - responsible of RESTful interaction 2. Messaging Layer - Responsible for tracking packet loss and ensuring that packets are delivered in a reliable manner. - Specifically detects duplication & provides reliable communication over the UDP transport layer using exponential backoff.
Overview of Wifi Standards - Bandwidth and speed
802.11a - 5GHz - 54Mbps 802.11b -2.4GHz -11mbps 802.11g -2.4 GHz -54mbps 802.11n - 2.4 and 5 GHz - 150Mbps / 40 MHz - 600Mbps for 4 parallel streams - Channel Bonding - combines two 20 MHz channels 802.11e - 2.4 and 5 GHz - High speeds
What is convenient feature about the channel spectrum in Bluetooth 4?
There are 39 channels total (Data channels and advertising) * Advertising Channels (last 3: 37, 38, 39) do not overlap with WiFi and: * Used for discoverability and connectivity * Used for broadcasting * Avoid known 802.11 channels
What is TSCH and the motivation for using it?
Time Slotted Channel Hopping - Combines time slotted access, multichannel communication and channel hopping * real time transfer is needed for some applications * reliability is also needed, if we allow contention there is chance of collision Benefits: * Absolutely no collision * chance of transmission on a noisy channel is extremely low Challenges: * Np hard problem
What is the Transmission Opportunity Limit (TXOP)?
Time bounded interval in which STA can send as many frames as possible TXOP can exchange multiple data sets and go back to sleep Data exchanged is of highest priority Dont need to wait for others.
What are the advantages of 6LoWPAN IP for IoT?
Extensive interoperability Established security * Authentication, access control, and firewall mechanisms Established naming, addressing, translation, lookup, discovery Established proxy architectures for higher level services * NAT, load balancing, caching, mobility Established network management tools * Ping, Traceroute, SNMP Transport Protocols * End to end reliability in addition to link reliability
Explain EDCA in 802.11e and the 4 prioritization levels:
Feature of 802.11e that prioritizes traffic and probability of sending is higher for traffic with higher prioritization. 4 Prioritization: * Low AC_BK Background * Low AC_BE Best Effort * High AC_VI Video * High AC_VO Voice
What does Neighbor Discovery Protocol (NPD) do / features?
Feature of IPv6: * Addresses the autoconfiguration of nodes * Determines addresses of other nodes * Duplicate Address Detection (DAD) feature * Finds available routers * Address prefix discovery
Characteristics of Zigbee Physical Layer (Worldwide) ie frequency, datarate, modulation, channels?
Frequency = 2.4 GHz Data Rate = 250kbps # Channels = 16 Modulation = O-QSPK
Explain FHSS and its benefits
Frequency Hopping Spread Spectrum * hopping around 79 1MHz bandwidth channels to allow for best quality and reliability of packet transfer. * The signal switches carrier channels rapidly, at a rate of 1600 hops per second, over a determined pattern of channels. Benefits: * Allows for coexistence with WiFi * Resistance to interference and multipath effects * Best quality of channel can be assigned * Multiple access to co-located devices on different piconets * Higher reliability - jumping around channels ensures low probability that the channel is in use at the exact same time.
Motivation for 802.15.4e?
Goal: Redesign existing Zigbee MAC and make it suitable for low power multihop networks in industrial applications Main Applications: * Real time packet delivery * Mission critical applications
How does a host get an IP address (IPv4)?
Hard coded by system (Static IP Assignment) - better for IoT bc faster Dynamically Host Configuration Protocol (DHCP) - host can dynamically renew its lease on address in use. Overhead in DHCP from: * DHCP discover, DHCP offer, DHCP request and DHC]P ACK messages
Challenges of IPv6 over 802.15.4 (challenges of 6LoWPAN) Challenges of 6LoWPAN?
Implementation Challenges: IPv6 requires every link to have MTU of 1280 octest or greater. If the link cant convey this in one piece, it must fragment and reassemble at a layer below IPv6. * header compression and data fragmentation are necessities IPv6, TCP and UDP header are way too large. Further Challenges: * code overhead * requires more memory and processing from additional layers on the stack.
What are the design goals of LP-WAN?
LP-WAN: Low Power Wide Area Network 1. Use of sub 1GHz band - this offers robust and reliable communication at low power budgets. 2. Modulation techniques - range of few kilometers (urban) to tens of kilometers (rural). Compromise on high data rate to put more energy into each bit sent to give further range. 3.Topology - to overcome distance shortcomings, end devices connected directly to base stations. 4. Duty cycling - opportunistically turning off power hungry devices to achieve low power operation 5. Lightweight Medium Access Control: use ALOHA MAC protocol in which end devices transmit without doing any carrier sensing Carrier sensing is unnecessary bc data rate is so low, collision is unlikely 6. Offloading complexity from end devices - for low power devices, shifting cost and complexity to the receiver side. Note: need to draw the drawing on the slide and be able to explain. (see slide 161)
Limitations of Zigbee
MAC Unrealiability * Contentiontion among sensors after receiving beacon * Unbounded latency: - No guaranteed bandwidth unless GTS is used - 7 GTS max - limited service slots * No built in Frequency Hopping Techniques
Explain NBE vs BE Medium Access Control in 802.15.4.
NBE: * Contention based * Unslotted CSMA * Bad for mission cirtical apps * Good for simple applications: colletcing moisture levels BE: * Superframe mode allows dedicated bandwidth to achieve lower latency for certain applications * Contention Free Period - Use for mission critical applications * Contention Based Period
What are the differences between persistent and non persistent HTTP? Which is best for IoT applications?
Nonpersistent - client must wait for response before sending another request to the server. * This creates sequential requests which are time costly. * There is one TCP connection / 1 request and response. * TCP connection is closed after. Persistent - client can send multiple requests before getting response form server. * One TCP connection is opened * Multiple requests and responses can be sent over one connection * Connection must be kept alive. Persistent is best for IoT applications because we are interested in realtime data. Want to minimize processing time and memory overhead associated with opening multiple TCP connections on server side.
Explain Nonstoring and Storing mode for Downlink Data protocol in RPL:
Nonstoring Mode: * no information is stored about downlink * Only the root node stores downlink information * Nodes only store information about uplink Storing Mode: * Non leaf and non root nodes have stored table that has information on reachable downlink paths. - More memory usage to store table at nodes.
Passive vs Active Scan modes and Association Feature
Passive Scan - listening for beaconos from AP (beacons consist of BSSID = mac address of AP [MAC2] Active Scan - Probe is sourced from STA requesting to join wireless network Association Feature: STA performs passive or active scan Authentication from AP to STA uses shared key and 4 way handshake STA Requests Association - after authentication is received AP responds with Association response detailing the following: Supported Data Rates HT capabilities HT information such as primary channel
What are the 3 modes for QoS in MQTT and discuss their overheads?
QoS 0: * Provides best effort transmission * No ACK - least overhead. * Use when: you have complete or almost stable connection between sender and receiver * You dont care if packets are dropped * You dont need any message queueing - queueing occurs at broker and client and leads to increased buffer time. QoS1: * Guaranteed that a message will be delivered at least once * There can be duplicates * Sender stores message until it gets PUBACK from receiver * Use when: need every message but can handle duplicates, cant bear overhead of QoS2 QoS2: * Guarantees each message is received only once by counterpart. * Safest and highest overhead (slowest) QoS * Guarantee is provided by two flows there and back between sender and receiver.
When should we use vs not use REST?
Restful APIs - web service API that adheres to REST architectural constraints. Useful for machine to machine communication Use; * need CoAp and HTTP operating in same network * polling is of use - maybe device is connected to psu. Dont Use: * concerned about maintaining previous client's state * very low power situation where polling will drain battery.
Draw NBE slotted CSMA algorithm for 802.15.4
See study guide
MAC Frame Format fill in the blank - reference study guide
See study guide
6LoWPAN Stack
App layer - CoAP, MQTT Transport Layer - TCP / UDP IP Layer - IPv6 / RPL Data Link Layer - 6LoWPAN over 802.15.4 MAC Physical Layer - 802.15.4
What are the types of links Bluetooth supports? What are the differences and applications?
Asynchronous Connectionless (ACL) * Designed for data traffic * Data integrity is checked through error checking and retransmission * One ACL link between master and slave Synchronous Connection Oriented (SCL) * intended for use with time bounded information such as audio or video. * retransmission is not necessary since data is real time. * Up to 3 SCO links per piconet.
What are the types of links Bluetooth supports? What are the differences and applications?
Asynchronous Connectionless (ACL) * Designed for data traffic * Data integrity is checked through error checking and retransmission * ^ reliability feature * One ACL link between master and slave Synchronous Connection Oriented (SCO) * Intended for use with time bounded information such as audio or video * Retransmission is not necessary since data is real time * Up to 3 SCO links per piconet.
What is ETX and its function in RPL?
ETX = Expected Number of Transmissions. ETX = 1/ ( Prr down * Prr up) Prr down = # Packets received / # Packets sent
MAC for Zigbee Characteristics and Features?
Each device has 2 addresses (long and short) * Long address - 64 bit extended unique identified (EUI-64) for larger packets * Short Address - 16 bit PAN specific address - assigned by PAN coordinator at association time. * Saves packet size
Extra Credit Question: how does AES, & RSA, work?
AES: Symmetric key encryption protocol the key is the encrypting algorithm and the encrypted data can only be decrypted by those who know the key. Otherwise it looks like word jumble. Ex: gdkkn looks like garbage, however, if a client has the key (x-1 according to alphabet) they would know this means "hello" RSA: Asymmetric key encryption protocol There are two unique keys a public and a private. Alice sends a message to Bob and uses Bobs public key to encrypt the message. Encrypted message is sent to Bob. Bob receives and decrypts message using Bobs private key.
How does Bluetooth manage Energy consumption?
Active Mode: * Slaves listen for packet. When appropriate slave is found the rest go back to sleep mode while the active slave stays awake to receive packet. Hold Mode: * time duration in which there is no communication between the master and slave. * unit can sleep during this time. Sniff Mode: * allows recurring free time cycles for a device, in which it is allowed to sleep. * Master can communicate with it only. Park Mode * BT devices are off * they surrender AMA and can exist in very low power use modes
What is AFH, how does it work, and what are the benefits?
Adaptive Frequency Hopping: * Classifies channels as good or bad based on Received signal strenght indication (RSSI) and Packet Error Rate (PER). * Listens to channels for interferences, classifies and blocks those channels, and doesnt operate on them.
What is the main motivation for 6LoWPAN?
Aims to reduce overhead of the IP layer and transport layer to enable IPv6 over 802.15.4 Can therefore reduce energy by compressing header material.
Explain the various packet transmission addressing schemes involved with 6LoWPAN networks: Case 1: Node to next node (1 hop) Case 2: Node to nearby node (2 hop) Case 3: Node through Edge router to internet
Case 1: Node to next node (1 hop) * Can use MAC address or IP short address. Case 2: Case 2: Node to nearby node (2 hop) * Need to use the (16 bit) IP short address because this always contains this destination. MAC Address changes per hop. Case 3: Node through Edge router to internet * Edge router expands compressed IPv6 and UDP header to full length to send to destination
Zigbee Benefits and Mechanisms for Low Power consumption.
Benefits: * Extremely low cost * Ease of install * Realiable data transfer * Reasonable battery life Note that Zigbee only deals with PHY and portion of data link layer Mechanisms * Reduce amount of Tx data * Duty cycling of transceiver is opportunistically used to lower power consuption * Reduce frame overhead * Reduce complexity of physical and MAC layers * Reduce range
Explain the difference between Bluetooth Smart vs Smart Ready Devices.
Bluetooth Smart Ready: * dual-mode device * compatible with both Classic and low energy peripherals Bluetooth Smart: * low energy-only device * Dependent on Smart Ready or Smart device to function
Explain the Channel spectrum for 802.11
Channels 1, 6, 11 are the only channels that dont overlap. Isolated from one another in frequency spectrum
Explain carrier sensing in 802.11
Carrier sensing - check if channel is occupied Physical Carrier Sensing - physical layer listening to the channel and detects signal energy level. Virtual Carrier Sensing - Network Allocation Vector informs neighbors it is going to communicate for a particular duration. * neighbors (STAs) count down from that NAV time to 0.
Draw Table for MAC Frame format for the conditions To DS and From DS: Case 1 (00) Case 2 (01) Case 3 (10) Case 4 (11)
Case 1: Association request frame from STA to AP Address 1: RA = DA Address 2: TA = SA Address 3: BSSID Address 4: N/A Case 2: Data frames receiver for wirless station in infrastructure network Address 1: RA = DA Address 2: TA = BSSID Address 3: SA Address 4: N/A Case 3: Data transmitted from wireless station in infrastructure network Address 1: RA = BSSID Address 2: TA = SA Address 3: DA Address 4: N/A Case 4: Packet relayed between APs Address 1: RA Address 2: TA Address 3: DA Address 4: SA
RPL Distance Vector vs Source Routing Protocol
Distance Vector - use the shortest distance to get from source to destination. Requires computation at each node. * less overhead but need to know neighbors Source Vector - User has control over the path it want to send a packet along in the spanning tree. * source knows path and will include the whole path in the packet
What are the two types of MAC Protocols in 802.11?
Distributed Coordination Function (DCF) * Allows multiple independent STAs to interact w/o central control * CSMA for Packet Collision avoidance: Before transmission, each STA checks if medium is idle. If not idle, STA's employ random backoff algorithm to avoid collision. * May use RTS CTS to furhter avoid collision * No QoS guarantee * Most home routers implement DCF b/c it enables all devices to connected for access point Point Coordination Function (PCF) * Contention Free Service * Point coordinator (AP) is used to ensure medium is provided w/no contention * Schedule based - Not widely implemented * PCF does not define traffic classes
What are the primary functions of the DODAG?
Destination Oriented Directed Acyclic Graph: * DODAG (tree) may be constructed in a way where the Expected # of Transmissions or where current amount of battery life is considered during routing.