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 1, 2 and 3.  b.)B2 will forward this packet on ports 1, 3, and 4. B1 will forward it on 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.
     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 (switch with the lowest address). Grow tree as shortest distances from the root (using 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 error rate is very low and recovery is left to higher layers,  appropriate for real-time traffic, such as voice)
  Acknowledged connectionless service (no logical connections used, each frame sent is individually acknowledged, sender knows whether a frame has arrived correctly or been lost, useful over unreliable channels such as WIFI)
  Acknowledged connection oriented ( 3 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 are done. connection is released, freeing up the variables, buffers.)
19. Following character encoding is used in a data link protocol: A: 01000111 B: 11100011 FLAG: 01111110 ESC: 11100000. Show the bit sequence trans…. 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… text is used: 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.
  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 sch… 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 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 previous result. Take 1s complement of the checksum.
23. In the Stop-and-Wait protocol with window =1, consider a 50kbps satellite channel with a 500-msec round-trip propagation delay. a)How long the sender was blocked for and (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 (6MHz) log 2 (4) = 24 million times/sec. total data rate will be of 24 Mbps.
25.If a binary signal is sent over a 3-kHz channel whose signal-noise ratio is 20 dB, what is the maximum achievable data rate?
10 log 10 (S/N)=20 , so log10 (S/N) = 2,  S/N = 10^2 = 100.  Max. data rate =(3000 Hz) log 2 (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. not affected by power surges, electromagnetic interference, power failures does not leak light and is quite difficult to tap, it is thin and lightweight. downside is 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…
4 different distinct symbols, each symbol indicate 2 bits. 1200 x 2 = 2,400bps.
28. Three packet-switching networks each contain n nodes.star,ring and interc.
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.