Homework - Vis Centercheung/courses/ee586_fall13/HW7.pdf ·  · 2013-10-31... In Section 5.3, ......

18
EE586 Homework and Laboratory #7 1| Page Please type your homework. We will discuss each problem in class but you must do your own work for submission. Homework 1. (10 pts) Consider three LANs interconnected by two routers, as shown in the above figure. Let IP A to IP J and MAC A to MAC J be the IP and MAC addresses of the interfaces from A to J respectively. a. Consider sending an IP datagram from Host E to Host B. Suppose all of the ARP tables are up to date. Enumerate all the steps, as done for the single-router example in text. b. Repeat (a), now assuming that the ARP table in the sending host is empty (and the other tables are up to date). 2. (10 pts) In Section 5.3, we provided an outline of the derivation of the efficiency of slotted ALOHA. In this problem we’ll complete the derivation. a. Recall that when there are N active nodes, the efficiency of slotted ALOHA is Np(1 p) N1 . Find the value of p that maximizes this expression. b. Using the value of p found in (a), find the efficiency of slotted ALOHA by letting N approach infinity. Hint: (1 1/N) N approaches 1/e as N approaches infinity. G H I J

Transcript of Homework - Vis Centercheung/courses/ee586_fall13/HW7.pdf ·  · 2013-10-31... In Section 5.3, ......

EE586 Homework and Laboratory #7

1 | P a g e

Please type your homework. We will discuss each problem in class but you must do your own workfor submission.

Homework1. (10 pts) Consider three LANs interconnected by two routers, as shown in the above

figure. Let IPA to IPJ and MACA to MACJ be the IP and MAC addresses of theinterfaces from A to J respectively.a. Consider sending an IP datagram from Host E to Host B. Suppose all of the ARP

tables are up to date. Enumerate all the steps, as done for the single-routerexample in text.

b. Repeat (a), now assuming that the ARP table in the sending host is empty (and theother tables are up to date).

2. (10 pts) In Section 5.3, we provided an outline of the derivation of the efficiency ofslotted ALOHA. In this problem we’ll complete the derivation.

a. Recall that when there are N active nodes, the efficiency of slotted ALOHA isNp(1 – p)N–1. Find the value of p that maximizes this expression.

b. Using the value of p found in (a), find the efficiency of slotted ALOHA byletting N approach infinity. Hint: (1 – 1/N)N approaches 1/e as N approachesinfinity.

G H

I J

EE586 Homework and Laboratory #7

2 | P a g e

3. (5 pts) Consider the single-sender CDMA example in the following figure. Whatwould be the sender’s output (for the 2 data bits shown) if the sender’s CDMA codewere (1, –1, 1, –1, 1, –1, 1, –1)?

4. (5 pts) Recall that with the CSMA/CD protocol, the adapter waits K=512 bit timesafter a collision, where K is drawn randomly. For K= 100, how long does the adapterwait until returning to Step 2 for a 10 Mbps Ethernet? For a 100 Mbps Ethernet?

5. (10 pts) Let’s consider the operation of a learning switch in the context of thefollowing figure. Suppose that (i) B sends a frame to E, (ii) E replies with a frame toB, (iii) A sends a frame to B, (iv) B replies with a frame to A. The switch table isinitially empty. Show the state of the switch table before and after each of theseevents. For each of these events, identify the link(s) on which the transmitted framewill be forwarded, and briefly justify your answers.

EE586 Homework and Laboratory #7

3 | P a g e

6. (5 pts) Suppose there are two ISPs providing WiFi access in a particular café, witheach 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?

7. (5 pts) Suppose an 802.11b station is configured to always reserve the channel withthe RTS/CTS sequence. Suppose this station suddenly wants to transmit 1,000 bytesof data, and all other stations are idle at this time. As a function of SIFS and DIFS,and ignoring propagation delay and assuming no bit errors, calculate the timerequired to transmit the frame and receive the acknowledgment.

8. (25 points) Wireshark on IEEE 802.11 networkIn all of the Wireshark labs thus far, we’ve captured frames on a wired Ethernetconnection. Here, since 802.11 is a wireless link-layer protocol, we’ll be capturingframes “in the air.” Unfortunately, many device drivers for wireless 802.11 NICsdon’t provide the hooks to capture/copy received 802.11 frames for use in Wireshark.Thus, in this lab, we’ll provide a trace of captured 802.11 frames for you to analyzeand assume in the questions below that you are using this trace.

A. Getting StartedDownload the zip file http://gaia.cs.umass.edu/wireshark-labs/wireshark-traces.zipand extract the file Wireshark_802_11.pcap. This trace was collected using AirPcapand Wireshark running on a computer in the home network of one of the authors,consisting of a Linksys 802.11g combined access point/router, with two wired PCsand one wireless host PC attached to the access point/router. The author is fortunateto have other access points in neighboring houses available as well. In this trace file,we’ll see frames captured on channel 6. Since the host and AP that we are interestedin are not the only devices using channel 6, we’ll see a lot of frames that we’re notinterested in for this lab, such as beacon frames advertised by a neighbor’s AP alsooperating on channel 6. The wireless host activities taken in the trace file are:

The host is already associated with the 30 Munroe St AP when the trace begins. At t = 24.82, the host makes an HTTP request to

http://gaia.cs.umass.edu/wireshark-labs/alice.txt. The IP address ofgaia.cs.umass.edu is 128.119.245.12.

At t=32.82, the host makes an HTTP request to http://www.cs.umass.edu, whoseIP address is 128.119.240.19.

At t = 49.58, the host disconnects from the 30 Munroe St AP and attempts toconnect to the linksys_ses_24086. This is not an open access point, and so the hostis eventually unable to connect to this AP.

At t=63.0 the host gives up trying to associate with the linksys_ses_24086 AP,and associates again with the 30 Munroe St access point.

EE586 Homework and Laboratory #7

4 | P a g e

B. Beacon FramesRecall that beacon frames are used by an 802.11 AP to advertise its existence. Toanswer some of the questions below, you’ll want to look at the details of the “IEEE802.11” frame and subfields in the middle Wireshark window. Whenever possible,when answering a question below, you should hand in a printout of the packet(s)within the trace that you used to answer the question asked. Annotate the printout2 toexplain your answer. To print a packet, use File->Print, choose Selected packet only,choose Packet summary line, and select the minimum amount of packet detail thatyou need to answer the question.

1. What are the SSIDs of the two access points that are issuing most of the beaconframes in this trace?

2. What are the intervals of time between the transmissions of the beacon frames thelinksys_ses_24086 access point? From the 30 Munroe St. access point? (Hint: thisinterval of time is contained in the beacon frame itself).

3. What (in hexadecimal notation) is the source MAC address on the beacon framefrom 30 Munroe St? Recall from Figure 6.13 in the text that the source,destination, and BSS are three addresses used in an 802.11 frame. For a detaileddiscussion of the 802.11 frame structure, see section 7 in the IEEE 802.11standards document (cited above).

4. What (in hexadecimal notation) is the destination MAC address on the beaconframe from 30 Munroe St??

5. What (in hexadecimal notation) is the MAC BSS id on the beacon frame from 30Munroe St?

6. The beacon frames from the 30 Munroe St access point advertise that the accesspoint can support four data rates and eight additional “extended supported rates.”What are these rates?

C. Data TransferSince the trace starts with the host already associated with the AP, let first look atdata transfer over an 802.11 association before looking at APassociation/disassociation. Recall that in this trace, at t = 24.82, the host makes anHTTP request to http://gaia.cs.umass.edu/wireshark-labs/alice.txt. The IP address ofgaia.cs.umass.edu is 128.119.245.12. Then, at t=32.82, the host makes an HTTPrequest to http://www.cs.umass.edu.

7. Find the 802.11 frame containing the SYN TCP segment for this first TCP session(that downloads alice.txt). What are three MAC address fields in the 802.11frame? Which MAC address in this frame corresponds to the wireless host (givethe hexadecimal representation of the MAC address for the host)? To the accesspoint? To the first-hop router? What is the IP address of the wireless hostsending this TCP segment? What is the destination IP address? Does thisdestination IP address correspond to the host, access point, first-hop router, orsome other network-attached device? Explain.

8. Find the 802.11 frame containing the SYNACK segment for this TCP session.What are three MAC address fields in the 802.11 frame? Which MAC address in

EE586 Homework and Laboratory #7

5 | P a g e

this frame corresponds to the host? To the access point? To the first-hop router?Does the sender MAC address in the frame correspond to the IP address of thedevice that sent the TCP segment encapsulated within this datagram? (Hint:review Figure 5.19 in the text if you are unsure of how to answer this question, orthe corresponding part of the previous question. It’s particularly important thatyou understand this).

D. Association/DiassociationRecall from Section 6.3.1 in the text that a host must first associate with an accesspoint before sending data. Association in 802.11 is performed using theASSOCIATE REQUEST frame (sent from host to AP, with a frame type 0 andsubtype 0, see Figure 6.13 in the text) and the ASSOCIATE RESPONSE frame(sent by the AP to a host with a frame type 0 and subtype of 1, in response to areceived ASSOCIATE REQUEST). For a detailed explanation of each field inthe 802.11 frame, see page 34 (Section 7) of the 802.11 spec athttp://gaia.cs.umass.edu/wireshark-labs/802.11-1999.pdf.

9. What two actions are taken (i.e., frames are sent) by the host in the trace justafter t=49, to end the association with the 30 Munroe St AP that was initiallyin place when trace collection began? (Hint: one is an IP-layer action, andone is an 802.11-layer action). Looking at the 802.11 specification, is thereanother frame that you might have expected to see, but don’t see here?

10. Examine the trace file and look for AUTHENICATION frames sent from thehost to an AP and vice versa. How many AUTHENTICATION messages aresent from the wireless host to the linksys_ses_24086 AP (which has a MACaddress of Cisco_Li_f5:ba:bb) starting at around t=49?

11. Does the host want the authentication to require a key or be open?12. Do you see a reply AUTHENTICATION from the linksys_ses_24086 AP in

the trace?13. Now let’s consider what happens as the host gives up trying to associate with

the linksys_ses_24086 AP and now tries to associate with the 30 Munroe StAP. Look for AUTHENICATION frames sent from the host to and AP andvice versa. At what times are there an AUTHENTICATION frame from thehost to the 30 Munroe St. AP, and when is there a reply AUTHENTICATIONsent from that AP to the host in reply? (Note that you can use the filterexpression “wlan.fc.subtype == 11and wlan.fc.type == 0 and wlan.addr ==IntelCor_d1:b6:4f” to display only the AUTHENTICATION frames in thistrace for this wireless host.)

14. An ASSOCIATE REQUEST from host to AP, and a correspondingASSOCIATE RESPONSE frame from AP to host are used for the host toassociated with an AP. At what time is there an ASSOCIATE REQUESTfrom host to the 30 Munroe St AP? When is the corresponding ASSOCIATEREPLY sent? (Note that you can use the filter expression “wlan.fc.subtype < 2and wlan.fc.type == 0 and wlan.addr == IntelCor_d1:b6:4f” to display onlythe ASSOCIATE REQUEST and ASSOCIATE RESPONSE frames for thistrace.)

EE586 Homework and Laboratory #7

6 | P a g e

15. What transmission rates is the host willing to use? The AP? To answer thisquestion, you will need to look into the parameters fields of the 802.11wireless LAN management frame.

E. Other Frame TypesOur trace contains a number of PROBE REQUEST and PROBE RESPONSEframes.

16. What are the sender, receiver and BSS ID MAC addresses in these frames?What is the purpose of these two types of frames? (To answer this last question,you’ll need to dig into the online references cited earlier in this lab).

9. (25 points) OPNET on Mobile Stations in IEEE 802.11 networkSee attached.