Friday, November 23, 2012

Gain the Knowledge about LAN and MAC Protocal

    The Internet is such a big idea that represents the network over the world. However, we can separate it into much smaller groups -- Local Area Network (LAN). The Internet just works as a combination of these small LANs.


    To realize the information communication in networks, we need not only the server who provides the information and the client who receives the information, but also the medium which is used to transmit the information as well as control the transmition procedure.



    For these few weeks, I have learned something about the working principles of Local Area Network (LAN) and Medium Access Control (MAC) Protocols.




    In a network, what our concern much is the throughput of the data transmission. To understand the concepts more clearly, we study an example -- ALOHA. ALOHA originated from University of Hawaii with campuses on different islands.






    The MAC protocol of Pure ALOHA is as below:

  • Transmit whenever there is a packet to send
  • If there are collisions (Aloha does not detect collisions directly), retransmission will be triggered after a time-out period. Retransmission time must be random. 
     A frame can be transmitted successfully only when there is no other frame transmitted on the way of its transmission, which means there is no collision. However, under this ALOHA MAC protocol, the vulnerable period is twice as the frame's duration time. Then the throughput of the system is



    In order to raise the throughput of the system, Slotted ALOHA was applied. Time is divided into slots and every frame can be transmitted only at the beginning of a timeslot.

    Thus, vulnerable period decreases to be the same as the frame's duration time and the throughput increased to be



    I also learned about other Random Access Protocol of transmitting data in the network, such as Carrier Sense Multiple Access (CSMA).
   For CSMA, there are 3 typical modes -- non-Persistence, 1-Persistence and p-Persistence. p-Persistence has the highest efficiency and its algorithm is as below:

  1. Sense the channel. If idle, transmit with probability p and go to Step 3; wait for tprop with probability (1-p) before repeating Step 1.
  2. Step 2: If channel is busy, continue to listen until channel is idle, then go to Step 1.
  3. If collision, wait a random amount of time (i.e., back-off), then go to Step 1 to retransmit the same packet.
    In addition, to improve the throughput, Collision Detection and Collision Avoidance can be used for Ethernet network and Wireless network respectively.

    Now, we can compare the throughput of these random access schemes:

    There are many other knowledge I have gained these few weeks, such as how the polling systems works, what's the differences between bridge, hub and switch, how to resolve the hidden-station problem and so on. Computer network is such an interesting course, and although I will finish this course soon, I hope to learn more about it!

Saturday, November 3, 2012

Understand Data Transmission


      There are so many people using Internet in the world, and a large amount of information is produced every second. Thus, transmitting the data containing the information is a significant task for the network. These few weeks, I have learned about the how to transmit the data correctly in the classes of the course Computer Network.  


      Automatic repeat-request (ARQ) is one of the protocols that correct the errors in Data Link Layer in OSI model. It plays an important role in data transmission. There are many kinds of ARQ, such as Stop-and-Wait ARQ, Go-Back-N ARQ and Selective-Repeat ARQ.
Fig.1 Stop-and-Wait ARQ

      For Stop-and-Wait ARQ, the sender will not send the next frame until it receives the Acknowledge (ACK) of the frame just sent. 




Fig.2 Go-Back-N ARQ

 
      For Go-Back-N ARQ, the sender will keep on sending the frame unless it finds that the ACK of the Nth frame before the current frame has not been received, then it will go back to that frame to retransmit from it. 

Fig.3 Selective-Repeat ARQ



      For Selective-Repeat ARQ, the sender performs similarly to Go-Back-N ARQ except that when it receives an ACK that is not wanted currently, it will only retransmit the frame related to the wanted ACK and then go on transmitting. 







 
     Besides ARQ, Flow Control acts importantly, as the sender, the network and the receiver do not perform of the same speed, if there is no Flow Control the data easily get lost, which can result in serious problems.


Fig.4 On-Off Flow Control

      For On-Off Flow Control, the receiver will send an Off to tell the sender to stop sending data when it finds that its buffer is going to be filled up. After the data in the receiver's buffer have been transmitted to the upper layer, and the buffer is available again, the receiver will send an On to tell the sender to send the following data.

Fig.5 Sliding Window Flow Control


 
      For Sliding Window Flow Control, receiver sends an ACK only after the corresponding frame has been removed from the receiver buffer, and thus the sender will not send too many data once.



 
      There is much other knowledge about how the data could be transmitted correctly, such as Bit Buffing, Timing Recovery, Packet Multiplexing, etc. It's really good to know about these, as they have raised my more interest to learn Computer Network!