Understanding Packet Transmission in Extended LANs and Protocols
15. Consider the extended LAN connected using bridges B1 and B2 in the given figure. (a) A sends a packet to C. (b) E sends a packet to F. (c) F sends a packet to E. (d) G sends a packet to E. (e) D sends a packet to A. (f) B sends a packet to F.
a.) B1 will forward this packet on ports 2, 3, and 4. B2 will forward it on ports 1, 2, and 3. b.) B2 will forward this packet on ports 1, 3, and 4. B1 will forward it on ports 1, 2, and 3. c.) B2 will not forward this packet on any of its ports, and B1 will not see it. d.) B2 will forward this packet on port 2. B1 will not see it. e.) B2 will forward this packet on port 4, and B1 will forward it on port 1. f.) B1 will forward this packet on ports 1, 3, and 4. B2 will forward it on port 2.
16. To make VLANs work, configuration tables are needed in the bridges. What if the VLANs of the given figure use hubs rather than switches? Do the hubs work?
No. Hubs just connect all the incoming lines together electrically. There is nothing to configure. No routing is done in a hub. Every frame coming into the hub goes out on all the other lines.
17. Briefly describe the steps of the spanning-tree algorithm to compute the switch network.
Elect a root node of the tree (the switch with the lowest address). Grow the tree as shortest distances from the root (using the lowest address to break distance ties). Turn off ports for forwarding if they aren’t on the spanning tree.
18. Describe the three possible categories of services provided by the data link layer.
- Unacknowledged connectionless service: Appropriate when the error rate is very low and recovery is left to higher layers; suitable for real-time traffic, such as voice.
- Acknowledged connectionless service: No logical connections used; each frame sent is individually acknowledged. The sender knows whether a frame has arrived correctly or has been lost; useful over unreliable channels such as Wi-Fi.
- Acknowledged connection-oriented: Involves three phases: connection is established by having both sides initialize variables and counters needed to keep track of which frames have been received and which ones have not; transmission of one or more frames is done; connection is released, freeing up the variables and buffers.
19. The following character encoding is used in a data link protocol: A: 01000111, B: 11100011, FLAG: 01111110, ESC: 11100000. Show the bit sequence transmission. a.) Byte count. b.) Flag bytes with byte stuffing.
a.) 00000101 01000111 11100011 11100000 01111110
b.) 01111110 01000111 11100011 11100000 11100000 11100000 01111110 01111110
20. a.) The following data fragment occurs in the middle of a data stream: A B ESC C ESC FLAG FLAG D. Output stuff? b.) What is the maximum overhead in byte stuffing? c.) A bit string, 0111101111101111110, needs to be transmitted at the data link layer. What is the string?
a.) A B ESC ESC C ESC ESC ESC FLAG ESC FLAG D
b.) The maximum overhead occurs when the payload consists of only ESC and FLAG bytes. In this case, there will be 100% overhead.
c.) After five 1s in the data, a 0 is added; therefore, the output is 011110111110011111010.
21. To provide more reliability than a single parity bit can give, an error-detecting coding scheme is used. What is the Hamming distance of this code?
Making one change to any valid character cannot generate another valid character due to the nature of parity bits. Making two changes to even bits or two changes to odd bits will give another valid character, so the distance is 2.
22. Write down the steps to compute the Internet checksum to be sent.
Arrange the 1500 bytes of data as rows of 16-bit words of stack. In the last row, the checksum is added with all 16 ‘0’ bits. Add the rows. Carryover (if any) is added to the previous result. Take the 1’s complement of the checksum.
23. In the Stop-and-Wait protocol with window = 1, consider a 50 kbps satellite channel with a 500 msec round-trip propagation delay. a.) How long was the sender blocked for? b.) Compute the bandwidth efficiency.
a.) The sender was blocked for 500 msec out of 520 msec, that is, the sender was blocked for 96.15% of the time. b.) Bandwidth efficiency is therefore only about (100 – 96.1)% or 3.85%.
24. Television channels are 6 MHz wide. How many bits/sec can be sent if four-level digital signals are used?
Using the Nyquist theorem, we can sample = 2 (6 MHz) log2 (4) = 24 million times/sec. The total data rate will be 24 Mbps.
25. If a binary signal is sent over a 3 kHz channel whose signal-to-noise ratio is 20 dB, what is the maximum achievable data rate?
10 log10 (S/N) = 20, so log10 (S/N) = 2, S/N = 102 = 100. Max. data rate = (3000 Hz) log2 (101) bits/sec = (3000) (6.643) bits/sec = 19.92 kbps.
26. What are the advantages of fiber optics over copper as a transmission medium?
Fiber can handle much higher bandwidth than copper. It is not affected by power surges, electromagnetic interference, or power failures. It does not leak light and is quite difficult to tap. It is thin and lightweight. The downside is that it can be damaged easily by being bent too much.
27. A modem constellation diagram has data points at the following coordinates: (1, 1), (1, -1), (-1, 1), and (-1, -1). How many bps can be achieved?
There are 4 different distinct symbols, each symbol indicates 2 bits. Therefore, 1200 x 2 = 2400 bps.
28. Three packet-switching networks each contain n nodes: star, ring, and interconnect.
Star: best case = 2, average case = 2, worst case = 2. Ring: best case = 1, average case = n/4, worst case = n/2. Interconnect: best case = 1, average case = 1, worst case = 1.
29. A CDMA receiver gets the following chips: (-1 +1 -3 +1 -1 -3 +1 +1).
(-1 +1 -3 +1 -1 -3 +1 +1) * (-1 -1 -1 +1 +1 -1 +1 +1) / 8 = 1
(-1 +1 -3 +1 -1 -3 +1 +1) * (-1 -1 +1 -1 +1 +1 +1 -1) / 8 = -1
(-1 +1 -3 +1 -1 -3 +1 +1) * (-1 +1 -1 +1 +1 +1 -1 -1) / 8 = 0
(-1 +1 -3 +1 -1 -3 +1 +1) * (-1 +1 -1 -1 -1 -1 +1 -1) / 8 = 1.
We see A, B, and D sent a 1 bit, a 0 bit, and a 1 bit respectively, and C was silent.
