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!

Monday, October 15, 2012

A Deeper Touch – OSI Seven-Layer Model and Protocols

        After a brief and conceptual introduction of computer network, the teacher gave us more detailed knowledge of it in recent weeks.
        There are many things that I newly learn, but OSI Seven-Layer Model and Protocols impressed me most, not only because they are significant basis in computer network but also for they confused me a lot when I was firstly exposed to them.


 
        In order to make the communication process through network clearer, the layer models are brought out. There are 7 layers in the layer models – Application, Presentation, Session, Transport, Network, Data Link and Physical. Each of them has particular function during the communication, and it is shown as below,

        I easily confuse them with each other. For example, I sometimes might mistake Data Link layer as Network layer at the beginning for they have some similar function (such as both adding a header to the transmitted data). However, after several lessons, I have almost understood them and can distinguish them by now.


 
        Protocols are rules that govern the communications. There are many protocols, such as, HTTP, TCP, UDP, IP, etc. I was suddenly enlightened after that lesson when the teacher talked about the protocols.

        In the past, I was puzzled why each address of the webpage has “http:” in the front of it. But I haven known now that it represents the Hyper Text Transport Protocol (HTTP). I also got some knowledge of other protocols. For instance, TCP is connection oriented and error free while UDP is connectionless and only tries its best while transmitting data (which means not error free).


 
        Computer network is complicated and abstract, but if I go deeper into it, I can find more interesting things. In fact, I am still feeling confused about many of the protocols, and I hope I could make them completely clear after the following few weeks!

Sunday, September 23, 2012

The First Touch of Computer Network

       I’m using the Internet everyday, however, I never knew about how the Internet works until I entered the course – IERG3310 Computer Networks.
Fig.1 Computer Networks




        After the first lesson of this course, in fact, many of my past ideas of computer networks have been overthrown.

        In the past, I thought that when we are surfing on the Internet, our computers are sending some orders to the Internet and then the Internet will send back the information that we need.
        But the teacher told us that there will be many other procedures before we can get the information. For example, “Three-Way Handshake” is needed before our computer could connect to Yahoo when we want to get some information from Yahoo.
Fig.2 Three-Way Handshake



        There is a series of numbers representing the IP address of our computer, which confused me a lot every time I saw it in the past. I didn’t know what each group of numbers represents and how important they are. They were just massy code for me.
        But after the class, I learned something about the IP address. Although I still don’t know what each group of numbers represents, I have known that without IP addresses, we could not communicate with others on the Internet.
        As there are so many Internet clients in the world nowadays, we can’t assign everyone an IP address. Thus, when we use the Internet, our computer will be assigned an IP address, which are usually different every time but will never be the same as the one of the other computer at the same moment.
Fig.3 Different IP Addresses



        This is the first time that I am exposed to Computer Net work and I have just got some simple concept of it and thus, I am still confuse by many things. But the course is interesting, and I have already been attracted by it, and I hope that I could solve the problems soon!