Thursday, December 16, 2010

Computer Network Questions and Answers

1. Why is it important for protocols configured on top of the Ethernet to have a length field in their header, indicating how long the message is?
Ans: It is important to indicate the message size because of the following reasons:
 There can be padded data inside the message,
 In case of collision only part of data is received, so it can checked by the message length field, otherwise, it won't be known.
 The Ethernet frame size isn't fixed. It can hold up to 1500 bytes but it can vary from network to network.

2. What kinds of problems can arise when two hosts on the same Ethernet share the same hardware address? Describe what happens and why that behavior is a problem.
Ans : 1. Hosts are using hardware address to filter whether the packet is for them or not. So, they can discard the packets which do not belong to them. However, if the same hardware address is shared with other host, it is likely to receive wrong packets which can harm the host.
2. On the same Ethernet line, hosts keep dynamic ARP table to match Internet address and physical address (MAC address), but if they see two different IP addresses having same MAC address. It is hard to tell what happens for this.
3. If hosts share the switch on the Ethernet line, the switch will get confused to update the address table. It will continuously change the address table, so it can lead to unstable state.

3. The 1982 Ethernet specification allowed between any two stations up to 1500 m of coaxial cable, 1000 m of other point-to-point link cable, and two repeaters. Each station or repeater connects to the coaxial cable via up to 50 m of “drop cable.” Typical delays associated with each device are given in Table below (where c = speed of light in a vacuum = 3×108 m/s). What is the worst-case round-trip propagation delay, measured in bits, due to the sources listed? (This list is not complete; other sources of delay include sense time and signal rise time.)

Item Delay
Coaxial cable propagation speed .77c
Link/drop cable propagation speed .65c
Repeaters approximately 0.6 μs each
Transceivers approximately 0.2 μs each
Typical delays associated with various devices
One-way delays:
Coax: 1500m 6.49 3 s
link: 1000m 5.13 3 s
repeaters two 1.20 3 s
transceivers six (two for 1.20 3 s
each repeater,
one for each
station)

drop cable 6 , 50m 1.54 3 s
Total: 15.56 3 s
The roundtrip delay is thus about 31.1 3 s, or 311 bits. The “official” total is 464 bits, which when extended by 48 bits of jam signal exactly accounts for the 512-bit minimum packet size.
The 1982 Digital-Intel-Xerox specification presents a delay budget (page 62 of that document) that totals 463.8 bit-times, leaving 20 nanoseconds for unforeseen contingencies.

4. Coaxial cable Ethernet was limited to a maximum of 500 m between repeaters, which regenerate the signal to 100% of its original amplitude. Along one 500-m segment, the signal could decay to no less than 14% of its original value (8.5 dB). Along 1500 m, then, the decay might be (0.14)3 = 0.3%. Such a signal, even along 2500 m, is still strong enough to be read; why then are repeaters required every 500 m?
Ans>>A station must not only detect a remote signal, but for collision detection it must detect a remote signal while it itself is transmitting. This requires much higher remote-signal intensity.

5. Suppose the round-trip propagation delay for Ethernet is 46.4 μs. This yields a minimum packet size of 512 bits (464 bits corresponding to propagation delay + 48 bits of jam signal).
(a) What happens to the minimum packet size if the delay time is held constant, and the signaling rate rises to 100 Mbps?
(b) What are the drawbacks to so large a minimum packet size?
(c) If compatibility were not an issue, how might the specifications be written so as to permit a smaller minimum packet size?

Ans>>(a) Assuming 48 bits of jam signal was still used, the minimum packet size would be 4640+48 bits = 586 bytes.
(b) This packet size is considerably larger than many higher-level packet sizes, resulting in considerable wasted bandwidth.
(c) The minimum packet size could be smaller if maximum collision domain diameter were reduced, and if sundry other tolerances were tightened up.

6. A group of N stations share a 56-kbps pure ALOHA channel. Each station outputs a 1000-bit frame on an average of once every 100 sec, even if the previous one has not yet been sent (e.g., the stations can buffer outgoing frames). What is the maximum value of N?
ANS>>with pure ALOHA the usable bandwidth is 0.184 × 56 kbps = 10.3 kbps.Each station requires 10 bps, so N = 10300/10 = 1030 stations

7. Consider the delay of pure ALOHA versus slotted ALOHA at low load. Which one is less? Explain your answer.
ANS>>With pure ALOHA, transmission can start instantly. At low load, no collisions are expected so the transmission is likely to be successful. With slotted ALOHA, it has to wait for the next slot. This introduces half a slot time of delay.

8. Ten thousand airline reservation stations are competing for the use of a single slotted ALOHA channel. The average station makes 18 requests/hour. A slot is 125 μsec. What is the approximate total channel load?
ANS>>Each terminal makes one request every 200 sec, for a total load of 50 requests/sec. Hence G = 50/8000 = 1/160.

9. A large population of ALOHA users manages to generate 50 requests/sec, including both originals and retransmissions. Time is slotted in units of 40 msec.
a. What is the chance of success on the first attempt?
b. What is the probability of exactly k collisions and then a success?
c. What is the expected number of transmission attempts needed?

ANS>> (a) With G = 2 the Poisson law gives a probability of e −2.
(b) (1 − e −G)ke −G = 0.135 × 0.865k .
(c) The expected number of transmissions is eG = 7.4.

10. Measurements of a slotted ALOHA channel with an infinite number of users show that 10 percent of the slots are idle.
a. What is the channel load, G?
b. What is the throughput?
c. Is the channel underloaded or overloaded?

ANS>> (a) From the Poisson law again, P0 = e −G, so G = −lnP0 = −ln 0.1 = 2.3.
(b) Using S = Ge−G with G = 2.3 and e −G = 0.1, S = 0.23.
(c) Whenever G > 1 the channel is overloaded, so it is overloaded.

11. In an infinite-population slotted ALOHA system, the mean number of slots a station waits between a collision and its retransmission is 4. Plot the delay versus throughput curve for this system.
ANS>>The number of transmissions is E = eG. The E events are separated by E – 1 intervals of four slots each, so the delay is 4(eG − 1). The throughput is given by S = Ge−G. Thus, we have two parametric equations, one for delay and one for throughput, both in terms of G. For each G value it is possible to find the corresponding delay and throughput, yielding one point on the curve.

12. 1-km-long, 10-Mbps CSMA/CD LAN (not 802.3) has a propagation speed of 200 m/μsec. Repeaters are not allowed in this system. Data frames are 256 bits long, including 32 bits of header, checksum, and other overhead. The first bit slot after a successful transmission is reserved for the receiver to capture the channel in order to send a 32-bit acknowledgement frame. What is the effective data rate, excluding overhead, assuming that there are no collisions?
ANS>> The round-trip propagation time of the cable is 10µsec. A complete transmission has six phases: transmitter seizes cable (10µsec) transmit data (25.6µsec) Delay for last bit to get to the end (5.0 µsec) receiver seizes cable (10µsec) acknowledgement sent (3.2 µsec) Delay for last bit to get to the end (5.0 µsec) the sum of these is 58.8 µsec. In this period, 224 data bits are sent, for a rate of about 3.8 Mbps.

13. Consider building a CSMA/CD network running at 1 Gbps over a 1-km cable with no repeaters. The signal speed in the cable is 200,000 km/sec. What is the minimum frame size?
ANS>> For a 1-km cable, the one-way propagation time is 5 μsec, so 2τ = 10 μsec. To make CSMA/CD work, it must be impossible to transmit an entire frame in this interval. At 1 Gbps, all frames shorter than 10,000 bits can be completely transmitted in under 10 μsec, so the minimum frame is 10,000 bits or 1250 bytes.

14. An IP packet to be transmitted by Ethernet is 60 bytes long, including all its headers. If LLC is not in use, is padding needed in the Ethernet frame, and if so, how many bytes?
ANS>>The minimum Ethernet frame is 64 bytes, including both addresses in the Ethernet frame header, the type/length field, and the checksum. Since the header fields occupy 18 bytes and the packet is 60 bytes, the total frame size is 78 bytes, which exceeds the 64-byte minimum. Therefore, no padding is used.

15. Ethernet frames must be at least 64 bytes long to ensure that the transmitter is still going in the event of a collision at the far end of the cable. Fast Ethernet has the same 64-byte minimum frame size but can get the bits out ten times faster. How is it possible to maintain the same minimum frame size?
ANS>>The maximum wire length in fast Ethernet is 1/10 as long as in Ethernet.

16. Some books quote the maximum size of an Ethernet frame as 1518 bytes instead of 1500 bytes. Are they wrong? Explain your answer.
ANS>>The payload is 1500 bytes, but when the destination address, source address, type/length, and checksum fields are counted too, the total is indeed 1518.

17. Recall that with the CSMA/CD protocol, the adapter waits K*512 bit times after a collision, where K is drawn randomly. For K=100, how long does the adapter wait until returning to Step 2 for a 10 Mbps Ethernet? For a 100 Mbps Ethernet?
ANS>> Wait for 51,200 bit times. For 10 Mbps, this wait is

For 100 Mbps, the wait is 512 μ sec.

18. Suppose nodes A and B are on the same 10 Mbps Ethernet segment, and the propagation delay between the two nodes is 225 bit times. Suppose node A begins transmitting a frame, and before it finishes station B begins transmitting a frame. Can A finish transmitting before it detects that B has transmitted? Why or why not? If the answer is yes, then A incorrectly believes that its frame was successfully transmitted without a collision.
Hint: Suppose at time t=0 bit times, A begins transmitting a frame. In the worst case, A transmits a minimum size frame of 512+64(prembale) bit times. So A would finish transmitting the frame at t=512+64 bit times. Thus the answer is no if B's signal reaches A before bit time t=512+64 bits. In the worst case, when does B's signal reach A?

ANS>> At t = 0 A transmits. At t = 576 , A would finish transmitting. In the worst case, B begins transmitting at time t = 224 . At time t = 224 + 225 = 449 B 's first bit arrives at A . Because 449 < 576 , A aborts before completing the transmission of the packet, as it is supposed to do. Thus A cannot finish transmitting before it detects that B transmitted. This implies that if A does not detect the presence of a host, then no other host begins transmitting while A is transmitting. 19. Suppose nodes A and B are on the same 10 Mbps Ethernet segment, and the propagation delay between the two nodes is 225 bit times. Suppose A and B send frames at the same time, the frames collide, and then A and B choose different values of K in the CSMA/CD algorithm. Assuming no other nodes are active, can the retransmissions from A and B collide? For our purposes, it suffices to work out the following example. Suppose A and B begin transmission at t=0 bit times. They both detect collisions at t=225 bit times. They finish transmitting jam signal at t= 225+48= 273 bit times. Suppose KA=0 and KB=1. At what time does B schedule its retransmission? At what time does A begin transmission? (Note, the nodes must wait for an idle channel after returning to Step 2-- see protocol.) At what time does A's signal reach B? Does B refrain from transmitting at its scheduled time?

Time Event
0 A and B begin transmission
225 A and B detect collision
273 A and B finish transmitting jam signal
273+225=498 B 's last bit arrives at A ;A detects an idle channel
498+96=594 A starts transmitting
273+512=785 B returns to Step2
B must sense idle channel for 96 bit times before it transmits
785+96=881 B starts transmitting
594+225=819 A’s transmission reaches B
Because A 's retransmission reaches B before B 's scheduled retransmission time, B refrains from transmitting while A retransmits. Thus A and B do not collide. Thus the factor 512 appearing in the exponential backoff algorithm is sufficiently large.

20. Consider a 100Mbps 100-BT Ethernet. In order to have an efficiency of .50, what should be the maximum distance between a node and the hub? Assume a frame length of 64 bytes and that there are no repeaters. Does this maximum distance also ensure that a transmitting node A will be able to detect whether any other node transmitted while A was transmitting? Why or why not? How does your maximum distance compare to the actual 100 Mbps standard?
Ans>>We want 1/(1+ 5a) = .5 or, equivalently, prop trans a = .2 = t / t . t = d /(1.8 ×108 ) prop m/sec and = (576 trans t bits ) /(108 bits/sec ) = 5.76μ sec. Solving for d we obtain d = 265 meters. For the 100 Mbps Ethernet standard, the maximum distance between two hosts is 200 m.
For transmitting station A to detect whether any other station transmitted during A 's interval, trans t must be greater than 2 = 2 ⋅ 265 prop t m/1.8 ×108 m/sec = 2.94μ sec. Because 2.94 < 5.76 , A will detect B 's signal before the end of its transmission. 21. Suppose two nodes, A and B, are attached to opposite ends of a 900 m cable, and that they each have one frame of 1000 bits (including all headers and preambles) to send to each other. Both nodes attempt to transmit at time t=0. Suppose there are four repeaters between A and B, each inserting a 20 bit delay. Assume the transmission rate is 10 Mbps, and CSMA/CD with backoff intervals of multiples of 512 bits is used. After the first collision, A draws K=0 and B draws K=1 in the exponential backoff protocol. Ignore the jam signal.
a. What is the one-way propagation delay (including repeater delays) between A and B in seconds. Assume that the signal propagation speed is 2 * 108m/sec.
b. At what time (in seconds) is A's packet completely delivered at B.
c. Now suppose that only A has a packet to send and that the repeaters are replaced with bridges. Suppose that each bridge has a 20 bit processing delay in addition to a store-and-forward delay. At what time in seconds is A's packet delivered at B?

ANS>> a)
= (4.5 10-6+8 10-6)
=12.5µsec
b) frame transmission time is (1000bits/10*106bps)=100 μsec
At time t = 0 , both A and B transmit.
At time t = 12.5μ sec , A detects a collision.
At time t = 25μ sec last bit of B 's aborted transmission arrives at A .
At time t = 37.5μ sec first bit of A 's retransmission arrives at B .
At time t= 37.5 μsec + 100 μsec =137.5 μsecA 's packet is completely delivered at B .
c) 12.5μ sec+ 5⋅100μ sec = 512.5μ sec

1 comment:

Open Researcher and Contributor ID (ORCID)

Search Aptipedia