Tuesday, January 26, 2010

MAC / MAC rules and collision detection/backoff

MAC
6.2.1 This page will define MAC and provide examples of deterministic and non-deterministic MAC protocols.


MAC refers to protocols that determine which computer in a shared-media environment, or collision domain, is allowed to transmit data. MAC and LLC comprise the IEEE version of the OSI Layer 2. MAC and LLC are sublayers of Layer 2. The two broad categories of MAC are deterministic and non-deterministic.

Examples of deterministic protocols include Token Ring and FDDI. In a Token Ring network, hosts are arranged in a ring and a special data token travels around the ring to each host in sequence. When a host wants to transmit, it seizes the token, transmits the data for a limited time, and then forwards the token to the next host in the ring. Token Ring is a collisionless environment since only one host can transmit at a time.

Non-deterministic MAC protocols use a first-come, first-served approach. CSMA/CD is a simple system. The NIC listens for the absence of a signal on the media and begins to transmit. If two nodes transmit at the same time a collision occurs and none of the nodes are able to transmit.

Three common Layer 2 technologies are Token Ring, FDDI, and Ethernet. All three specify Layer 2 issues, LLC, naming, framing, and MAC, as well as Layer 1 signaling components and media issues. The specific technologies for each are as follows:

• Ethernet – uses a logical bus topology to control information flow on a linear bus and a physical star or extended star topology for the cables
• Token Ring – uses a logical ring topology to control information flow and a physical star topology
• FDDI – uses a logical ring topology to control information flow and a physical dual-ring topology

The next page explains how collisions are avoided in an Ethernet network.

MAC rules and collision detection/backoff
6.2.2 This page describes collision detection and avoidance in a CSMA/CD network.


Ethernet is a shared-media broadcast technology. The access method CSMA/CD used in Ethernet performs three functions:

• Transmitting and receiving data packets

• Decoding data packets and checking them for valid addresses before passing them to the upper layers of the OSI model

• Detecting errors within data packets or on the network

In the CSMA/CD access method, networking devices with data to transmit work in a listen-before-transmit mode. This means when a node wants to send data, it must first check to see whether the networking media is busy. If the node determines the network is busy, the node will wait a random amount of time before retrying. If the node determines the networking media is not busy, the node will begin transmitting and listening. The node listens to ensure no other stations are transmitting at the same time. After completing data transmission the device will return to listening mode.

Networking devices detect a collision has occurred when the amplitude of the signal on the networking media increases. When a collision occurs, each node that is transmitting will continue to transmit for a short time to ensure that all nodes detect the collision. When all nodes have detected the collision, the backoff algorithm is invoked and transmission stops. The nodes stop transmitting for a random period of time, determined by the backoff algorithm. When the delay periods expire, each node can attempt to access the networking media. The devices that were involved in the collision do not have transmission priority.

The Interactive Media Activity shows the procedure for collision detection in an Ethernet network.

The next page will discuss Ethernet timing.

No comments:

Post a Comment