Skip to content

Latest commit

 

History

History
207 lines (166 loc) · 12.6 KB

4.medium_access_control.md

File metadata and controls

207 lines (166 loc) · 12.6 KB

1. What is Medium Access Control layer?

Ans: The Media Access Control Layer is one of two sublayers that make up the Data Link Layer of the OSI model. The MAC layer is responsible for moving data packets to and from one Network Interface Card (NIC) to another across a shared channel.

2.Multiple Access Protocols

ALOHA: -In the 1970s, Norman Abramson and his colleagues at the University of Hawaii devised a new and elegant method to solve the channel allocation problem. ALOHA in Hawaiian means “hello”.

  • Two versions of ALOHA : pure and slotted.
  • They differ with respect to whether time is divided into discrete slots into which all frames must fit. - Pure ALOHA does not require global time synchronization; slotted ALOHA does.

Pure ALOHA - Each station sends a frame whenever it has a frame to send. - However, since there is only one channel to share, there is the possibility of collision between frames from different stations.

3.Carrier Sense Multiple access protocol

Protocol in which station listen for carrier and act accordingly are called carrier sense protocols

  • 1-persistent method - The station finds the line idle, it sends its frame immediately (with probability 1). - This method has the highest chance of collision because two or more stations may find the line idle and send their frames immediately.
  • nonpersistent method If a station that has a frame to send it senses the line. - If the line is idle, it sends immediately. - If the line is not idle, it waits a random amount of time and then senses the line again. - The nonpersistent approach reduces the chance of collision because it is unlikely that two or more stations will wait the same amount of time and retry to send simultaneously. - However, this method reduces the efficiency of the network because the medium remains idle when there may be stations with frames to send.
  • p-persistent method The p-persistent method is used if the channel has time slots with a slot duration equal to or greater than the maximum propagation time In this method, after the station finds the line idle it follows these steps: 1. With probability p, the station sends its frame. 2. With probability q = 1 - p, the station waits for the beginning of the next time slot and checks the line again. a. If the line is idle, it goes to step 1. b. If the line is busy, it acts as though a collision has occurred and uses the back-off procedure

3. Field of Media Access Control frame that is used to alternate 1s and 0s is called

preamble

4. Media access control is sub layer of

IEEE

5. Media Access Control layer frame has

9 Fields

6. Value of frame body field of Media Access Control frame is in between

0 to 2312 bytes

7. Duration field D of Media Access Control layer frame contains

2bytes

8.what is mac address?

A media access control address (MAC address) of a computer is a unique identifier assigned to network interfaces for communications at the data link layer of a network segment.

MAC addresses are used in the media access control protocol sublayer of the OSI reference model.

9.What is my IP address and MAC address?

A MAC address is given to a network adapter when it is manufactured. It is hardwired or hard-coded onto your computer's network interface card (NIC) and is unique to it. Something called the ARP (Address Resolution Protocol) translates an IP address into a MAC address.

10.What are the Multiple Access Protocols?

1. ALOHA
2. Carrier Sense Multiple Access Protocols
3. Collision-Free Protocols
4. Limited-Contention Protocols
5. Wavelength Division Multiple Access Protocols
6. Wireless LAN Protocols

11.Aloha?

ALOHA: a.In the 1970s, Norman Abramson and his colleagues at the University of Hawaii devised a new and elegant method to solve the channel allocation problem. ALOHA in Hawaiian means “hello”. b.Two versions of ALOHA : pure and slotted. c.They differ with respect to whether time is divided into discrete slots into which all frames must fit. d.Pure ALOHA does not require global time synchronization; slotted ALOHA does.

Pure ALOHA : a.Each station sends a frame whenever it has a frame to send. b.However, since there is only one channel to share, there is the possibility of collision between frames from different stations. c.We need to resend the frames that have been destroyed during transmission. The pure ALOHA protocol relies on acknowledgments from the receiver.  When a station sends a frame, it expects the receiver to send an acknowledgment. If the acknowledgment does not arrive after a time-out period, the station assumes that the frame (or the acknowledgment) has been destroyed and resends the frame. d.A collision involves two or more stations. If all these stations try to resend their frames after the time-out, the frames will collide again.  Pure ALOHA dictates that each station waits a random amount of time before sending its frame. The randomness will help avoid more collisions. We call this time the back-off time.

12. Carrier Sense Multiple Access Protocols?

Carrier sense multiple access (CSMA) requires that each station first listen to the medium (or check the state of the medium) before sending. In other words, CSMA is based on the principle "sense before transmit" or "listen before talk. " The possibility of collision still exists because of propagation delay; when a station sends a frame, it still takes time (although very short) for the first bit to reach every station and for every station to sense it.

13.Persistence Methods?

Three methods have been devised to answer these questions: A. 1-persistent method B. nonpersistent method C. p-persistent method

1 – Persistent: a.The station finds the line idle, it sends its frame immediately (with probability 1). b.This method has the highest chance of collision because two or more stations may find the line idle and send their frames immediately.

Non Persistent: a. If a station that has a frame to send it senses the line.  If the line is idle, it sends immediately. b. If the line is not idle, it waits a random amount of time and then senses the line again. c. The nonpersistent approach reduces the chance of collision because it is unlikely that two or more stations will wait the same amount of time and retry to send simultaneously. d. However, this method reduces the efficiency of the network because the medium remains idle when there may be stations with frames to send.

P-persistent: The p-persistent method is used if the channel has time slots with a slot duration equal to or greater than the maximum propagation time In this method, after the station finds the line idle it follows these steps:

  1. With probability p, the station sends its frame.
  2. With probability q = 1 - p, the station waits for the beginning of the next time slot and checks the line again. a. If the line is idle, it goes to step 1. b. If the line is busy, it acts as though a collision has occurred and uses the back-off procedure.

14. How many fields does a Media Access Control layer frame have?

9 Fields

15.The Channel Allocation Problem?

Channel allocation is a problem to those who use broadcast channel (broadcast channels are sometimes referred to as multiaccess channels or random access channels). Key issue is how to determine who gets to use the channel when there is competition for it. The protocols used to determine who goes next on a multiaccess channel belong to a sublayer of the data link layer called the MAC (Medium Access Control) sublayer.

Static Channel Allocation in LANs and MANs: a.For small number of users with fixed demand pattern FDM is a simple and efficient allocation mechanism. b.For large number of users with varying pattern of demand we have following problem: c.If spectrum is divided into N channels and less than N users are available, then valuable spectrum is wasted. d.If spectrum is divided into N channels and more than N users are available, then some user are denined channel due to shortage of spectrum. e.The delay faced by the data will be equal to transmission delay + delay for resolving the contention (stations compete with each other to access the medium) + accessing the medium.

Dynamic Channel Allocation in LANs and MANs:
Assumptions made : Station Model: There are N independent stations (also called Terminal)
(e.g., computers, telephones, etc.) which has a program which generates the frames. Once a frame has been generated,
the station is blocked and does nothing until the frame has been successfully transmitted.

16. What is ethernet?

Ethernet is a network protocol that controls how data is transmitted over a LAN. Technically it is referred to as the
IEEE 802.3 protocol. The protocol has evolved and improved over time and can now deliver at the speed of a gigabit per second.

17. What is Aloha and describe Pure Aloha?

Ans-> 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. The original system used for ground based radio broadcasting, but the system has been implemented in satellite communication systems. A shared communication system like ALOHA requires a method of handling collisions that occur when two or more systems attempt to transmit on the channel at the same time. In the ALOHA system, a node transmits whenever data is available to send. If another node transmits at the same time, a collision occurs, and the frames that were transmitted are lost. However, a node can listen to broadcasts on the medium, even its own, and determine whether the frames were transmitted. Aloha means "Hello". Aloha is a multiple access protocol at the datalink layer and proposes how multiple terminals access the medium without interference or collision. In 1972 Roberts developed a protocol that would increase the capacity of aloha two fold. The Slotted Aloha protocol involves dividing the time interval into discrete slots and each slot interval corresponds to the time period of one frame. This method requires synchronization between the sending nodes to prevent collisions.

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.

• There are four stations that .contended with one another for access to shared channel. All these stations are transmitting frames. Some of these frames collide because multiple frames are in contention for the shared channel. Only two frames survive. All other frames are destroyed.

• Whenever two frames try to occupy the channel at the same time, there will be a collision and both will be damaged. If first bit of a new frame overlaps with just the last bit of a frame almost finished, both frames will be totally destroyed and both will have to be retransmitted.

8. Carrier Sense Multiple Access with Collision Detection

Ans-> CSMA protocols are improvement over ALOHA since they ensure that station does not transmit while the channel is busy. But if two station find the channel idle and start transmitting simultaneoulsy, their signals would collide. This can be Prevented if the stations quickly detect the collison befeore it happens thus abruptly stoping the transmission saving the time and bandwidth. This protocol is known as CSMA with Collison Detection(CSMA/CD)