Protocols Lab

Champlain College Online

Instructor: Rick Eary

Lecture 8: Data Link – The Ethernet Protocol

Ethernet

The I.E.E.E. 802.3 standard defines Ethernet. IEEE is the Institute of Electrical and Electronics Engineers.

Ethernet is the LAN (local area network) media access and data link protocol in use today. This is not to say that there are not other protocols out there, such as IBM’s Token Ring. Rather, I am saying that the vast preponderance of LAN’s today use Ethernet.

Ethernet attached workstations and servers then are something that we will be working on extensively in the marketplace. For this reason we should have some familiarity with Ethernet protocols.

The 802.3 standard defines both the PHY (physical) aspects of the protocol as well as what is referred to as the MAC (media access control) mechanisms of the protocol.

I’ll touch on each.

Ethernet PHY

There are several different physical layer solutions that can be used with Ethernet. These include: thick coaxial cable, thin coaxial cable, UTP (universal twisted pair), and fiber optics.

Most implementations today utilize UTP for data rates up to 100 Mbps. In fact UTP can support Gigabit and 10 Gigabit Ethernet. The relative distance are 100m and 25m (compared to 300m for 10/100 Mbps Ethernet).

An Ethernet running at 100 Mbps is called "Fast Ethernet" while an Ethernet running at 1,000 Mbps are called "Gigabit Ethernet". If someone says they are running "Ethernet" but does not specify a data rate then we generally assume that they are running at 10 Mbps.

The type of media used will determine the type and quantity of electronic components that are needed to support the implementation.

One difference I have with the author of our text is his apparent infatuation with using Thin Coax for small networks, such as home networks.

Here’s my take on small networks. Use whatever you will be using in the marketplace.

There is too much to learn in this industry. Spending time on old technology to save a couple of dollars is silly, at least in my opinion.

If you are doing it for a sense of history, fine, otherwise get yourself a little hub with fancy status lights for $29.95 and use Category 5 cable.

Ethernet MAC

Ethernet MAC (Media Access Control) scheme is called CSMA/CD (carrier sense multiple access with collision detection). Aren’t you glad you wanted to study protocols?

Let’s take it a step at a time.

Media access control is the mechanism that decides who gets to speak on the LAN at any given instance in time. The LAN is a shared medium and just like a group conversation, nothing much gets communicated if everyone speaks at once. Media access schemes then arbitrate who speaks and who doesn’t.

Carrier sense multiple access with collision detection means that the protocol for gaining access to the media will be based on doing a couple of simple things. (1) Don’t send data when someone else is, and (2) Stop sending data if someone else’s data collides with your data.

It works this way. If my workstation has data to send, the Ethernet protocol first looks out to the LAN to see if someone else is already sending data. This is the carrier sense portion of the protocol. If someone else is sending data then my protocol stack (Ethernet protocol stack of course) waits until the LAN is idle.

When the LAN is becomes idle my workstation is entitled to send. When my workstation does begin to send data my protocol stack continues to listen to the traffic on the LAN. It should only see my data on the LAN. If it sees anything other than my data then a collision has occurred. This is the collision detection portion of the protocol.

When a collision is detected my workstation (the protocol really) will back off some random period of time before it attempts to reinitiate the carrier sense mode.

Of course the other workstation that was also sending data has detected the same collision and will also back of a random period of time.

One logical question is why did my workstation not detect the other workstation's data transmission when the carrier sense part of the protocol was carried out.

One possibility of course is that we both started at exactly the same instant in time.

The other possibility is that since the LAN media has some finite length, it means that my first bit will take some finite amount of time to reach the other workstation. During this interval it is entirely possible for one or more workstations to begin sending data. This is exactly why most collisions occur on an Ethernet.

The probability of collisions increases as network traffic increases.

The multiple access portion of the protocol has to do with the fact that multiple workstations can compete for the bandwidth on the LAN at the same time. However, only one can transmit data, at least successfully, at a time.

You now have an explanation of how Carrier Sense Multiple Access with/ Collision Detection works.

It is very similar to a polite group of people having a conversation. When there is a lull in the conversation everyone feels they have an opportunity to speak.

When one member of the group starts to speak, the other members refrain from speaking. Since the group is very polite, when one member starts to speak he or she also listens to make sure that someone else does not try to speak at the same time.

If this does happen, both speakers back off a random period of time before attempting to speak again. So, when you get right down to it, Ethernet is a very polite and "personable" protocol. :D

 

The Ethernet Frame

Ethernet is a Layer 2 protocol. This means that it only works at Layer 2 and below. The organization of data at Layer 2 is almost always referred to as frames. The frames are packaging of data bits in manner that provides several benefits. Two of these benefits are error correction and addressing.

This is what an Ethernet Frame looks like:

Destination Address

(6 Bytes)

Source Address

(6 Bytes)

Type

(2 B)

Payload

(46 – 1500 Bytes)

CRC

(4 Bytes)

We’re interested in several aspects of this frame or data link structure.

MAC Layer Addressing

First we see that there are address fields, one for the sending node (Source Address) and one for the receiving node (Destination Address). These 6 byte addresses are called MAC addresses.

All MAC addresses are unique and they reside in the NIC (network interface card).

The NIC is the electronic component in a workstation that interfaces with the PHY media of the LAN. (NIC’s are actually found in any piece of equipment which is connected directly to the LAN. This means that servers, printers, routers, etc which are connected to the LAN use a NIC to make this connection.)

In any case, the MAC address in each NIC is "burned in" at the factory and as we mentioned before each one is unique.

MAC addresses provide a way for LAN nodes to communicate with each other. If my workstation has data for your workstation then the data will travel in frames that have your MAC address as the destination address and my MAC address as the source address.

Error Detection and Correction

One of the purposes of packaging our data in frames is to provide error correction. This is how it works. Some data will be placed in the payload. Maybe it is part of a file transfer, or perhaps it is the download of a web page. In both situations some amount of the data being transmitted will be placed in the frame as payload. (Of course if you have more data than 1500 bytes worth the data will be segmented into multiple frames.)

Once the data is placed in the frame the Ethernet protocol performs a mathematical calculation on the data, which results in a number that is 4 bytes long. This number is called the CRC (cyclic redundancy check).

When the data arrives at the destination, the destination’s protocol performs the same mathematical computation. If there were no errors during transmission the destination node should arrive at the same CRC value.

If it does then the data is assumed to have arrived intact. If not then the data is assumed to be in error. When the frame is errored, it is discarded.

More on the Payload

What is in the payload? The simple answer is: "Anything we want to send." As I mentioned above the payload could be part of a file transfer. It might be an email. It could be an IP packet.

The point I’m making is that any data we send over and Ethernet travels in the payload portion of the frame.

One way to look at this is that the Ethernet frame is an envelope, and we can use this envelope to send different types of data.

The only requirement that Ethernet places on the data is:

    1. The data should be between 46 and 1500 bytes in length, and
    2. The data should coincide with byte boundaries. In other words we cannot send partial bytes.

More on Envelopes

Enveloping is something we do often in data communications.

Typically higher layer protocols are "enveloped" or packaged into lower-layer protocol data structures.

The author has a nice graphic on page 41 that illustrates this concept. The "nestable toys" and "boxes in boxes" in figure 2.16 show that TCP packets travel inside IP packets and that IP packets travel inside some data link layer frame such as Ethernet frames. (If we were not on a LAN but were communicating via IP over a dial up connection the frames would most likely be PPP frames.

That’s about it for Ethernet, at least for this lecture.