Microsoft Word - Homework.docsite.iugaza.edu.ps/djabal/files/Network_Homework_1_Solution.doc  ·...

12
ISLAMIC UNIVERSITY OF GAZA COMPUTER ENGINEERING DEPARTMENT Networks Homework # 1 Solution I N STR U C T I O NS : 1 . Show your work (i.e., how you derived your answer or the reason behind your thinking) in addition to your answer. 2 . Copied Solutions = ZERO 3 homework must be printed and solved on the same paper. 4 . Deadline : Wednesday, 21/3/2012 STUDENT NAME : ID # : MARK / 40

Transcript of Microsoft Word - Homework.docsite.iugaza.edu.ps/djabal/files/Network_Homework_1_Solution.doc  ·...

Page 1: Microsoft Word - Homework.docsite.iugaza.edu.ps/djabal/files/Network_Homework_1_Solution.doc  · Web viewAll nodes that are directly or indirectly connected to the source node are

ISLAMIC UNIVERSITY OF GAZA

COMPUTER ENGINEERING DEPARTMENT

NetworksHomework # 1 Solution

IN STRU CT IONS :

1 . Show your work (i.e., how you derived your answer or the reason behind your thinking) in addition to your answer.

2 . Copied Solutions = ZERO

3 homework must be printed and solved on the same paper.

4. Deadline : Wednesday, 21/3/2012

STUDENT NAME :

ID # :

MARK / 40

Page 2: Microsoft Word - Homework.docsite.iugaza.edu.ps/djabal/files/Network_Homework_1_Solution.doc  · Web viewAll nodes that are directly or indirectly connected to the source node are

2

1. Write TRUE/FALSE for the following statements :

1- ( )A property of flooding is that all nodes that are directly or indirectly connected to the source node are visited.

2- ( ) Random routing requires the use of network information.3- ( ) A variety of techniques have been developed to cope with congestion and to

give different quality-of-service guarantees to different types of traffic.4- ( ) For the routing function to work, an increased number of routing messages

must be exchanged between nodes to alert each other to areas of congestion; this reduces the capacity available for data packets.

5- ( )Congestion control is difficult for a frame relay network because of the limited tools available to the frame handlers.

6- ( )The SAN arrangement improves client-to-storage access efficiency, as well as direct storage-to-storage communications for backup and replication functions.

7- ( )Switches and hubs form the basic building blocks of most local area networks.8- ( ) Each station attaches to the network at a repeater in the star topology and can

transmit data onto the network through the repeater.9- ( ) The choice for transmission medium and topology is critical in LAN design.10- ( ) The bridge provides an extension to the LAN once modifications to the

communications software in the stations attached to the LAN are made.

Solution:1-true2-false3-true4-true5-true6-true7-true8-false9-true10-false

Page 3: Microsoft Word - Homework.docsite.iugaza.edu.ps/djabal/files/Network_Homework_1_Solution.doc  · Web viewAll nodes that are directly or indirectly connected to the source node are

3

2. Choose the correct answer: 1. The __________ function attempts to find the least cost route through the network.

a) ABRb) generic flow controlc) routingd) management

2. The simplest criterion in the selection of a route is to choose the _________ .a) maximum nodes availableb) minimum hop routec) network resourcesd) maximum hop route

3. With _________ the link costs used in designing routes cannot be based on any dynamic variable such as traffic.

a) fixed routingb) floodingc) random routingd) adaptive routing

4. The disadvantage of fixed routing is __________ .a) its simplicityb) its lack of flexibilityc) it does not work with datagramsd) it does not work with virtual circuits

5. "Because all routes are tried, at least one copy of the packet to arrive at the destination will have used a minimum-hop route" is a property of __________ .

a) fixed routingb) random routingc) adaptive routingd) flooding

6. With __________ , routing decisions that are made change as conditions on the network change.

a) fixed routingb) random routingc) adaptive routingd) flooding

7. The principle conditions that influence routing decisions are _________ .a) failure and congestionb) route distance and amount of nodesc) overhead and bandwidthd) complexity and node malfunctions

Page 4: Microsoft Word - Homework.docsite.iugaza.edu.ps/djabal/files/Network_Homework_1_Solution.doc  · Web viewAll nodes that are directly or indirectly connected to the source node are

4

8. Which of the following is a drawback associated with adaptive routing?a) Because all routes are tried, at least one copy of the packet to arrive at the destination will

have used a minimum hop route.b) Queue is an artificial measure of delay.c) All nodes that are directly or indirectly connected to the source node are visited.d) It may react too quickly, causing congestion producing oscillation, or too slowly, being

irrelevant.

9. Congestion control on the basis of ___________ is the responsibility of end systems and does not require action on the part of network nodes.

a) explicit signalingb) choke packetsc) implicit signalingd) backpressure

10. The ___________ specifies the mechanisms for addressing stations across the medium and for controlling the exchange of data between two users.

a) LANb) MACc) LLCd) PDU

Solution:

1- c

2-b

3-a

4-b

5-d

6-c

7-a

8-d

9-c

10-c

Page 5: Microsoft Word - Homework.docsite.iugaza.edu.ps/djabal/files/Network_Homework_1_Solution.doc  · Web viewAll nodes that are directly or indirectly connected to the source node are

5

3. Answer the following Questions:

1. Apply Dijkstra’s routing algorithm and Bellman-Ford algorithm to the networks in the following Figure:a)

Dijkstra’s routing algorithm:

Bellman-Ford algorithm :

Page 6: Microsoft Word - Homework.docsite.iugaza.edu.ps/djabal/files/Network_Homework_1_Solution.doc  · Web viewAll nodes that are directly or indirectly connected to the source node are

6

b)

Dijkstra’s routing algorithm:

Page 7: Microsoft Word - Homework.docsite.iugaza.edu.ps/djabal/files/Network_Homework_1_Solution.doc  · Web viewAll nodes that are directly or indirectly connected to the source node are

7

2. Consider the problem of transmitting one file of K bits. We are comparing packet switching and circuit switching.For the circuit-switched approach, it takes 1 second to set up the circuit. Once the circuit is set up, the transmission occurs at 1Mbps and the signals take 50ms from the source to the destination.For the packet-switched approach, the network transports the information as packets of 1kbits along lines with a transmission rate of 1Mbps; however, each packet must contain additional information that amounts to 100 bits.We neglect the packet switching delays. The signals again take 50ms from the source to the destination.(a) Calculate the delays to deliver the file using circuit-switching.(b) Assume that in packet switching one sends one packet, waits until we get an

acknowledgement (assume that this takes 55ms after the packet has been completely received by the destination), then sends the next packet, and so on. Calculate how long it takes to deliver the file.

(c) Assume that we use packet switching but that we send all the packets back to back, without waiting for acknowledgments. Calculate how long it takes to deliver the file.

(d) For what values of K is approach (a) faster than approach (c)?

The Solution:

Page 8: Microsoft Word - Homework.docsite.iugaza.edu.ps/djabal/files/Network_Homework_1_Solution.doc  · Web viewAll nodes that are directly or indirectly connected to the source node are

8

3. Consider sending voice from Host A to Host B over a packet-switched network (for example, Internet phone). Host A converts analog voice to a digital 64 kbps bit stream on the fly. Host A then groups the bits into 48-byte packets. There is one link between Host A and B; its transmission rate is 1 Mbps and its propagation delay is 2 ms. As soon as Host A gathers a packet, it sends it to Host B. As soon as Host B receives an entire packet, it converts the packet's bits to an analog signal. What is the maximum time that elapses from the time a bit is created (from the original analog signal at Host A) until the bit is decoded (as part of the analog signal at Host B)?

The Solution:

The maximum time elapses if the bit falls at the beginning of a new packet. We must first wait for the entire packet to be generated, for the packet to be transmitted over the 1 Mbps link, and for one propagation delay:

One may have interpreted that Host B reproduces the first bit as soon as the first bit of the first packet arrives (without waiting for the entire packet to arrive). In this case, the second term in the above sum (the transmission time) goes away. In practice, it is customary to wait for the full packet to arrive (to be able to check it for errors, among other reasons).

Page 9: Microsoft Word - Homework.docsite.iugaza.edu.ps/djabal/files/Network_Homework_1_Solution.doc  · Web viewAll nodes that are directly or indirectly connected to the source node are

9

4. Consider two hosts, Hosts A and B, connected by a single link of rate R bps. Suppose that the two hosts are separated by m meters, and suppose the propagation speed long the link is s meters/sec. Host A is to send a packet of size L bits to Host B.a) Express the propagation delay, dprop in terms of m and s ?

dprop =d/s=m/s sec

b) Determine the transmission time of the packet, dtrans in terms of L and R ?

dtrans =L/R sec

c) Ignoring processing and queuing delays, obtain an expression for the end to end delay?

T= dprop + dtrans =(m/s)+(L/R) sec

d) Suppose Host A begins to transmit the packet at time t=0. At time t= d trans , where is the last bit of the packet?

The last bit will be at the begning of A ready to be transmitted.

e) Suppose dprop is greater than dtrans .At time t= dtrans ,Where is the first bit of the packet ?

dprop > dtrans

m/s > L/RL < (m*R)/sthe first bit of the packet on the link

f) Suppose dprop is less than dtrans .At time t= dtrans ,Where is the first bit of the packet ?

dprop < dtrans

m/s < L/RL > (m*R)/sthe first bit of the packet will arrive to B.

g)Suppose s=2.5*108,L=100 bits and R= 28kbps.Find the distance m so that dprop equal dtrans ?dprop = dtrans

m/s = L/Rm=(L*s)/R=(100* 2.5*108)/28000=892.857 m

h) Suppose s=2.5*108,L=100 bits and R= 28kbps.Find the distance m so that d=250 ms and there is three identical routers that each has 0.25 us processing?d= 4* dtrans + 3*tprocessing + dprop

d= 4*(L/R)+ 3*tprocessing + (m/s).25=4*(100/28000)+3*.25*10-6+(m/2.5*108)From the a bove equation calculate m.