* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Data Link Layer
Survey
Document related concepts
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
Computer network wikipedia , lookup
Distributed firewall wikipedia , lookup
Piggybacking (Internet access) wikipedia , lookup
Network tap wikipedia , lookup
Airborne Networking wikipedia , lookup
List of wireless community networks by region wikipedia , lookup
Cracking of wireless networks wikipedia , lookup
Wake-on-LAN wikipedia , lookup
Transcript
Data Link Layer The goal of the Data Link layer is to deliver packets, or frames, with no undetected errors, provide basic network security, and allow for the efficient use of the underlying medium. Packet format A typical DLL packet will contain addressing and some form of frame check information to provide evidence that the frame is uncorrupted. Several other fields are included in the 802.15.4 standard, as shown in Figure X. Figure 1 802.15.4 DLL frame format. The minimum header and footer total length is 11B, and the maximum is 39B (copied from Figure 41 of [IEEE802.15.4-2006]). The frame control Frame Check Sequence The cyclic redundancy check, or CRC Message Integrity Code Medium Access Control The medium access control sublayer, or MAC, determines to a great extent the power consumption, reliability, and scalability of wireless sensor network deployments. To achieve lifetimes of years on low-cost batteries, current radios must operate at duty cycle of less than 1% or even 0.1%. When all nodes are sleeping more than 99% of the time, providing a mesh network is a challenge! Aloha The simplest MAC is similar to what children use when playing with walkie-talkies: push to talk. When you have a message to send, just send it. This approach works great as long as the person that you’re talking to is listening, and there’s not a lot of traffic on the channel. If there’s only one node trying to talk on the channel, then that node can use 100% of the available channel capacity. If there is more than one node trying to talk, there’s a chance that the two transmissions will overlap, and the receiver will not hear the transmission. The probability of collision depends a lot on the connectivity of the network and the type of traffic that’s flowing on it. It is common to assume that the nodes are unsynchonized, and collectively they have an “offered load”, or packet generation rate, called G. G is calculated as a fraction of the total available throughput, or capacity, of the channel. Example: a 2.4GHz 802.15.4 mote wants to send one maximum-length packet every second. The offered load G=4.256ms/1s = 0.4256% If the rate of generation of packets in the network follows a Poisson distribution, then the probability of a packet being transmitted and received successfully (no collisions) is P=e-2G The “goodput” on the channel is the product of the offered load and the probability of successful delivery, or GP = Ge-2G which is also in units of channel capacity. A quick derivative will show that GP is maximized when G=0.5, yieldingGP=1/(2e)=0.18 . Figure 2 Goodput vs. offered load for Aloha and Slotted Aloha. The straight line represents ideal performance. This is an important result, which says that with Poisson arrival times, the best goodput possible with Aloha is only 18% of the total available channel capacity. Perhaps more important, as more load is offered to the network, the goodput actually falls, and falls dramatically. This is not an abstract result. There are many anecdotal stories from the early days of the internet when performance some networks dropped by orders of magnitude as a result of this phenomenon. CSMA Actually, the example of children with walkie-talkies looks more like Carrier Sense Multiple Access, as long as the children are smart and don’t try to talk when they can hear someone else talking. In CSMA, before you transmit you sample the channel to see if anyone else is transmitting. If the channel is free, you transmit. What you do if the channel is busy depends on which flavor of CSMA you’re using. Synchronization Hidden Terminal Exposed Terminal Random Exponential Backoff In order to prevent network collapse, motes which do not receive an acknowledgement when one was expected must assume that their message collided with another transmission, and resend the message only after a random backoff. On links with low PDR, this can induce substantial latency even if there are no collisions. Preamble Sampling Wakeup Radio Time Synchronized Slotted Aloha GSM Beacons, superframes TSCH Exercises 1. If a burst of noise corrupts dozens of bits in the middle of an 802.15.4 packet, what is the probability that the error is undetected by a. CRC-16 b. MIC-32 c. CRC-16 and MIC-32 2. Assume that there are two separate 1000-node networks in a building running with the same network ID, and each mote sends on-average one packet every second, and each mote can hear on-average 10 motes from the other network. Both networks properly calculate their FCS, and both use a 32-bit MIC, but with different keys. How often will a mote from one network incorrectly accept a packet from the other network (i.e. how often will the MIC be the same)? 3. Calculate the effective G for a mote sending one maximum-length acknowledged 2.4GHz 802.15.4 packet per second. Assume the TX/RX turnaround is the 15.4 specified 0.192ms, and a 30B ACK. a. What is the peak number of packets per second that can be delivered to an access point assuming pure Aloha statistics. 4. In an Aloha network with 10% goodput, a. What is the offered load, and what fraction of that is retries? b. If congestion occurs, and the network ends up operating on the far side of the peak (G>0.5), how many times is each packet sent on average before it is successfully delivered? 5. Generate a random connected 2D array of motes with the Hack Model for connectivity. For two motes A and B which can both hear mote C, calculate the probability that mote A can hear mote B. (If you can do this analytically, let me know!) What does this mean about the hidden terminal problem (common, rare, unimportant, …)? 6. In the 802.15.4-2006 standard, refer to figure 69 and estimate the average and worst-case latency due to CSMA backoff for a link with 100% PDR, 90% PDR, and 50% PDR. You may find Tables 85 and 86 useful for constants, like aUnitBackoffPeriod. 7. Consider the 802.15.4 backoff strategy for non-ACKnowledge frames (7.5.6.4.3) with 100% PDR when there is no channel contention. Is this likely to work well with hidden terminals? What will happen?