hwk3 F 11 3 Sol 2
hwk3 F 11 3 Sol 2
Helmy
Homeworks 3: Data Link Layer and Wireless Networks
Assigned: Nov 9, 2011. Due Date: Nov 22nd, 2011 (beginning of lecture or to TA) Chapter 5: Data Link Layer and MAC protocols 1. (4 points) If all the links in the Internet were to provide reliable delivery service, would the TCP reliable delivery service be redundant? Why or why not? Although each link guarantees that an IP datagram sent over the link will be received at the other end of the link without errors, it is not guaranteed that IP datagrams will arrive at the ultimate destination in the proper order. With IP, datagrams in the same TCP connection can take different routes in the network, and therefore arrive out of order. TCP is still needed to provide the receiving end of the application the byte stream in the correct order. Also, IP can lose packets due to routing loops or equipment failures. 2. (5 points) What are some of the possible services that a link-layer protocol can offer to the network layer? Which of these link-layer services have corresponding services in IP? In TCP? Framing: there is also framing in IP and TCP; link access; reliable delivery: there is also reliable delivery in TCP; flow control: there is also flow control in TCP; error detection: there is also error detection in IP and TCP; error correction; full duplex: TCP is also full duplex. 3. (3 points) Suppose nodes A, B, and C attach to the same LAN. If A sends frames to B (addressed to the MAC address of B), will C's network card (adapter) process these frame and will it pass the datagrams in the frames to its network layer? How would your answers change if A sends frames with the MAC broadcast address? Cs adapter will process the frames, but the adapter will not pass the datagrams up the protocol stack. If the LAN broadcast address is used, then Cs adapter will both process the frames and pass the datagrams up the protocol stack. 4. (3 points) Why is an ARP query sent within a broadcast frame? Why is an ARP response sent within a frame with a specific destination MAC address? An ARP query is sent in a broadcast frame because the querying host does not know which adapter address corresponds to the IP address in question. For the response, the sending node knows the adapter address to which the response should be sent, so there is no need to send a broadcast frame (which would have to be processed by all the other nodes on the LAN).
5. (4 points) Consider the information content of a packet is the bit pattern: 1010101010101011 and an even parity scheme is being used. What would the value of the field containing the parity bits be for the case of a two-dimensional parity scheme? [Your answer should be such that a minimum length checksum field is used.] The rightmost column and bottom row are for parity bits. 10100 10100 10100 10111 00011 6. Derivation of the efficiency of slotted ALOHA. a. (4 points) With N active nodes, the efficiency of slotted ALHOA is Np(1-p)N-1. Find the value of p that maximizes this expression.
b. (3 points) Using the value of p found in (a), find the efficiency of slotted ALHOA by letting N approach infinity. Hint: (1-1/N)N appraoches 1/e as N approaches infinity.
Thus
7. (6 points) Explain the effect of changing the number of stations, N, on the utilization of CSMA/CD. Comment on the fact that N does not appear in the expression for the utilization [For CSMA/CD u=1/(1+5a)]
When N increases, the probability of collision increases, and hence the average time for successful transmission increases (increasing in turn the wasted time in proportion to the useful time), and the end result is the utilization decreasing with the increase of N. The formula is u = 1/(1+5a) does not include N, so we will not be able to explain the effect of N using this formula. In the derivation of the formula we used an approximation that the average time taken to get a successful transmission (after possibly one or more collisions) is ~5 prop. time. This approximation did not take into account that the probability of collision is a function of N.
8. (5 points) For an Ethernet LAN the data rate was decreased from 100Mbps to 10Mbps. Utilization (U) of this network will be more or less? [show your answer by calculating U] Suggest two ways in which we can return the utilization to what it was before (Increasing or decreasing another parameter and by how much? Show your reasoning.)
1 Tprop propagationDelay , where a transmissionDelay (1 5a) Trans With the decrease of the transmission rate from 100Mbps to 10Mbps theres an increase in the transmission delay by 10 folds, hence theres a decrease in a by 10 folds and an increase in the utilization. So the utilization becomes more.
For Ethernet u To return the utilization to what it was before we can decrease the transmission delay by decreasing the bits in a frame by 10 folds, or we can increase the propagation delay by increasing the length of the LAN by 10 folds. 9. (total 13 points) (5 points) Derive an expression for the utilization of the token ring release-aftertransmission algorithm. Comment on your result. (3 points) What happens to the utilization with the increase in number of stations? Why? (2 points) What happens to the utilization with the change in a? (3 points) Compare this result to utilization of token ring (release after reception) and Ethernet. For token ring release after transmission (RAT):
T1
T2
T3
TN
PROP12
PROP23
PROPN1
Utilization
T1 T2 ..... TN Useful Transmission time Total time (Useful wasted ) T1 T2 ..... TN PROP i i 1
PROP
PROP E (Tn )
N i
Ti N
1 1 PROP a 1 1 N Ti
- As N increases there is less time wasted in propagating the token and utilization increases. As a increases the utilization decreases. - For token ring release after reception (RAR):
1 1 a
1 1 5a For the same a, we see the u RAT > u RAR > u CSMA/CD
For Ethernet (CSMA/CD):
When a increases the utilization for all schemes drops, while at small a they exhibit somewhat similar utilization.
[Extra: For token ring release after transmission (RAT), as N increases the utilization increases. For token ring release after reception (RAR), as N increases the utilization is mostly unchanged. For CSMA/CD, as N increases the utilization goes down due to higher chance of collision.] 10. (5 points) A 2km long FDDI ring, with frame size of 10,000 bits in length and multiple machines connected. Can you reason about a lower bound on the utilization of such a network? [Note: FDDI is token ring (with release after transmission) with 100Mbps] [If not enough information is given please indicate so clearly in your answer, pointing out what information is missing.] For token ring (release after transmission) u
1 (1 a ) N
As N increases, so does the utilization. With multiple machines the least utilization we get is when N=2, which represents the lower bound. Get a for 2km and 10kbits at 100Mbps, a=0.1, and u=95.238% With N > 2 we get u > 95.238% Chapter 6: Wireless Communications and Networks 11. (4 points) As a mobile node gets farther and farther away from a base station what are two actions that a base station could take to ensure that the loss probability of a transmitted frame does not increase? a) Increasing the transmission power b) Reducing the transmission rate 12. (3 points) Describe the role of the beacon frames in 802.11? APs transmit beacon frames. An APs beacon frames will be transmitted over one of the 11 channels. The beacon frames permit nearby wireless stations to discover and identify the AP. 13. (4 points) Why are acknowledgements used in 802.11 but not in wired Ethernet? In wired Ethernet collision detection is used to determine whether a packet was corrupt during the link transmission. Collision detection is not used in 802.11 since it operates over wireless channels (in which collision detection is not possible). Hence, to know whether a packet was lost or not acknowledgements are used. Furthermore, the probability of packet loss during to the physical medium characteristics (i.e., BER) is quite low for Ethernet and is much higher for wireless channels, hence theres a need for Acks to determine whether a frame was lost. 14. (3 points) Suppose the IEEE 802.11 RTS and CTS frames were as long as the standard DATA and ACK frames. Would there be any advantage to using the CTS and RTS frames? Why or why not? No, there wouldnt be any advantage. Suppose there are two stations that want to transmit at the same time, and they both use RTS/CTS. If the RTS frame is as long as a DATA frames, the channel would be wasted for as long as it would have been wasted for two colliding DATA frames. Thus, the RTS/CTS exchange is only useful when the RTS/CTS frames are significantly smaller than the DATA frames. 15. (5 points) What are the purposes of the HLR and VLR in cellular (e.g., GSM) networks? What elements of mobile IP are similar to the HLR and VLR? The home network in GSM maintains a database called the home location register
(HLR), which contains the permanent cell phone number and subscriber profile information about each of its subscribers. The HLR also contains information about the current locations of these subscribers. The visited network maintains a database known as the visitor location register (VLR) that contains an entry for each mobile user that is currently in the portion of the network served by the VLR. VLR entries thus come and go as mobile users enter and leave the network. The edge router in home network (or home agent) in mobile IP is similar to the HLR in GSM and the edge router in foreign network (or foreign agent) is similar to the VLR in GSM. 16. (6 points) Suppose there are two ISPs providing WiFi access in a particular cafe', with each ISP operating its own AP and having its own IP address block. a. Further suppose that by accident, each ISP has configured its AP to operate over channel 11. Will the 802.11 protocol completely break down in this situation? discuss what happens when two stations, each associated with a different ISP, attempt to transmit at the same time. b. Now suppose that one AP operates over channel 1 and the other over channel 11. How do your answers change? a) The two APs will typically have different SSIDs and MAC addresses. A wireless station arriving to the caf will associate with one of the SSIDs (that is, one of the APs). After association, there is a virtual link between the new station and the AP. Label the APs AP1 and AP2. Suppose the new station associates with AP1. When the new station sends a frame, it will be addressed to AP1. Although AP2 will also receive the frame, it will not process the frame because the frame is not addressed to it. Thus, the two ISPs can work in parallel over the same channel. However, the two ISPs will be sharing the same wireless bandwidth. If wireless stations in different ISPs transmit at the same time, there will be a collision. For 802.11b, the maximum aggregate transmission rate for the two ISPs is 11 Mbps. b) Now if two wireless stations in different ISPs (and hence different channels) transmit at the same time, there will not be a collision. Thus, the maximum aggregate transmission rate for the two ISPs is 22 Mbps for 802.11b. 17. (4 points) Why are cells (and clusters of cells) used in cellular communication systems instead of a powerful antenna covering the whole desired geographical area? To resolve the issue of spectral congestion, where a large number of users are competing (or contending) for a small number of channels due to the limited frequency spectrum. Using a single powerful antenna would cover a large geographical area, but each channel can get used once (i.e., given a one user) to limit interference. With cellular systems, the power of the antenna (or cell tower) is limited to a relatively small geographical area. Hence the channels (using the same frequencies) can be used in other cells (in different clusters) that are placed sufficiently distant to prevent interference. Hence a much larger number of users can be supported at the same time.
18. (4 points) Why don't we use CSMA/CD in wireless networks? Collision detection is not possible due to the difference in the physical medium characteristics between Ethernet (in which CSMA/CD is used) and wireless channels: 1- the transmission power is high enough to distort reception at the sender 2- there could be little correlation between successful reception at the sender and the receiver. For example, a receiver may have collision (by receiving enough signal power from multiple senders), while a sender may not experience the collision and vice versa. 19. (4 points) Why does 802.11 use rate adaptation? Signal to noise ratio (SNR) degrades fast as the mobile nodes move away from the access point (or when the environment changes). This leads to much higher BER for the same transmission rate (check the graph for SNR, BER and rate in the lecture slides or book). Changing the modulation to a lower transmission rate achieves a much lower BER for the same SNR. Hence, reducing to a lower rate during bad SNR conditions improves performance. On the other hand, increasing to a higher rate with favorable SNR conditions also boosts performance. Rate adaptation includes rules for both reducing the rate with bad SNR and increasing the rate with good SNR. 20. (4 points) What the hidden terminal problem and how is it resolved? When A can communicate with B, C can communicate with B, B can communicate with both A and C, but A and C cannot communicate with each other (either due to a large distance between them such that the signal received is so weak, or due to obstacles between A and C). The problem occurs when both A and C want to transmit to B. Even if A and C use RTS packets, this only prevents the nodes within their range from transmitting at the same time, but does not prevent collision scenarios in which packets from A and C arrive at B at similar times. The problem is resolved using RTS/CTS exchanges, where the CTS is send by B in this case, preventing the above collision (e.g., if A is sending RTS to B, Bs CTS will be heard by C and C will not transmit to B at the same time). 21. (4 points) In mobile IP, what effect will mobility have on end-to-end delays of datagrams between the source and destination? Because datagrams must be first forward to the home agent, and from there to the mobile, the delays will generally be longer than via direct routing. Note that it is possible, however, that the direct delay from the correspondent to the mobile (i.e., if the datagram is not routed through the home agent) could actually be smaller than the sum of the delay from the correspondent to the home agent and from there to the mobile. It would depend
on the delays on these various path segments. Note that indirect routing also adds a home agent processing (e.g., encapsulation) delay. 22. (10 points: extra) While most conventional communication systems attempt to conserve bandwidth, CDMA uses bandwidth that is much higher than that necessary to transmit a signal. How does CDMA achieve such a high bandwidth and why? [clearly mention the main operation and (5) advantages of using CDMA] Operation: CDMA uses a pseudo noise (PN) sequence. The PN sequence has a much higher frequency (hence much lower pulse duration) than the original signal. By multiplying the PN sequence by the original signal, the resulting signal becomes of much higher bandwidth than the original signal (i.e., the original signal is spread in bandwidth). Each user uses a different PN sequence. The advantages are: 1-secure: using the PN sequence, non-intended receivers with the wrong PN sequence get noise 2- reduced fading effect . Fading affects only part of the frequency spectrum. By spreading the signal over the whole spectrum only part of the signal is affected, and can be in general recovered . 3- No frequency planning . All cells use the same frequency . 4- Soft handoff (no frequency change during handoff) . All cells use the same frequency 5- Increased capacity: the number of users is not limited by the number of channels anymore (there is no channel allocation), but is limited by the noise floor. Typically the number of users supported by CDMA systems can go up to 5 to 10 times more than other conventional cellular systems.