19
CSMA/CD Simulation Carrier Sense Multiple Access (CSMA), although more efficient than ALOHA or slotted ALOHA, still has one glaring inefficiency: When two frames collide, the medium remains unusable for the duration of transmission of both damaged frames. For long frames, compared to propagation time, the amount of wasted capacity can be considerable. This waste can be reduced if a station continues to listen to the medium while transmitting. Course Name: Networking Level(UG/PG): UG Author(s) : Phani Swathi Chitta Mentor: Aruna Adil *The contents in this ppt are licensed under Creative Commons Attribution-NonCommercial- ShareAlike 2.5 India license

CSMA/CD Simulation

  • Upload
    jake

  • View
    175

  • Download
    5

Embed Size (px)

DESCRIPTION

CSMA/CD Simulation. - PowerPoint PPT Presentation

Citation preview

Page 1: CSMA/CD Simulation

CSMA/CD SimulationCarrier Sense Multiple Access (CSMA), although more efficient than

ALOHA or slotted ALOHA, still has one glaring inefficiency: When two frames collide, the medium remains unusable for the duration of transmission of both damaged frames. For long frames, compared to propagation time, the amount of wasted capacity can be considerable. This waste can be reduced if a station continues to listen to the medium while transmitting.

Course Name: Networking Level(UG/PG): UG Author(s) : Phani Swathi ChittaMentor: Aruna Adil

*The contents in this ppt are licensed under Creative Commons Attribution-NonCommercial-ShareAlike 2.5 India license

Page 2: CSMA/CD Simulation

Learning ObjectivesAfter interacting with this Learning Object, the learner will be able to:• Explain the process of collision detection in CSMA/CD

Page 3: CSMA/CD Simulation

Definitions of the components/Keywords:

5

3

2

4

1 • CSMA/CD is Carrier Sense Multiple Access / Collision Detection : - Carrier Sense – the ability of a network card to sense or detect communication on the network - Multiple Access – states that in that network there are multiple stations that could access the network at the same time - Collision Detection – the method needed for detecting a collision

• Carrier Sense Multiple Access/Collision Detect (CSMA/CD) is the protocol for carrier transmission access in Ethernet networks.

• Carrier-sense multiple access with collision detection describes how the Ethernet protocol regulates communication among nodes • On Ethernet, any station can send a frame at any time. Each station senses whether the medium is idle and therefore available for use. If it is, the station begins to transmit its first frame. If another station also tries to transmit at the same time, a collision occurs and the frames are discarded and then a jamming signal is sent throughout the network in order to notify all stations of the collision. Each station then waits for a random period of time and retries. If another collision occurs, the time intervals from which the random waiting time is selected are increased step by step. This is known as exponential back off. The stations retry until successful transmission of the frame.

CSMA/CD is specified in the IEEE 802.3 standard.

Page 4: CSMA/CD Simulation

Definitions of the components/Keywords:

• The jam signal is a signal that carries a 32-bit binary pattern sent by a data station to inform the other stations that they must not transmit. •Transmit – The stations (nodes) sends the frames to other stations (nodes) • Carrier Sense – The stations (nodes) listen to the medium if it is idle for transmission

• Back off – After collision occurs, a jam signal is sent to notify all stations of the collision. After the jam signal is sent, the stations (nodes) wait for a random period of time called Back off period • The flow chart for CSMA/CD protocol is : given in the next slide

5

3

2

4

1

Page 5: CSMA/CD Simulation
Page 6: CSMA/CD Simulation

Master Layout 1

5

3

2

4

1

• Give a box to enter position of stations• Give values from 1 to 99 to select for the station and the gap between the stations must be 15 or above• Give STOP and CLEAR buttons• Give a box to enter Frame size and default size will be 150

Page 7: CSMA/CD Simulation

Step 1: 1

5

32

4 Instruction for the animator Text to be displayed in the working area (DT)• Show the black Line ranging from 0 to 100

and the details of the colors as given above• The text in DT should appear initially on

the screen

• Minimum 2 stations should be created and maximum 4 stations allowed• Minimum distance between two stations should be equal to or above 15• After creating stations, click on any square box (representing station)

Page 8: CSMA/CD Simulation

Step 2: 1

5

32

4Instruction for the animator Text to be displayed in the working area (DT)

• When the user selects ‘Add station’ , show a square box at that particular position

• The text in DT of previous slide should be shown

Page 9: CSMA/CD Simulation

Step 3: 1

5

32

4

When single station transmits

Instruction for the animator Text to be displayed in the working area (DT)• When the user clicks any square box then

show a green line• The text in DT should appear in parallel to

the figures

• Station 2 is transmitting

** All the coming slides are given as examples but the actual position of the boxes and their states follow according to the square boxes selected by the user and the procedure depends on the algorithm given in the 5th slide.

Page 10: CSMA/CD Simulation

Step 4: 1

5

32

4

When single station transmits

Instruction for the animator Text to be displayed in the working area (DT)• When the user clicks any square box then

show a green line• The text in DT should appear in parallel to

the figures

• Station 3 is transmitting

Page 11: CSMA/CD Simulation

Step 5: 1

5

32

4

When 2 stations transmit at a time

Instruction for the animator Text to be displayed in the working area (DT)• When the user clicks any two square boxes

one after the other immediately then show a redlines (indicating collision)

• The text in DT should appear in parallel to the figures

• Station 2 is transmitting• Station 3 is backing off due to collision

Page 12: CSMA/CD Simulation

Step 6: 1

5

32

4

When 3 stations transmit at a time

Instruction for the animator Text to be displayed in the working area (DT)• When the user clicks any three square

boxes one after the other immediately then show a redlines (indicating collision)

• The text in DT should appear in parallel to the figures

• Station 1 is sensing• Station 2 is backing off due to collision • Station 3 is backing off due to collision

Page 13: CSMA/CD Simulation

Introduction

Credits

13

Definitions Test your understanding (questionnaire) Lets Sum up (summary) Want to know more…

(Further Reading)

Try it yourself

Interactivity:

Analogy

Slide 1

Slide 3

Slide 15-19

Slide 20

Electrical Engineering

In this LO demo itself is interactive session.

Page 14: CSMA/CD Simulation

Questionnaire1.A node wants to send a packet over a wireless LAN. What

will CSMA/CD protocol do if the channel is idle?

Answers: a) Sense the channel and sends the packet

immediately if it is idle b) Sense the channel and sends the packet if it is still idle

after a random period of time after the jam signal is sent

c) both a and b d) either a or b

1

5

2

4

3

Page 15: CSMA/CD Simulation

Questionnaire

2. A node wants to send a packet over a wireless LAN. What will CSMA/CD protocol do if the channel is busy?

Answers: a) waits until the channel is idle and sends the packet

immediately b) waits until the channel is idle and sends the packet if it is

idle even after the jam signal is sent c) both a and b d) either a or b

1

5

2

4

3

Page 16: CSMA/CD Simulation

Questionnaire

3. What is the jam signal sent for?

Answers: a) To stop transmission for a random back off time b) To avoid further collisionc) To inform all other nodes that there is a collisiond) All the above

1

5

2

4

3

Page 17: CSMA/CD Simulation

Questionnaire

4. After a jam signal is sent, which of the below event happens?

Answers: a) Nodes send packet immediately b) Nodes wait for a random period of timec) a and bd) a or b

1

5

2

4

3

Page 18: CSMA/CD Simulation

Questionnaire

5. What is purpose of CSMA/CD protocol in wireless LAN?

Answers: a) Create different size of packets b) Detect collision of packetsc) Avoid collision of packetsd) All the above

1

5

2

4

3

Page 19: CSMA/CD Simulation

Links for further readingReference websites:http://en.wikipedia.org/wiki/

Carrier_sense_multiple_access_with_collision_detectionhttp://www.erg.abdn.ac.uk/~gorry/eg3561/lan-pages/csma-cd.htmlhttp://www.ethermanage.com/ethernet/10quickref/ch1qr_7.htmlhttp://www.mcmcse.com/cisco/guides/csma.shtml

Books:COMPUTER NETWORKS –Andrew S. Tanenbaum