CLICK HERE FOR THOUSANDS OF FREE BLOGGER TEMPLATES »

Wednesday, November 21, 2007

Multiple Access Protocols


Multiple Access Protocols



The problem with multiple (shared) medium access is that only one node can transmit at one time.If a node is in the middle of a transmission and another node starts to transmit a collision occurs.When a collision occurs the transmissions of the nodes that caused it is failed and must be re-attempted.


The main difference between CSMA/CD and CSMA/CA is the "speaking" policy held by all the communicating parties:" Quit speaking if another speaks" for CD and "listen before talk" for CA.


CSMA based protocols are adopted into all 802.3 and 802.11 networks as they proved to be the best way to manage many nodes trying to access the same medium minimizing or trying to avoid the number of collisions.



CSMA/CD - Ethernet 802.3 (wired) networks


Carrier Sensing Multiple Access / Collision Detection, this is the full acronym of the well-known medium accessprotocol that made Ethernet based LAN'S so spread and efficient.


Collision detection means that a NIC must be able to transmit and sense the medium at the same time.This is possible because NIC's usually measures the voltage on the medium before and during the transmission to detect potential collisions.Collisions occur when more than one NIC transfer a frame in the same collision domain (a hubbed lan inour semplified but real-world example) using the same shared medium.



What happens when a collision is detected?


When a node detects the collision, it immediately quits transmitting because all the data already trasnmitted is considered garbage and further data transmission would be a waste of time and resource.The second step is to send a Jam signal made of 48 bits of disturb. After the jam signal all the nodes realize that a collision has occurred and start their exponential backoff time, probably the most genius part of this algorithm.The exponential backoff time is the time a node must wait before re-attempting the transmission of the same frame.




The Jam (disturb) signal


Jam signal is sent as soon as a collision is detected. This is of much importance above all when nodes areplaced far from each other. When propagation time is really little CSMA/CD has a rough rate of successful transmissions of 100%. In this scenario collisions are avoided simply using Carrier Sense.When nodes are far from each other and propagation time is not negligible, collisions can still occur, this is whyCS is not enough.


Into Ethernet networks a collision is not much of a problem because nodes are capable of detecting a collision andretransmit the same packet after a random time.Into Wireless communications, because of the nature of the medium ( the air ), detecting a collision is a difficult practicewhen possible so collisions are avoided instead of detected.



CSMA/CA - 802.11 Wireless LAN


CSMA/CA (Carrier Sense Multiple Access/Collision Avoidance) is a protocol for carrier transmission in 802.11 networks.

In CSMA/CA, as soon as a node receives a packet that is to be sent, it checks to be sure the channel is clear (no other node is transmitting at the time). If the channel is clear, then the packet is sent. If the channel is not clear, the node waits for a randomly chosen period of time, and then checks again to see if the channel is clear. This period of time is called the backoff factor, and is counted down by a backoff counter. If the channel is clear when the backoff counter reaches zero, the node transmits the packet. If the channel is not clear when the backoff counter reaches zero, the backoff factor is set again, and the process is repeated.


Collision Detection cannot be used for wireless environments for 3 main reasons:



  • Wireless communications are in half-duplex. If we had an antenna to listen and another to transmit we should be able to detect a collision while we transmit. This time the medium is the air and the power of the transmitting antenna willconfuse the receiving one thus making detection almost impossible.


  • Detecting the transmission of a hidden station is impossible.


  • Signal attenuation

Instead of detecting a collision, by waiting for a random time before re-transmitting CSMA/CA (tries to) avoid collisions.


Collision Avoidance


The main difference between CSMA/CD and CSMA/CA protocol is that wireless stations don't transmit immediately but, even if the medium is detected as free, a random *counter* is generated before transmission.While CSMA/CD uses a time value as backoff, CSMA/CA uses a counter that is decremented everytime the medium is inactive (sensed free)Only when the counter reaches 0 the station will start its transmission.In any case before each frame transmission the station waits for the DIFS time.
If in an ethernet environment, 2 nodes choose the same backoff time a collision will occur and the probability that the 2 will choose the same backoff time again, after the first collision, decreases exponentially.In a wireless environment, instead, collisions must be avoided and if 2 stations willing to transfer a frame, listen another station in the middle of transfer, they must choose a random value for their counter instead of just re-transmitting when the medium is free.If they acted like in CSMA/CD, a collision would have occurred.


Unlike CSMA/CD (Carrier Sense Multiple Access/Collision Detect) which deals with transmissions after a collision has occurred, CSMA/CA acts to prevent collisions before they happen.



IP and MAC Address


IP Address - Internet Protocol Address


An IP address (Internet Protocol address) is a unique address that certain electronic devices currently use in order to identify and communicate with each other on a computer network utilizing the Internet Protocol standard (IP)—in simpler terms, a computer address.


The IP address acts as a locator for one IP device to find another and interact with it. It is not intended, however, to act as an identifier that always uniquely identifies a particular device. In current practice, an IP address is less likely to be an identifier, due to technologies such as Dynamic assignment and Network address translation.


Since networks vary in size, there are four different address formats or classes to consider when applying to NIC for a network number:




  • Class A addresses are for large networks with many devices.


  • Class B addresses are for medium-sized networks.


  • Class C addresses are for small networks (fewer than 256 devices).


  • Class D addresses are multicast addresses.

MAC Address - Medium Access Control Address


In a local area network (LAN) or other network, the MAC (Media Access Control) address is your computer's unique hardware number. (On an Ethernet LAN, it's the same as your Ethernet address.) When you're connected to the Internet from your computer (or host as the Internet protocol thinks of it), a correspondence table relates your IP address to your computer's physical (MAC) address on the LAN.
The MAC address is used by the Media Access Control sublayer of the Data-Link Layer (
DLC) of telecommunication protocols. There is a different MAC sublayer for each physical device type. The other sublayer level in the DLC layer is the Logical Link Control sublayer.




Client - Server


The most basic type of client-server architecture employs only two types of nodes: clients and servers. This type of architecture is sometimes referred to as two-tier. It allows devices to share files and resources.



Client


Client is the requesting program or user in a client/server relationship. For example, the user of a Web browser is effectively making client requests for pages from servers all over the Web. The browser itself is a client in its relationship with the computer that is getting and returning the requested HTML file. The computer handling the request and sending back the HTML file is a server.


Characteristics of a client:



  • Request sender is known as client

  • Initiates requests

  • Waits for and receives replies.

  • Usually connects to a small number of servers at one time

  • Typically interacts directly with end-users using a graphical user interface


Server


In the client/server programming model, a server is a program that awaits and fulfills requests from client programs in the same or other computers. A given application in a computer may function as a client with requests for services from other programs and also as a server of requests from other programs.


Characteristics of a server



  • Receiver of request which is send by client is known as server

  • Passive (slave)

  • Waits for requests from clients

  • Upon receipt of requests, processes them and then serves replies

  • Usually accepts connections from a large number of clients

  • Typically does not interact directly with end-users

0 comments: