unit-iii computer network mac sub layer. mac sub layer prepared by - rohit koshta in the seven-layer...

35
UNIT-III Computer Network MAC Sub Layer

Upload: ralph-lawson

Post on 25-Dec-2015

225 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

UNIT- I I I

Computer NetworkMAC Sub Layer

Page 2: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

MAC Sub Layer

In the seven-layer OSI model of computer networking, media access control (MAC) data communication protocol is a sublayer of the data link layer (layer 2).

The MAC sublayer provides addressing and channel access control mechanisms that make it possible for several terminals or network nodes to communicate within a multiple access network that incorporates a shared medium, e.g. Ethernet.

The hardware that implements the MAC is referred to as a media access controller.

Page 3: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

MAC Sub Layer (contd)

The MAC sublayer acts as an interface between the logical link control (LLC) sublayer and the network's physical layer.

The MAC layer emulates a full-duplex logical communication channel in a multi-point network.

This channel may provide unicast, multicast or broadcast communication service.

Page 4: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

MAC Addressing

The MAC address is a unique value associated with a network adapter. MAC addresses are also known as hardware addresses or physical addresses. They uniquely identify an adapter on a LAN.

MAC addresses are 12-digit hexadecimal numbers (48 bits in length). By convention, MAC addresses are usually written in one of the following two formats:

MM:MM:MM:SS:SS:SS

MM-MM-MM-SS-SS-SS

Page 5: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

MAC Addressing (contd)

The first half of a MAC address contains the ID number of the adapter manufacturer.

The second half of a MAC address represents the serial number assigned to the adapter by the manufacturer.

In the example,00:A0:C9:14:C8:29

The prefix00A0C9

indicates the manufacturer is Intel Corporation.

Page 6: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

Binary Exponential Backoff

Binary Exponential Backoff refers to an algorithm used to space out repeated retransmissions of the same block of data, often as part of network congestion avoidance.

Examples are the retransmission of frames in carrier sense multiple access with collision avoidance (CSMA/CA) and carrier sense multiple access with collision detection (CSMA/CD) networks.

In Ethernet networks, the algorithm is commonly used to schedule retransmissions after collisions.

The retransmission is delayed by an amount of time derived from the slot time and the number of attempts to retransmit.

Page 7: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

ALOHA

ALOHA is a system for coordinating and arbitrating access to a shared communication Networks channel.

It was developed in the 1970s by Norman Abramson and his colleagues at the University of Hawaii. 

Aloha is a multiple access protocol at the datalink layer and proposes how multiple terminals access the medium without interference or collision.

There are two different versions / types of ALOHA: Pure ALOHA SlotteD ALOHA

Page 8: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

Pure ALOHA

In pure ALOHA, the stations transmit frames whenever they have data to send.

When two or more stations transmit simultaneously, there is collision and the frames are destroyed.

In pure ALOHA, whenever any station transmits a frame, it expects the acknowledgement from the receiver.

If acknowledgement is not received within specified time, the station assumes that the frame (or acknowledgement) has been destroyed.

If the frame is destroyed because of collision the station waits for a random amount of time and sends it again. This waiting time must be random otherwise same frames will collide again and again.

Therefore pure ALOHA dictates that when time-out period passes, each station must wait for a random amount of time before resending its frame. This randomness will help avoid more collisions.

Page 9: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

Pure ALOHA (contd)

Figure shows an example of frame collisions in pure ALOHA.

Page 10: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

Slotted ALOHA

Slotted ALOHA was invented to improve the efficiency of pure ALOHA as chances of collision in pure ALOHA are very high.

In slotted ALOHA, the time of the shared channel is divided into discrete intervals called slots.

The stations can send a frame only at the beginning of the slot and only one frame is sent in each slot.

In slotted ALOHA, if any station is not able to place the frame onto the channel at the beginning of the slot i.e. it misses the time slot then the station has to wait until the beginning of the next time slot.

In slotted ALOHA, there is still a possibility of collision if two stations try to send at the beginning of the same time slot as shown in fig.

Slotted ALOHA still has an edge over pure ALOHA as chances of collision are reduced to one-half.

Page 11: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

Slotted ALOHA (contd)

Page 12: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

CSMA

Carrier sense multiple access (CSMA) is a probabilistic media access control (MAC) protocol in which a node verifies the absence of other traffic before transmitting on a shared transmission medium, such as an electrical bus, or a band of the electromagnetic spectrum.

Carrier sense means that a transmitter uses feedback from a receiver to determine whether another transmission is in progress before initiating a transmission.

If a carrier is sensed, the station waits for the transmission in progress to finish before initiating its own transmission. In other words, CSMA is based on the principle "sense before transmit" or "listen before talk".

Multiple access means that multiple stations send and receive on the medium. Transmissions by one node are generally received by all other stations connected to the medium.

Page 13: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

CSMA access modes

1-persistent Non-persistent P-persistent O-persistent

Page 14: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

CSMA access modes (contd)

1-persistent 1-persistent CSMA is an aggressive transmission

algorithm. When the sender (station) is ready to transmit data, it senses the transmission medium for idle or busy.

If idle, then it transmits immediately. If busy, then it senses the transmission medium

continuously until it becomes idle, then transmits the message (a frame) unconditionally (i.e. with probability=1).

In case of a collision, the sender waits for a random period of time and attempts to transmit again unconditionally

Page 15: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

CSMA access modes (contd)

Non-persistent Non persistent CSMA is a non aggressive transmission

algorithm. When the sender (station) is ready to transmit data, it

senses the transmission medium for idle or busy. If idle, then it transmits immediately. If busy, then it waits for a random period of time

(during which it does not sense the transmission medium) before repeating the whole logic cycle again.

This approach reduces collision, results in overall higher medium throughput but with a penalty of longer initial delay compared to 1–persistent.

Page 16: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

CSMA access modes (contd)

P-persistent This is an approach between 1-persistent and non-persistent CSMA access

modes. When the sender (station) is ready to transmit data, it senses the

transmission medium for idle or busy. If idle, then it transmits immediately. If busy, then it senses the transmission medium continuously until it

becomes idle, then transmits a frame with probability p. If the sender chooses not to transmit (the probability of this event is 1-p),

the sender waits until the next available time slot. If the transmission medium is still not busy, it transmits again with the

same probability p. This probabilistic hold-off repeats until the frame is finally transmitted or

when the medium is found to become busy again (i.e. some other sender has already started transmitting their data).

In the latter case the sender repeats the whole logic cycle again. p-persistent CSMA is used in Wi-Fi and other packet radio systems.

Page 17: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

CSMA access modes (contd)

O-persistent Each station is assigned a transmission order by a

supervisor station. When medium goes idle, stations wait for their time slot in

accordance with their assigned transmission order. The station assigned to transmit first transmits

immediately. The station assigned to transmit second waits one time slot.

Stations monitor the medium for transmissions from other stations and update their assigned order with each detected transmission.

O-persistent CSMA is used by CobraNet, LonWorks and the controller area network.

Page 18: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

CSMA/CD

Carrier Sense Multiple Access With Collision Detection (CSMA/CD) is a media access control method used most notably in local area networking using early Ethernet technology.

It uses a carrier sensing scheme in which a transmitting data station detects other signals while transmitting a frame, and stops transmitting that frame, transmits a jam signal, and then waits for a random time interval before trying to resend the frame.

CSMA/CD is a modification of pure carrier sense multiple access (CSMA). CSMA/CD is used to improve CSMA performance by terminating transmission as soon as a collision is detected, thus shortening the time required before a retry can be attempted.

Page 19: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

Main procedure for Collision Detection

Main procedure Is my frame ready for transmission? If yes, it goes on

to the next point. Is medium idle? If not, wait until it becomes ready[note

1] Start transmitting. Did a collision occur? If so, go to collision detected

procedure. Reset retransmission counters and end frame

transmission.

Page 20: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

Collision detected procedure

Collision detected procedure Continue transmission until minimum packet time is

reached to ensure that all receivers detect the collision.

Increment retransmission counter. Was the maximum number of transmission attempts

reached? If so, abort transmission. Calculate and wait random backoff period based on

number of collisions. Re-enter main procedure at stage 1.

Page 21: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

CSMA/CA

Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) in computer networking, is a network multiple access method in which carrier sensing is used, but nodes attempt to avoid collisions by transmitting only when the channel is sensed to be "idle".

It is particularly important for wireless networks, where the collision detection of the alternative CSMA/CD is unreliable due to the hidden node problem.

CSMA/CA is a protocol that operates in the Data Link Layer (Layer 2) of the OSI model.

Page 22: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

CSMA/CA (contd)

Carrier Sense: prior to transmitting, a node first listens to the shared

medium to determine whether another node is transmitting or not.

Collision Avoidance: if another node was heard, we wait for a period of time

for the node to stop transmitting before listening again for a free communications channel.

Request to Send/Clear to Send (RTS/CTS) Transmission

Page 23: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

Collision Free Protocols

Although collisions do not occur with CSMA/CD once a station has unambiguously seized the channel, they can still occur during the contention period.

These collisions adversely affect the efficiency of transmission. Hence some protocols have been developed which are contention free.

These protocols are: Basic Bit Map BRAP Binary Count Down MLMA

Page 24: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

Bit-Map Method

In this method, there N slots.

If node 0 has a frame to send, it transmit a 1 bit during the first slot.

No other node is allowed to transmit during this period.

Next node 1 gets a chance to transmit 1 bit if it has something to send, regardless of what node 0 had transmitted.

This is done for all the nodes. In general node j may declare the fact that it has a frame to send by inserting a 1 into slot j.

Hence after all nodes have passed, each node has complete knowledge of who wants to send a frame. Now they begin transmitting in numerical order.

Since everyone knows who is transmitting and when, there could never be any collision.

Page 25: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

Binary Countdown

In this protocol, a node which wants to signal that it has a frame to send does so by writing its address into the header as a binary number.

The arbitration is such that as soon as a node sees that a higher bit position that is 0 in its address has been overwritten with a 1, it gives up.

The final result is the address of the node which is allowed to send. After the node has transmitted the whole process is repeated all over again.

Given below is an example situation.Nodes AddressesA 0010B 0101C 1010D 1001

----1010

Node C having higher priority gets to transmit.

Page 26: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

Limited Contention Protocols

Limited Contention Protocols first divide the stations up into (not necessarily disjoint) groups.

Only the members of group 0 are permitted to compete for slot 0.

The competition for aquiring the slot within a group is contention based. If one of the members of that group succeeds, it aquires the channel and transmits a frame.

If there is collision or no node of a particular group wants to send then the members of the next group compete for the next slot.

Examples: Adaptive Tree Walk Protocol

Page 27: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

Adaptive Tree Walk Protocol

The following is the method of adaptive tree protocol.

Initially all the nodes are allowed to try to aquire the channel.

If it is able to aquire the channel, it sends its frame.

If there is collision then the nodes are divided into two equal groups and only one of these groups compete for slot 1.

If one of its member aquires the channel then the next slot is reserved for the other group.

On the other hand, if there is a collision then that group is again subdivided and the same process is followed.

This can be better understood if the nodes are thought of as being organised in a binary tree as shown in the following figure.

Page 28: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

Adaptive Tree Walk Protocol (contd)

Page 29: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

Uniform Resource Name

Uniform Resource Name (URN) is a string of characters used to identify a name of a web resource.

Such identification enables interaction with representations of the web resource over a network, typically the World Wide Web, using specific protocols.

URNs are required to remain globally unique and persistent, even when the resource ceases to exist or becomes unavailable.

Page 30: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

High Speed LAN

Types: Fast Ethernet Gigabit Ethernet FDDI

Page 31: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

Fast Ethernet

In computer networking, Fast Ethernet is a collective term for a number of Ethernet standards that carry traffic at the nominal rate of 100 Mbit/s.

Fast Ethernet was introduced in 1995 and remained the fastest version of Ethernet for three years before it was superseded by the Gigabit Ethernet.

It runs on UTP data or optical fiber cable in a star wired bus topology.

The standard specifies the use of CSMA/CD for media access control, although in practice all modern networks use Ethernet switches and operate in full-duplex mode.

Page 32: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

Gigabit Ethernet

The Gigabit Ethernet standard supports a theoretical maximum data rate of 1 gigabit per second (Gb

It came into use beginning in 1999ps) (1000 Mbps).

When first developed, some thought achieving gigabit speeds with Ethernet would require using fiber optic or other special cables.

However, today's Gigabit Ethernet works using twisted pair copper cable (specifically, the CAT5e and CAT6 cabling standards) similar to older 100 Mbps Fast Ethernet (that works over CAT5 cables).

Page 33: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

Fiber Distributed Data Interface

Fiber distributed data interface (FDDI), which is an optical data communication standard used for long distance networks provides communication with fiber optic lines up to 200 kilometers at a speed of 100 megabit per second (Mbps).

FDDI networks, which are designed for geographically large-scaled organizations that support thousands of end users, operates in the OSI model's physical and media access control (MAC layers).

FDDI has dual primary and secondary communication rings. The primary ring works alongside the network The secondary ring remains idle and available for backup.

FDDI was later extended to FDDI-2 for long distance voice and multimedia communication.

Organizations use this medium for voice and video conferences, online lectures, news and other multimedia.

Page 34: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

IEEE 802

IEEE 802 refers to a family of IEEE standards dealing with local area networks and metropolitan area networks.

The number 802 was simply the next free number IEEE could assign, though “802” is sometimes associated with the date the first meeting was held — February 1980.

The services and protocols specified in IEEE 802 map to the lower two layers (Data Link and Physical).

Page 35: UNIT-III Computer Network MAC Sub Layer. MAC Sub Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, media access control

Prepared by - ROHIT KOSHTA

IEEE 802 (contd)

In fact, IEEE 802 splits the OSI Data Link Layer into two sub-layers named Logical Link Control (LLC) and Media Access Control (MAC), so that the layers can be listed like this: Data link layer LLC Sublayer MAC Sublayer Physical layer

The IEEE 802 family of standards is maintained by the IEEE 802 LAN/MAN Standards Committee (LMSC). The most widely used standards are for the Ethernet family, Token Ring, Wireless LAN, Bridging and Virtual Bridged LANs. An individual Working Group provides the focus for each area.