• 沒有找到結果。

Slotted ALOHA

Chapter 6 Problems Problem 1

Output corresponding to bit d1 = [-1,1,-1,1,-1,1,-1,1]

Output corresponding to bit d0 = [1,-1,1,-1,1,-1,1,-1]

Problem 2.

Sender 2 output = [1,-1,1,1,1,-1,1,1]; [ 1,-1,1,1,1,-1,1,1]

Problem 3.

8 1

1 1 1 1 ) 1 ( ) 1 ( 1 1 1 1 1 1 ) 1 ( ) 1 ( 1

1 1

2 = × + − × − + × + × + × + − × − + × + × =

d

8 1

1 1 1 1 ) 1 ( ) 1 ( 1 1 1 1 1 1 ) 1 ( ) 1 ( 1

2 1

2 = × + − × − + × + × + × + − × − + × + × =

d

Problem 4

Sender 1: (1, 1, 1, -1, 1, -1, -1, -1) Sender 2: (1, -1, 1, 1, 1, 1, 1, 1) Problem 5

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.

Problem 6

Suppose that wireless station H1 has 1000 long frames to transmit. (H1 may be an AP that is forwarding an MP3 to some other wireless station.) Suppose initially H1 is the only station that wants to transmit, but that while half-way through transmitting its first frame, H2 wants to transmit a frame. For simplicity, also suppose every station can hear every other station’s signal (that is, no hidden terminals). Before transmitting, H2 will sense that the channel is busy, and therefore choose a random backoff value.

Now suppose that after sending its first frame, H1 returns to step 1; that is, it waits a short period of times (DIFS) and then starts to transmit the second frame. H1’s second frame will then be transmitted while H2 is stuck in backoff, waiting for an idle channel. Thus, H1 should get to transmit all of its 1000 frames before H2 has a chance to access the channel. On the other hand, if H1 goes to step 2 after transmitting a frame, then it too chooses a random backoff value, thereby giving a fair chance to H2. Thus, fairness was the rationale behind this design choice.

Problem 7

A frame without data is 32 bytes long. Assuming a transmission rate of 11 Mbps, the time to transmit a control frame (such as an RTS frame, a CTS frame, or an ACK frame) is (256 bits)/(11 Mbps) = 23 usec. The time required to transmit the data frame is (8256 bits)/(11 Mbps) = 751

DIFS + RTS + SIFS + CTS + SIFS + FRAME + SIFS + ACK

= DIFS + 3SIFS + (3*23 + 751) usec = DIFS + 3SIFS + 820 usec Problem 8

a) 1 message/ 2 slots b) 2 messages/slot c) 1 message/slot d) i) 1 message/slot

ii) 2 messages/slot iii) 2 messages/slot e) i) 1 message/4 slots

ii) slot 1: Message AÆ B, message DÆ C slot 2: Ack BÆ A

slot 3: Ack CÆ D

= 2 messages/ 3 slots iii)

slot 1: Message CÆ D

slot 2: Ack DÆC, message AÆ B Repeat slot 3: Ack BÆ A

= 2 messages/3 slots Problem 10

a) 10 Mbps if it only transmits to node A. This solution is not fair since only A is getting served. By “fair” it means that each of the four nodes should be allotted equal number of slots.

b) For the fairness requirement such that each node receives an equal amount of data during each downstream sub-frame, let n1, n2, n3, and n4 respectively represent the number of slots that A, B, C and D get.

Now,

data transmitted to A in 1 slot = 10t Mbits (assuming the duration of each slot to be t) Hence,

Total amount of data transmitted to A (in n1 slots) = 10t n1

Similarly total amounts of data transmitted to B, C, and D equal to 5t n2, 2.5t n3, and t n4 respectively.

Now, to fulfill the given fairness requirement, we have the following condition:

10t n1 = 5t n2 = 2.5t n3 = t n4

Hence,

n2 = 2 n1

n3 = 4 n1

n4 = 10 n1

Now, the total number of slots is N. Hence, n1+ n2+ n3+ n4 = N

i.e. n1+ 2 n1 + 4 n1 + 10 n1 = N i.e. n1 = N/17

Hence, n2 = 2N/17 n3 = 4N/17 n4 = 10N/17

The average transmission rate is given by:

(10t n1+5t n2+ 2.5t n3+t n4)/tN

= (10N/17 + 5 * 2N/17 + 2.5 * 4N/17 + 1 * 10N/17)/N = 40/17 = 2.35 Mbps

c) Let node A receives twice as much data as nodes B, C, and D during the sub-frame.

Hence,

10tn1 = 2 * 5tn2 = 2 * 2.5tn3 = 2 * tn4 i.e. n2 = n1

n3 = 2n1

n4 = 5n1

Again,

n1 + n2 + n3 + n4 = N i.e. n 1+ n1 + 2n1 + 5n1 = N i.e. n1 = N/9

Now, average transmission rate is given by:

(10t n1+5t n2+ 2.5t n3+t n4)/tN = 25/9 = 2.78 Mbps

Similarly, considering nodes B, C, or D receive twice as much data as any other nodes, different values for the average transmission rate can be calculated.

Problem 11

a) No. All the routers might not be able to route the datagram immediately. This is because the Distance Vector algorithm (as well as the inter-AS routing protocols like BGP) is decentralized and takes some time to terminate. So, during the time when the algorithm is still running as a result of advertisements from the new foreign network, some of the routers may not be able to route datagrams destined to the mobile node.

b) Yes. This might happen when one of the nodes has just left a foreign network and joined a new foreign network. In this situation, the routing entries from the old

foreign network might not have been completely withdrawn when the entries from the new network are being propagated.

c) The time it takes for a router to learn a path to the mobile node depends on the number of hops between the router and the edge router of the foreign network for the node.

Problem 12

home agent permanent address:

128.119.40.18 6

foreign agent

care-of-address: 79.129.13.2

correspondent

dest: 128.11940.186

dest: 79.129.13.2

dest: 128.11940.186

dest: 128.11940.186

permanent address:

128.119.40.186

correspondent’s home agent

permanent address of correspondent:

10.10.10.1

dest: 10.10.10.1

dest: 10.10.10.1

dest: 20.20.20.2

foreign agent

care-of-address: 20.20.20.2

If the correspondent is mobile, then any datagrams destined to the correspondent would have to pass through the correspondent’s home agent. The foreign agent in the network being visited would also need to be involved, since it is this foreign agent that notifies the correspondent’s home agent of the location of the correspondent. Datagrams received by the correspondent’s home agent would need to be encapsulated/tunneled between the correspondent’s home agent and foreign agent, (as in the case of the encapsulated diagram at the top of Figure 6.23.

Problem 13

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.

Problem 14

First, we note that chaining was discussed at the end of section 6.5. In the case of chaining using indirect routing through a home agent, the following events would happen:

• The mobile node arrives at A, A notifies the home agent that the mobile is now visiting A and that datagrams to the mobile should now be forwarded to the specified care-of-address (COA) in A.

• The mobile node moves to B. The foreign agent at B must notify the foreign agent at A that the mobile is no longer resident in A but in fact is resident in B and has the specified COA in B. From then on, the foreign agent in A will forward datagrams it receives that are addressed to the mobile’s COA in A to the mobile’s COA in B.

• The mobile node moves to C. The foreign agent at C must notify the foreign agent at B that the mobile is no longer resident in B but in fact is resident in C and has the specified COA in C. From then on, the foreign agent in B will forward datagrams it receives (from the foreign agent in A) that are addressed to the mobile’s COA in B to the mobile’s COA in C.

Note that when the mobile goes offline (i.e., has no address) or returns to its home network, the datagram-forwarding state maintained by the foreign agents in A, B and C must be removed. This teardown must also be done through signaling messages. Note that the home agent is not aware of the mobile’s mobility beyond A, and that the correspondent is not at all aware of the mobile’s mobility.

In the case that chaining is not used, the following events would happen:

• The mobile node arrives at A, A notifies the home agent that the mobile is now visiting A and that datagrams to the mobile should now be forwarded to the specified care-of-address (COA) in A.

• The mobile node moves to B. The foreign agent at B must notify the foreign agent at A and the home agent that the mobile is no longer resident in A but in fact is resident in B and has the specified COA in B. The foreign agent in A can remove its state about the mobile, since it is no longer in A. From then on, the home agent will forward datagrams it receives that are addressed to the mobile’s COA in B.

• The mobile node moves to C. The foreign agent at C must notify the foreign agent at B and the home agent that the mobile is no longer resident in B but in fact is resident in C and has the specified COA in C. The foreign agent in B can remove its state about the mobile, since it is no longer in B. From then on, the home agent will forward datagrams it receives that are addressed to the mobile’s COA in C.

When the mobile goes offline or returns to its home network, the datagram-forwarding state maintained by the foreign agent in C must be removed. This teardown must also be done through signaling messages. Note that the home agent is always aware of the mobile’s current foreign network. However, the correspondent is still blissfully unaware of the mobile’s mobility.

Problem 15

Two mobiles could certainly have the same care-of-address in the same visited network.

Indeed, if the care-of-address is the address of the foreign agent, then this address would be the same. Once the foreign agent decapsulates the tunneled datagram and determines the address of the mobile, then separate addresses would need to be used to send the datagrams separately to their different destinations (mobiles) within the visited network.

Problem 16

If the MSRN is provided to the HLR, then the value of the MSRN must be updated in the HLR whenever the MSRN changes (e.g., when there is a handoff that requires the MSRN to change). The advantage of having the MSRN in the HLR is that the value can be provided quickly, without querying the VLR. By providing the address of the VLR Rather than the MSRN), there is no need to be refreshing the MSRN in the HLR.

相關文件