Introduction to Data Communications (ITS 323)

Homework

You are expected to study the course content before and after lectures. Many students study only 1 day (or 1 hour!) before an upcoming assessment item, i.e. quiz or exam. To encourage more study through the semester, each week a set of homework tasks will be assigned. You should try to complete all tasks before the first lecture of the following week.

The homework tasks will not be marked; you do not submit your homework. However some quiz/exam questions may be based on homework tasks. Completing the homework tasks will make it easier to follow the lectures and obtain high marks in the graded assessment items. Where relevant, answers to homework tasks will be given in class and/or on the course website.

Week 14

  1. Read the summary on IP addresses.
  2. Complete the IP addressing practice questions from last year (note that we have not covered classful addresses, so you don't need to attempt section 1.1). Answers

Week 13

  1. Find the IP address of your computer.

    Answer: ifconfig, ipconfig and similar command-line programs, as well as graphical network managers will show your IP address.

  2. Find the public IP address of your home Internet (ADSL) connection.

    Answer: If your ADSL modem/router at home has a web interface (usually accessible via an address such as 192.168.0.1), then most likely it lists on a status page the WAN or public IP address. That is the IP address that people on the Internet see your address to be. Then the ADSL modem/router performs Network Address Translation to send to your computers real IP address.

  3. Convert the following IP addresses between binary and dotted-decimal-notation:
    1. 11000000101010000000000000000001- 192.168.0.1
    2. 00010001001010110001010000001000- 17.43.20.8
    3. 255.255.252.0- 11111111111111111111110000000000
    4. 125.30.14.8- 01111101000111100000111000001000

Week 12

  1. Find the IEEE MAC address(es) of your laptop (and/or home PC, phone, tablet).

    Answer: you can use graphical network managers provided by your operating system as well as the command line (ifconfig, ipconfig, ip) to find your MAC address. In some cases you will find it printed on a sticker on your device.

  2. Use the MAC address to find the manufacturer of the LAN card.

    Answer: your MAC address above can be looked up via this IEEE website.

  3. Compare a star, ring, bus and full mesh topology for a LAN with 20 stations. What are the equipment requirements for each topology (e.g. number of cables, LAN cards, extra devices)? What are the advantages of each topology?

    Answer: (by LAN cards lets assume sockets to plug cables into; in practice a single LAN card may have multiple sockets)

Week 11

  1. Consider the example network of 6 nodes used in the lecture notes on routing. Complete the routing table for N3.

    Answer: The routing table (directory) for node 6 is given on Slide 15 of the lecture notes.

  2. The example network in the lecture notes gives the cost of using each link. Assume that is the cost of sending a single packet (of any size) across the link. What is the cost of sending a data packet from N6 to N1 if least-costing routing is being used and the routing tables have already been established?

    Answer: The least-cost path from N6 to N1 is N6-N5-N4-N2-N1. Sending a packet from N6 to N5 incurs a cost of 4. From N5 to N4 incurs a cost of 1. And so on for all links in the path gives a total cost of 10 units.

  3. Assume now that the routing tables have not yet been established. First, each node must learn about the network status. One approach is that each node floods a special link state packet through the network: the packet contains information about the status of its links. What is the cost of N6 sending its link status packet using flooding? Assume a hop limit of 4 and that sequence nuumbers are used.

    Answer: With flooding N6 sends copies to each of its neighbours: N5 and N3. Sending to N5 incurs a cost of 4, while sending to N3 incurs a cost of 8. Total cost so far is 12. Now nodes N3 and N5 send to their neighbours (except back to N6). The two packets N5 transmit incurs a cost of 2, while N3's packets incur a cost of 18. This assumes N3 sends to N5 at the same time as N5 sends to N3. Total cost so far is 32. Even though N3 and N5 receive packets again, because sequence numbers are used they will detect they are duplicates and will not re-send. Only nodes N1, N2 and N4 transmit. N1 sends to N2 and N4 (total cost 3); N2 sends to N1 and N4 (total cost 5); N4 sends to N2 and N1 (total cost 9). Now all nodes have received a copy of the original packet and will not re-send any more. Total cost of all transmissions is 49 units.

Week 10

  1. What is the difference between circuit-switching and packet-switching?

    Answer: Circuit-switching involves sending data as signals across an established physical circuit (or path); the data is not processed by the switches, but instead the signals pass through the switch. Packet-switching involves sending data as fixed sized packets; the packets are processed at the switches to determine what output link they need to be sent on.

  2. What is the advantage(s) of virtual circuit packet switching over datagram packet switching?

    Answer: Once a circuit is established virtual-circuit packet-switching sends all packets belonging to the original data on the same path. As a result packets will receive approximately the same performance, especially delay. Whereas with datagram packet switching, packets belonging to the same original data may take different paths, resulting in varying delays. In addition, in virtual-circuit packet-switcing resources can be prepared when the circuit is established, allowing the data to receive priority treatment. For example, when establishing a virtual-circuit for a video call, the packet switches can allocate buffer spaces and apply queuing disciplines for subsequent packets belonging to the virtual-circuit. That is, give the video call packets priority over other packets.

  3. Consider circuit switching being used on a path A--B--C--D--E. A is the source station with 125,000B of data to send to the destination station E. Links A--B and D--E have a propagation delay of 100us. Other links have propagation delay of 1ms. Both the call request and call accept signals have a transmission time of 1ms. A requests a 1Mb/s circuit. Although there is processing at each node, the delay is so small you can ignore it in calculations. What is the total delay to transfer the data to E (including circuit establishment)?

    Answer: 1011.6ms (different assumptions may lead to slightly different answer). See my notes.

  4. Consider same scenario as above but datagram packet switching is used. All links have a 1Mb/s data rate. Packets contain a maximum of 1000B of data and include a 20B header. What is the total delay to transfer the data to E?

    Answer: 1046.68ms. See my notes.

Week 9

  1. Study for upcoming quiz by trying past quizzes.

Week 8

  1. Consider stop-and-wait flow control being used at the data link layer. At computer A, the network layer delivers data of 990 bits to the data link layer at time 0us. Another 990 bits is delivered at time 1150us, and another 990 bits at time 2500us. (That is, a total of 3 x 990 = 2,970bits of data). Computer A can send a DATA frame with a maximum of 990b of data plus 10b of header, creating a 1000b DATA frame. ACK frames contain just 10b. Link data rate is 1Mb/s and propagation delay is 100us. Computer B, the destination, has buffer space of 1,980b, which is initially empty. The network layer at computer B reads (removes) 990bits from the buffer at time 3000us, and then again at time 5000us and again at time 6000us. Draw a diagram illustrating the exchange of frames. At what time does A receive the last ACK? How much space is available in the buffer at B at time 4000us?

    Answer: see my notes

  2. A link is using stop-and-wait flow control. Assume that processing delays, frame headers and ACKs are very small. Write an equation for the maximum possible throughput of stop-and-wait if the source has an unlimited supply of data to send. Define your variables.

    Answer: Let DATA be the data size, RATE be the data rate, and PROP be the link propagation delay. For every data frame sent, the source must wait for the frame to propagate and then the ACK to propagate back. The throughput is therefore:
    THROUGHPUT = DATA / (DATA/RATE + 2*PROP)

  3. Repeat question 2 but assuming sliding-window flow control with a maximum window size of W.

    Answer: now there are two cases. If the first ACK arrives back before the first W frames are transmitted then the source will be transmitting all the time. Hence the efficiency is 100% and THROUGHPUT = RATE. However if the first ACK arrives after the first W frames are transmitted than the source spends some time waiting. Similar to stop and wait (but now with W frames) the throughput is:
    THROUGHPUT = W*DATA / (DATA/RATE + 2*PROP)

Week 7

  1. Study for the Midterm Exam

Week 6

  1. I covered PCM in the lectures. For a more detailed (and better drawn) graphical example of PCM, and the impact of sampling rate on quality, see the extra PCM handout, which is also in your printed handouts.
  2. If 32-bit, 20kHz PCM is used to encoded a single-channel 5 minute song, how long will it take to send this song to your friend's computer if the computers are linked via 100Mb/s Ethernet?

    Answer: File size is 192Mbits, hence takes 1.92 seconds to transfer (assuming no overheads).

  3. Answer questions 1 and 2 from Quiz 3a from 2009.
  4. Read about Delta Modulation in the lecture notes and answers questions 4(c) and 4(d) from last years exam.

Week 5

  1. Look at the US Frequency Allocation Chart. It shows in detail what applications different portions of the spectrum are allocated to. You can also try the Thai NTC, which has similar information under the Frequency Management tab.
  2. Assume you have two Cisco Airnet 1400 Series wireless bridges (model AIR-BR1410A-A-K9). You are using the supplied linear polarization antennas to create a 54Mb/s wireless link between the two devices. Show that the maximum theoretical distance between the two devices (in free space) is about 37km.

    Answer: Pt = 250mW = 24dBm; Pr = -70dBm = 10^(-7)mW; Gt = Gr = 22.5dBi = 10^2.25; f = 5.725GHz; using free space loss equation d = 37190m

  3. You are designing your new 3 floor house. In the design you are planning for the future: big family; telecommuting instead of travelling to work; high-end audio and entertainment in different rooms; all network based devices (e.g. TVs, appliances, washing machines). What transmission medium/media will you use? Think about the advantages and disadvantages of different options.

    Answer: There is no one correct answer. A possible solution is to use a mix of wired and wireless media inside the house. For example, ensure Category 6 twisted pair cabling is included to almost all rooms of the house (e.g. through the walls, ceilings), with sockets in convenient locations in each room (e.g. where it is likely to place a TV, phone or computer). Some of the sockets may be near the ceiling, and then wireless LAN access points can be connected, providing wireless coverage as well. Although an "all-wireless" solution is possible, using twisted pair cabling is important to provide reliable, high data rate (1Gb/s, full-duplex) connections needed for streaming high-definition content between multiple devices at the same time with possible interference (e.g from your neighbours wireless LAN).

Week 4

  1. A typical transmit power of a wireless LAN card is 30mW. Express the power in dBm and dBW.

    Answer: 30mW = 14.77dBm = -15.22dBW

  2. A wireless LAN card received a signal from another wireless LAN device with received signal strength of -85dBm. How much power was lost between transmitter and receiver?

    Answer: assuming transmit power of 14.77dBm as above, loss is 14.77-(-85)=99.77dB

  3. Answer question 1 of Quiz 2a from 2009. You may also try other questions from 2010 and 2009 (we covered some questions from Q2 in 2010 in the class).

Week 3

  1. Review the answers for Quiz 1. Make sure you know where you went wrong.
  2. Read the handout Definitions and Acronyms (also in your printed handout). The summary of units and prefixes is very important for the course: you must always used the correct units in your work. The notes on logarithms and decibels will be useful for following lectures in Weeks 4 and 5.
  3. Consider the signal, s1(t):
    s1(t) = 100*sin(6*105 * pi * t) + 33*sin(1.8*106 * pi * t) + 20*sin(3*106 * pi * t) + 14*sin(4.2*106 * pi * t)
    (where '*' is multiplication and 'pi' is the value 3.14...).
    1. Draw a plot of the signal in the frequency domain.
    2. What is the frequency of s1(t)?

      Answer: 300kHz

    3. What is the absolute bandwidth of s1(t)?

      Answer: 1.8MHz

    4. What data rate can be achieved using s1(t)?

      Answer: 600kb/s

    5. If another signal, s2(t), was used that had 5 instead of 4 sinusoid components, but occupied the same bandwidth as s1(t), then what data rate can be achieved with s2(t)? What is an advantage of s2(t)?

      Answer: The fundamental frequency would be 225kHz giving a data rate of 450kb/s. Although less than s1, the signal s2 has the advantage of being more accurate - less chance of errors.

Week 2

  1. Try commands ifconfig (ipconfig in Windows), arp, nslookup and netstat on your computer. Find the different types of addresses, especially the hardware and IP address(es) or your own computer.
  2. Consider a network with three computers: A has a 1.25Mb/s, 3km link to B; B has a 500kb/s, 12km link to C. Each computer takes 10us to process a single packet.
    1. How long does it take to send a single 125B packet from A to C?

      Answer: 3.68ms

    2. If computer A had a file (e.g. 1MB) transfer to C, then what problems may occur?

      Answer: Packets may be queued at computer B, since A would send too fast for B to send on to C.

  3. Computer A has a direct 10Mb/s wireless link to computer B. The data link layer protocol allows frames with no greater than 1000B of data from the network layer (anything greater must be sent in multiple frames). The data link layer protocol adds a 20B header to the data from the network layer, while the physical layer protocol adds 10 bits before transmitting.
    1. Assuming the data link layer protocol can send one frame immediately after the previous, what is the throughput as seen by the network layer if 4500Bytes of data are to transmitted?

      Answer: 9.782Mb/s

    2. Now consider that the data link layer protocol must wait 150us between finishing sending one packet and starting the next. What is the throughput?

      Answer: 8.411Mb/s

Week 1

  1. Read through the course website. You should be able to find and download last years exams, access the textbooks website and understand the different assessment items.
  2. Subscribe to the course mail list. If you have not subscribed by the time of the first quiz, you may be penalised.
  3. Browse the NECTEC Internet usage website; try to find the connectivity from your home ISP to other ISPs on the network maps.