Wednesday, 31 May 2017

Ethernet (IEEE 802.3)

 

In this post, we will discuss IEEE 802.3 standard which is ethernet. I will not go to advanced topics like metro Ethernet or business Ethernet, it will only be the basics of Ethernet which will help you to get started with advanced topics.


A bit of history:

Ethernet was developed at Xerox PARC between 1973 and 1974. It was inspired by ALOHAnet, which Robert Metcalfe had studied as part of his PhD dissertation. It was standardised in 1980 by IEEE. While Robert Metcalfe was doing his PhD in ALOHAnet, he found certain drawbacks in ALOHA network. There was no mechanism to detect collisions in pure ALOHAnet which dropped down its efficiency to 18.4%. Then he found slotted ALOHAnet which had an efficiency of 36.8%.

He somehow wanted to improve this. In this process of research, he went on discovering a new access control method called CSMA/CD. Metcalfe also developed a more sophisticated back off algorithm. This algorithm with CSMA/CD increased the efficiency of ALOHA to 100% and that's where Ethernet was born.

Ethernet frame format:

The following diagram shows the format of the Ethernet frame:


Before we go further and discuss the fields let's see how we got the frame the way it is. Actually, the preamble is not the part of the frame. Frame, as we know, is a data link layer entity but preamble is added at the physical layer. Addressing & length is data link layer header and CRC forms the data link layer trailer. 
When the frame format was initially introduced it didn't have the preamble part. Instead, it had only 1 byte called (SFD)start frame delimiter. SFD was 10101011. Start frame delimiter tells the stations on the way that a frame is starting and you should get ready to read the data. The reason for SFD to be 10101011 is that it should not match with any part of the data.
But soon researchers found that SFD could match with data, so they introduced preamble. It is 7 bytes of a continuous sequence of 10 (i.e 101010...). With 7 bytes of 10, it was less likely to match any part of data and hence it's successful till now. Now let's define each of these fields.
  • Preamble: It is 7 bytes long, and is an alternating sequence of 10 (i.e 101010....). It is mainly used for synchronisation purpose. (This is not important: At the physical layer, we implement the concept of clocks. Whenever two parties want to communicate they should have a synchronised clock. Because of the clock, their data is not interpreted wrongly).
  • SFD: It is 1 byte long, and is 10101011. The 11 at the end denotes that SFD has ended and now the actual frame starts. It is used to denote the start of the frame.
  • Destination address: It is 48-bit MAC address of the station to which the frame has to be delivered. 
  • Source address: It is 48-bit MAC address of the station who transmits the frame. Remember the source address has to be a unicast address.
  • Length: This gives the total length of the frame. As there are 16 bits in the length field, it means the maximum length of the frame can be only 65536. The standard length of the frame (from destination address to CRC) is 64 bytes. This is derived from the formula:                                                                                L >= 2 * Tᵨ * bandwidth
  • Data: It is the content that needs to be transmitted. 


    Minimum
    Maximum
    Data
    46 bytes
    1500 bytes
    Frame
    72 bytes
    1526 bytes
  • CRC: It is called as cyclic redundancy check. It is used by the receive to identify any errors in the packet. The reason for it to be kept at the end is that by the time the entire packet passes through the data link layer CRC would have been calculated. And so we keep CRC at the end of the frame (This topic is discussed in depth in the error control topic).

Important points:

  1. The topology used in Ethernet was Bus topology but now it is star topology.
  2. Access control method used is CSMA/CD.
  3. Ethernet does not have acknowledgements. But if the user wants it, he/she can implement it at the application layer.
  4. The encoding used is Manchester. Where baud rate is 2 * bit rate.
  5. Depending on the data rate Ethernet has 3 categories. 
  • 10 Mbps is Standard ethernet.
  • 100 Mbps is Fast ethernet.
  • 1 Gbps is Gigabit ethernet.
Hope this was helpful. Leave your questions, answers & suggestions in the comment section below. And if you learnt anything from this post make sure to like us on Facebook and follow on Google+.

Thank you!