A Web-Based Introduction to Computer Networks for Non-Majors

Media Access in Ethernet

How do I use this applet?


Place one or more stations on the link and then click on each station's rectange to cause that station to start attempting to transmit a frame. The applet then shows graphically how the stations, in following the media access control protocol, eventually successfully transmit their frames. A station is placed on the link by entering the location of the station in the Station Position text field and then clicking the Add Station button. You can also change the link bandwidth, the frame size, and the link length by entering a new value in the corresponding text field. If you then press the Enter key the text field value change immediately takes effect. However, you do not need to press the Enter key because when you click on a station to start it transmitting, the current values for these text fields are read and take effect. During the process of stations attempting to transmit there may be collisions between frames of different stations as well as backoffs by stations that detect collisions. Click the Clear button to reset the simulation so that there are neither any stations nor any frames in transmission. Click the Suspend button to suspend the animation and click the Resume button to resume the animation. Click the Help button to cause a dialog to appear with a short message about how to use the applet.

Applet User Operations

Applet Graphics

Applet User Operations

Link Bandwidth Field

The value in this field is the maximum number of bits per second that can be transmitted across the link measured in Mbps (Mega bits per second; a Mega in this context means 10^6). The minimum bandwidth allowed is 10 Mbps; the maximum bandwidth allowed is 100 Mbps. Above the link's rectangle in the applet is a series of rows with one row per station. Along the left side of the applet each of these rows has a number indicating the associated station and an edge marker. The edge marker's height indicates the current bandwidth. In particular, the edge marker's height as a fraction of the height of the station's row is equivalent to the proportion of the current bandwidth to the maximum bandwidth. Once a value is entered in the Link Bandwidth field the edge maker heights automatically adjust. The height of transmitted frames will equal the new edge marker heights.

Frame Size Field

The value in this field is the size of a frame in bits. The minimum frame size allowed is 80 bits (10 bytes); the maximum frame size allowed is 16,000 bits (2000 bytes). In a real Ethernet there is a minimum frame size and a maximum frame size and a particular frame might be any size in between. The applet assumes all frames are the size indicated in the Frame Size field. This was done so that the applet can be used to understand the implications of different minimum frame sizes (and in particular, how too small a minimum frame size can cause a station to finish transmitting a frame before detecting a collision). In a real Ethernet the minimum frame size is 512 bits (64 bytes) with the maximum link length and the link bandwidth set so that a 512 bit frame is sufficiently long to detect any collisions. The applet does not attempt to guarantee that 512 bits is the correct minimum frame size.

Station Position Field

The value in this field is the position of the station on the link in meters. Once this value is changed and the Enter key is pressed, the applet attempts to place a station on the link at the specified position. The applet allows a maximum of four stations. A warning message is displayed if the user attempts to add a fifth station. To make it easier to see all the stations, the applet requires that the rectangles of different stations can not overlap. A warning message is displayed if they do overlap.

Clicking on a Station

Clicking on the rectangle of a station causes the station to start attempting to transmit a frame. Clicking elsewhere on the applet (not including the text fields and buttons) has no effect.

Clear Button

Clicking on this button causes all stations and frames in transmission to be removed.

Suspend Button

Clicking on this button causes the animation to be suspended. The applet thread that updates the animation is stopped. Stopping the applet thread also occurs anytime the browser leaves this web page. Iconifying the web browser while the browser is viewing the applet's web page does not suspend the animation; the applet's animation thread continues to run in the background.

Resume Button

Clicking on this button causes the animation to resume. The applet thread that updates the animation is restarted. Restarting the applet thread also occurs anytime the browser returns to this web page.

Help Button

Clicking on this button causes a dialog to appear containing a short message about how to use the applet.

Applet Suspension and Termination

The applet (and all of its threads) automatically suspend execution when the web browser moves to another web page. The applet is terminated by clicking on the Close button of the window containing the applet.

Applet Graphics

The applet includes a number of graphical techniques to help in understanding the operation of the protocol. The media access control protocol used by Ethernet is called CSMA/CD (for Carrier Sense Multiple Access/ Collision Detection). The color of a station's rectangle indicates which phase of the protocol the station is currently in. The bottom left corner of the applet's graphical area (canvas) has a legend listing the possible colors and meanings for station rectangles and frame rectangles.

When a station does start transmitting a frame, the frame propagates in both directions along the link so the applet displays two copies of the frame. Each copy of a frame has four attributes: its vertical position within the applet, the speed at which it is propagating along the link, its shape, and its color.


Acknowledgements and Developer Information

Copyright notice (C) Mark A. Holliday. All rights reserved.