5

Click here to load reader

Carrier Sense Multiple Access/Collision Detection-Teaching Model (CSMA/CD-TM): A Step-by-Step Demonstration of the Collision Detection Mechanism

Embed Size (px)

DESCRIPTION

Journal of Telecommunications, ISSN 2042-8839, Volume 15, Issue 2, August 2012http://www.journaloftelecommunications.co.uk

Citation preview

Page 1: Carrier Sense Multiple Access/Collision Detection-Teaching Model (CSMA/CD-TM): A Step-by-Step Demonstration of the Collision Detection Mechanism

JOURNAL OF TELECOMMUNICATIONS, VOLUME 15, ISSUE 2, AUGUST 2012 51

© 2012 JOT www.journaloftelecommunications.co.uk

Carrier Sense Multiple Access/Collision Detection-Teaching Model (CSMA/CD-TM): A Step-by-Step Demonstration of the Collision

Detection Mechanism Jameson Mbale

Abstract—Carrier Sense Multiple Access/Collision Detection (CSMA/CD) is a mechanism used to detect and resolve collisions when multiple nodes are trying to send frames simultaneously across a network. This particular method has been difficulty to teach students in a traditional lecture format used in sub-Saharan Africa, because it is difficult to visualize. The author developed a software simulation, called Carrier Sense Multiple Access/Collision Detection – Teaching Model (CSMA/CD-TM) to visualize this mechanism. The teaching model was shown to be effective in practice, with ninety three percent (93%) of a group of forty (40) students taught with it reporting saying that the CSMA/CD mechanism was clear or very clear to them, versus only ten percent (10%) of a control group of students who were taught without the model. This was due to the fact that in this region there were not enough available tangiable resources. Much of teaching was in theory in which learners could not figure out the movement of frames, struggling to use a single medium. The students learnt most of the concept in paper and had hardly seen the infrastructure taught. The concept of detecting and resolving had been an obsolete to the learners. The demonstration further illustrated the system releasing a jamming signal to resolve the eminent collision likely to be caused by multiple frames.

Index Terms— Collision, Carrier Sense Multiple Access/Collision Detection – Teaching Model (CSMA/CD-TM), detection and frames.

—————————— u ——————————

1 INTRODUCTIONhe  Carrier  Sense  Multiple  Access/Collision  Detection  (CSMA/CD)  is  a  mechanism  used  in  telecommunica-­‐‑tion   to   detect   and   resolve   collision   of   frames   sent  

from  different  stations  in  an  Ethernet  network.    Learning  this   mechanism   has   been   a   challenge   especially   for   stu-­‐‑dents   in  the  sub-­‐‑Saharan  region.   It   is   in  view  of   this   that  the   Carrier   Sense   Multiple   Access/Detection-­‐‑Teaching  Model  (CSMA/CD  –TM),  a  software  simulation  for  visual-­‐‑izing  this  method,  was  developed  to  demonstrate  step-­‐‑by-­‐‑step   the   whole   mechanism   of   collision   detection.   The  model  gives  a  clear  picture  of  how  various  stations  such  as  computers,  laptops,  note  books  and  mobile  phones  can  send   frames   at   the   same   time   and   the  whole   system  de-­‐‑tects  and  resolves  collisions.      

   1.2 The Problem Statement As   pointed   out   above,   the   teaching   of   CSMA/CD   in   the  tertiary   institutions  especially   in   sub-­‐‑Saharan   region  had  been   problematic.   This   was   due   to   the   fact   that   in   this  region  there  are  not  enough  available  resources.  Much  of  teaching   is   theoretical   and   learners   could   not   grasp   the  content   in   practice.   They   learn   most   of   the   concepts   on  paper  and  have  hardly  seen  the  infrastructure  taught.  The  teaching  content  of  CSMA/CD  involves  the  stations  send-­‐‑

ing   frames,   which   collide   in   a   single   medium.   Less   ex-­‐‑posed   learners   may   not   figure   out   what   such   an   infra-­‐‑structure   looks   like.  The  whole   theory  of   the  mechanism  of  the  CSMA/CD  is  just  viewed  as  incomprehensible  and  irrelevant  by  students  with  poor  background.  It  is  in  view  of   this   that   the  work  was   envisaged   to   build   a   practical  model  that  demonstrated  the  whole  mechanism  of  carrier  sense  multiple  access  collision  detection.      

2 RELATED WORK Other   scholars   have   discussed   the   mechanism   of  CSMA/CD.    In  [1]  he  pointed  out  that,  originally,  Ethernet  was  designed  as  a  protocol  to  run  over  a  shared  medium.  He   further   emphasized   that   simultaneous   transmission  from  multiple  nodes  would  result   in  garbled  data  on  the  medium   and   subsequent   loss   of   data.   He   derived   some  basic  requirements  for  network  protocol  in  the  concept  of  CSMA/CD.  He  described  the  concept  of  CSMA/CD  using  its   parts.   Firstly,   “carrier   sense”   means   that   each   node  was   able   to  detect  when  another  node  was   transmitting.  Before  an  Ethernet  node  could  begin  transmitting,  it  must  first  have  determined  whether  the  medium  was  active  or  idle.  If  the  medium  was  active,  then  that  node  must  wait  until  the  medium  became  idle,  and  then  wait  a  predeter-­‐‑mined  amount  of   time  after   that  before  starting   to   trans-­‐‑————————————————

• Jameson Mbale is with the University of Namibia, Department of Com-puter Science, P/B 13301, Windhoek, Namibia.

T  

Page 2: Carrier Sense Multiple Access/Collision Detection-Teaching Model (CSMA/CD-TM): A Step-by-Step Demonstration of the Collision Detection Mechanism

52

mit.   Secondly,   “multiple   access”   means   that   multiple  nodes  were  able  to  transmit  on  a  shared  medium.  Thirdly,  “collision  detection”  means  that  a  transmitting  node  was  able   to   determine   when   simultaneous   transmission   oc-­‐‑curred  in  the  case  where  multiple  nodes  saw  the  medium  as   idle   and   started   transmitting   at   the   same   time.   Sim-­‐‑mons  stressed  that  if  multiple  nodes  were  waiting  for  the  medium   to   become   idle,   then   they   may   have   started  transmitting  at  virtually  the  same  time  once  the  medium  become  idle  and  in  that  case,  all  the  nodes  must  have  had  the   ability   to   detect   those   collisions.   In   addition,   he   de-­‐‑fined   the   term  backoff   as  when  a   collision  was  detected,  each  node  must  have  had  a  method  to  determine  when  to  retransmit   without   each   node   continually   trying   to   re-­‐‑transmit  at  the  same  time.              He  [2]  discussed  the  collision  detection  capability,  that  implied  the  terminal  must  be  able  to  transmit  and  receive  at  the  same  time.  In  that  way,  he  considered  the  function-­‐‑al   capabilities   each   terminal   needs   to   perform   and   these  were:  first,  “carrier  sensing  capability”,  the  terminal  must  be  able   to   listen   to   the  channel  and  hear  whether  one  or  more   of   the   rest   of   the   terminals   in   the   channel  was   at-­‐‑tempting  a  transmission;  and  second,  “collision  detection  capability”,     the   terminal   must   be   able   to   listen   to   the  channel  while   transmitting   and  detect  whether   its   trans-­‐‑mission  collided  with  the  transmission  of  some  other  ter-­‐‑minals.              In   [3]   it  describes  CSMA/CD  as  a  Media  Access  Con-­‐‑trol  method  in  which  a  carrier  sensing  scheme  was  used.  In   that  way,   the  CSMA/CD  was  used   to   improve  CSMA  performance   by   terminating   transmission   as   soon   as   a  collision   was   detected.   It   further   discussed   that   the  CSMA/CD   was   a   method   in   which   a   transmitting   data  station   that   detects   another   signal   while   transmitting   a  frame,   stopped   transmitting   that   frame,   transmitted   a  jamming  signal,  and  then  waited  for  a  random  time  inter-­‐‑val   (random   backoff)   before   trying   to   resend   the   frame.  The   Wikipedia   also   explained   the   jamming   signal   as   a  signal   that   carried   a   32-­‐‑bit   binary  pattern   sent   by   a  data  station   to   inform   the   other   stations   that   they   must   not  transmit.  He  continued  to  explain  the  technical  operation  of  the  jamming  signal  by  highlighting  that  the  maximum  jam-­‐‑time   was   calculated   as   follows:   the   maximum   al-­‐‑lowed   diameter   of   an   Ethernet   installation   is   limited   to  232  bits.  This  makes  a  round-­‐‑trip-­‐‑time  of  464  bits.  As  the  slot   time   in   Ethernet   is   512   bits,   the   difference   between  slot  time  and  round-­‐‑trip-­‐‑time  was  48  bits  (6  bytes),  which  was   the  maximum  "ʺjam-­‐‑time"ʺ.  This   in   turn  meant:   a   sta-­‐‑tion  noting  a  collision  had  occurred  was  sending  a  4  to  6  byte   long   pattern   composed   of   16   1-­‐‑0   bit   combinations.  He  noted  that  the  size  of  this  jamming  signal  was  clearly  beyond  the  minimum  allowed  frame-­‐‑size  of  64  bytes.  He  emphasised   the   purpose   of   that   was   to   ensure   that   any  other   node   which   may   currently   be   receiving   a   frame  would   receive   the   jamming  signal   in  place  of   the  correct  32-­‐‑bit  MAC  CRC,   that   caused   the   other   receivers   to  dis-­‐‑card  the  frame  due  to  a  CRC  error.      

3 CSMA/CD-TM IMPLEMENTATION The  CSMA/D-­‐‑TM  was   designed   to   demonstrate   step-­‐‑by-­‐‑step   a   simulation   of   the  CSMA/CD  mechanism   rang-­‐‑ing  from  stations,  medium,  frames  and  jamming  signal  as  indicated  in  Figure  1.  

Figure  1.  CSMA/D-­‐‑TM  Is  a  Simulation  a  of  the  Mecha-­‐‑nism  of  Collision  Detection    Figure  1   is   composed  of   the   following  components.  First  are  the  four  heterogeneous  stations  on  the   left.  Second  is  the  medium,  which   connects   the   heterogeneous   stations  to  the  recipient  (the  server  on  the  right).  Third  is  the  sys-­‐‑tem,   which   controls   the   jamming   signal.   Fourth   is   the  server,  which  in  this  case  is  the  recipient.  

4 THE DATA FLOW DIAGRAM OF CSMA/CD-TM The   Figure   2   is   a   flow   diagram   that   demonstrates   the  movement   of   frames   and   the  whole  mechanism  of   colli-­‐‑sion  detection.  When   the   system  was   started,   it   checked  whether   the   station   existed   or   not.   If   the   station  did  not  exist,  that  meant  there  were  no  frames  to  be  sent  and  the  process   was   terminated.   If   the   station   or   some   stations  existed,   they  prepared   the   frames   for   transmission.  Then  the  system  checked  whether  the  medium  was  idle.   If   the  medium   was   idle,   and   only   one   station   had   a   frame  ready,   then   it   successfully   transmitted   it   to   the   destina-­‐‑tion.  If  the  medium  was  not  idle  and  it  happened  that  all  four  (4)  stations  sent  frames  as  illustrated  in  Figure  3,  then  collision   was   eminent   and   detected.   When   the   system  detected  collision,  it  sent  the  jamming  signal  as  indicated  in  Figure  4.            In  connection  with  the  system,  the  jamming  signal  has  the   ability   to   synchronous   which   station   sent   the   frame  first.     In   this  way,   the   jamming   signal   resolved   the   colli-­‐‑sion  by  allocating  resources  first  to  station  two  (2)  which  was  the  first  to  request  for  the  resources.  In  that  way,  sta-­‐‑tion   two   (2)  was   first   to   be   granted   priority   by   the   jam-­‐‑ming   signal   to   send   the   frame,   which   it   successfully  transmitted   to   the   recipient.   Later,   the   jamming   signal  granted  station  four  (4)  the  resources  and  gave  it  priority  which  it  did  to  transmit  the  frame  to  the  destination.  Then  followed  by  station  one  (1)  which  was  allocated  resources  and   granted   priority   by   the   jamming   signal.   Thereafter,  

Page 3: Carrier Sense Multiple Access/Collision Detection-Teaching Model (CSMA/CD-TM): A Step-by-Step Demonstration of the Collision Detection Mechanism

53

frame   one  was   successfully   transmitted   to   the   recipient.  Lastly,  but  not   the   list,  station  three  (3)  was  allocated  re-­‐‑sources  and  granted  privileges  by   the   jamming   signal   to  send   a   frame.   The   frame   was   successful   sent   to   the   in-­‐‑tended  destination.  

StationExist?

Start

DiscardNoYesPrepare

Frame forSending

MediumIdle?

YesSendFrame

No

SendJamming

Signal

JammingSignal Assign

Priority?

No Priority

CommenceSendingFrame

PriorityGranted

TransmissionSuccessful

Figure  2.  CSMA/D-­‐‑TM  Flow  Diagram    5 IMPLEMENTATION OF THE CSMA/CD-TM  The   simulation   is   presented   to   students   in   five   phases,  which  are  now  described.    Phase  1:  The   heterogeneous   stations   numbered   1   to   4   may   send  frames  at   the   same   time  as  demonstrated   in  Figure  3.   In  the  right  bottom  corner,  the  Carrier  Sense  Status  window  displayed  the  current  status  as  “station  sending.”  For  eas-­‐‑ier   illustration,   the   frames  had  been  colored  as:  Station  1  Frame  =  yellow,  Station  2  Frame  =  purple,  Station  3  Frame  =  grey  and  Station  4  Frame  =  green.  

 Figure  3.  Heterogeneous  Stations  Send  Frames    Phase  2:  These   frames  move   into   the   single  medium,  where   they  will  likely  collide.  At  this  moment  the  system  was  listen-­‐‑ing  and  as  it  sensed  the  collision,  it  sent  the  jamming  sig-­‐‑nal  as  demonstrated  in  Figure  4.  The  Carrier  Sense  Status  

window  displayed  the  current  status  as  “Collision  detect-­‐‑ed,  (request  jamming  signal).”     Phase  3:  The   jamming  signal  communicated  and  resolved  the  col-­‐‑lision  by  giving  one   station  a  priority   to   send   the   frame.  As  illustrated  in  Figure  5,  Station  2  was  given  the  priority  to   send.  The  Carrier   Sense   Status  window  displayed   the  

current  status  as  “Collision  resolved,  Frames  return  to                    Figure  5.  Jamming  Signal  Resolves  Collision  

 stations,   Station   2   gets  priority.”   sstations,   Station   2   gets  priority.”    Phase  4:  Station  2  gets  access  to  the  medium  and  sends  the  frame  as   demonstrated   in   Figure   6.   The   Carrier   Sense   Status  window   displayed   the   current   status   as   “Purple   frame  sending.”    

               

Figure 4. Jamming Signal Released Into the Media

Page 4: Carrier Sense Multiple Access/Collision Detection-Teaching Model (CSMA/CD-TM): A Step-by-Step Demonstration of the Collision Detection Mechanism

54

     

Figure  6.  Station  2  Gain  Access  to  the  Medium    Phase  5:  Steps   in   Phase   4   had   applied   to   all   stations   until   all   the  frames  were  sent  and  this  marked  the  end  of  transmission  as   it  was   indicated   in  Figure   7.  The  Carrier   Sense  Status  window   displayed   the   current   status   as   “The   End   of  

Transmission.”      

Figure  7.  The  End  of  Transmission    These  phases  demonstrated  how  the  CSMA/CD  –TM  de-­‐‑tected   collision   and   quickly   sent   the   jamming   signal   to  resolve  the  collision.  The  system  apportioned  resources  or  priorities   to   each   of   the   stations   according   to   the   time  when  they  requested  the  resources.  Whenever  the  media  was  free,  the  next  station  was  notified  to  start  sending  the  frame.    6 RESULTS AND DISCUSSION  A   class   of   eighty   (80)   students   was   divided   into   two  groups   of   forty   (40)   to   ascertain   the   effectiveness   of   the  CSMA/CD   –TM   as   a   teaching   aid   in   class.  Group   1  was  taught   on   the   topic   of   CSMA/CD   without   using  CSMA/CD  –TM  and   served  as   a   control  group.  Group  2  was   taught   by   the   Lecturer   using   CSMA/CD   –TM   as   a  

teaching   aid.   After   the   lesson   was   presented,   each   stu-­‐‑dent   was   asked   the   question,   “what   question   did   you  ask”.  They  responded  as  follows.  Table  1a.  Group  1  Students  Not  Using  the  Model:  re-­‐‑sponses  Status   Obsolete   Not  

Clear   Clear   Very  Clear  

No.   Stu-­‐‑dents   30   6   3   1  

 

 Table.  1b:  Group  2  Students  Using  the  Model  Model:  responses    Status   Obsolete   Not  

Clear   Clear   Very  Clear  

No.   Stu-­‐‑dents   1   2   28   9  

 

   Table  1a  tallies  the  number  of  students  against  the  status  of   effectiveness   of  method   applied.   This   sample   did   not  use   the  model.  Out   of   forty   (40)   students,   thirty   (30)   ex-­‐‑pressed   that   they   did   not   understand   the  whole  mecha-­‐‑nism   behind   the   CSMA/CD.   They   regrettably   said   that  the  topic  was  just  obsolete.  They  could  not  tangibly  relate  it  to  anything  of  real  life.  This  is  clearly  demonstrated  in  Figure   8a,   where   seventy   five   percent   (75%)   could   not  figure  out  the  phenomenon  behind  the  topic.              Six  (6)  students  indicated  that  the  topic  was  not  clearer  which  made  fifteen  (15%)  of  difficultness.  Only   three   (3)  expressed  confidence  that  the  topic  was  clear  which  only  seven   and   half   percent   (7.5%)   expressed   confidence   on  the  material.  Only   one   (1)   student   found   the   topic   very  clear   but   it   was   two   and   half   percent   (2.5%)   level   of  grasping  the  material.            With  Group  2,   the  Lecturer  used   the  CSMA/CD  –TM  as   a   teaching  aid.  As   a   result   of  using   this  model,   about  twenty-­‐‑eight   (28)   students   expressed   that   the   topic   was  clear,   which   was   seventy   percent   (70%)   concentration  levels.   In   addition,   nine   learners   confidently   acknowl-­‐‑edged   that   they   were   clear   with   the   topic,   which   was  twenty  two  and  half  percent  (22.5%)  clarity  of  the  lesson.              In   this   sample   very   few   students   had   some   difficult-­‐‑ness.   From   Table   1b   and   Figure   8b,   two   (2)   and   one   (1)  expressed   not   clear   and   obsolete   respectively.   This   gave  five   percent   (5%)   not   clear   and   two   and   half   percent  (2.5%)  obsolete.              In   this   group,   the   levels   of   clarity   were   very   high   as  compared   to   the   sample   group   1  which   did   not   use   the  model.   The   learners  were   able   to   understand   the  whole  infrastructure   involved.  They  also  understood   the  whole  mechanism   involved   in   the   sending   of   multiples   of  frames  from  heterogeneous  stations  into  a  single  medium.  The   students   saw   an   animation   of   the   jamming   signal  released  by  the  system  to  intervene  and  resolve  the  occur-­‐‑rence  of  the  collision.  At  this   juncture,  the  system  appor-­‐‑tions   slots   to   each   and   every   station   in   sending   their   re-­‐‑

Page 5: Carrier Sense Multiple Access/Collision Detection-Teaching Model (CSMA/CD-TM): A Step-by-Step Demonstration of the Collision Detection Mechanism

55

spective   frames.   The   animation  demonstrated   the  move-­‐‑ment  of  a  frame  from  its  respective  station  to  the  destina-­‐‑tion   site.   For   clarity   sake,   after   a   frame   had   reached   the  recipient,   the   acknowledgement   signal   was   seen   going  back   to   the   sending   station   in   order   to   demonstrate   the  “Listen  and  send”  phenomenon  used  under   this   topic  of  CSMA/CD.    7 CONCLUSION  The   CSMA/CD   –TM   helped   learners   from   a   disadvan-­‐‑taged   environment   to   visualize   the   mechanism   being  studied.   Not   only   did   the   CSMA/CD   –TM   demonstrate  the  whole  mechanism  of  collision  detection,  but  it  availed  the  entire   infrastructure  available.   It  displayed  all   the   in-­‐‑frastructure   components   ranging   from   heterogeneous  stations,  medium,  server,   frames  and  the  part  of   the  sys-­‐‑tem  that  releases  the   jamming  signal.  The  model  demon-­‐‑strated   by   showing   the   heterogeneous   stations   sending  frames,  trying  to  access  a  single  medium.  Upon  dictating  the   occurrence   of   collision,   the   system   released   the   jam-­‐‑ming   signal  which   intervened  by   allocating  priority   to   a  frame  which  was  from  a  station  that  requested  resources  earlier  than  other  sites.        REFERENCES    [1] Simmons,  M.   (1999)   Ethernet   Theory   of   Operation.  

Microchip   Technology   Inc.,   AN1120.   DS01120A-­‐‑page  1.  

 [2] Georgiadis,  L.  (2002).  Carrier-­‐‑Sense  Multiple  Access  

(CSMA)  Protocols.    [3] Anonymous,   "ʺ   Carrier   sense   multiple   access   with  

collision   detection,”   [Online   document],   2012,   [Ac-­‐‑cessed   2012   May   4,   for   example],   Available   at  http://en.wikipedia.org/wiki/Carrier-­‐‑sense-­‐‑multiple-­‐‑access  with-­‐‑collision-­‐‑detection  

   Jameson Mbale received his PhD Degree in Computer

Science from Harbin Institute of Technology, China, in 2003. He obtained M.Sc. Degree in Computer Sci-ence from Shanghai University in 1996 and B.A. in Mathematics and Computer Science at University of Zambia in 1993 in Zambia. He is a Senior Lecturer in the Department of Computer Science at the Uni-versity of Namibia. He is the founder and coordi-nator of Centre of Excellence in Tele-communications and Information Technology. His research interest in network security, wireless networking, telecommunications and e-Learning and he has published papers in these areas.  

         

Figure  8a:  Responses  from  the  Control  Group  

           

                       

Figure  8b:  Responses  from  Students  who  Used  the  Model