What is Ethernet?

In this tutorial, you will learn the concepts of Ethernet. You will also learn about the types, frames, and standards of Ethernet. After reading this tutorial, you will learn why and how Ethernet is used over a network.

Contents:

  1. What is Ethernet?
  2. Classic Ethernet
  3. Classic Ethernet MAC Sub-layer Protocol
  4. Ethernet Frame
  5. Switched Ethernet
  6. Forwarding of Frames via Switch
  7. Fast Ethernet
  8. Gigabit Ethernet

What is Ethernet?

Ethernet is a technology that works at the data link layer and the physical layer. Ethernet is defined by the protocols used at the data link layer and the physical layer.

  • Ethernet uses guided communications such as twisted-pair cables, coaxial cables, and fiber-optic cables.
  • Ethernet is defined in the IEEE 802.2 and IEEE 802.3 standards. It supports 10 Mbps to 100 Gbps data bandwidths.
  • There are two types of Ethernet in today’s networks, Classic Ethernet and Switched Ethernet. Classic Ethernet solves the multiple access problem. In switched Ethernet, the switch connects different computers.

Classic Ethernet

In classic Ethernet, a long cable is used to connect all the computers connected to the LAN. Thick Ethernet is a variation of classic Ethernet. In thick Ethernet, a yellow garden hose with markings every 2.5 meters is used to show where to connect the computer. Thin Ethernet is another type of Ethernet. In thin Ethernet, BNC connectors are used to connect computers. BNC connectors can be easily bent.

  • Thin Ethernet is cheaper and easier to set up than thick Ethernet, but it can only operate up to 180–185 meters per segment, while thick Ethernet runs up to 500 meters per segment.
  • Thin Ethernet can handle 30 computers at a time, while thick Ethernet can handle 100 computers.
  • Repeaters are used and connected to multiple cables to reproduce and re-transmit the signal, which helps to cover large distances.

The diagram below explains the architecture of classic Ethernet.

advertisement
advertisement
architecture of classic Ethernet

As shown in the figure above, multiple computers are connected via Ethernet cable. Also, Ethernet cables have the BNC connector of the coaxial cable, which is used to transmit data from device to device.

Classic Ethernet MAC Sub-layer Protocol

Since multiple devices are connected on the shared channel, there may be a possibility of frame collisions. Hence media access control is used. The MAC sub-layer is the second sub-layer of the data link layer and is responsible for media access control and data encapsulation.

  • IEEE 802.3, 802.11, and 802.15, etc., are the standards used in the MAC sub-layer, the MAC sub-layer is implemented in the device’s hardware.
  • The MAC sub-layer provides the data link layer addressing scheme and is integrated into various technologies such as media in the physical layer.
  • The MAC sub-layer contains specifications for various Ethernet communication standards over a variety of media.
  • Also, it encapsulates the data of IEEE 802.3. IEEE 802.3 data encapsulation covers Ethernet frames, addressing and error detection of Ethernet.

The figure below shows the standards for Ethernet.

Standards of Ethernet

As shown in the above figure, Ethernet works in the data link layer and physical layer. The MAC sub-layer contains specifications for Ethernet communication standards such as Fast Ethernet, Gigabit Ethernet over media such as copper or fiber cable.

Ethernet Frame

Ethernet frames are used at the data link layer. Ethernet frames are transmitted over a channel from the sender to the receiver, according to the addresses of the sender and receiver.

The figure below shows the fields of the Ethernet frame.

Ethernet Frame Fields
  • As shown in the figure, the preamble, destination and source address, type, payload, padding, and error detection mechanism are the fields of the Ethernet frame.
  • Preamble and SFD: The first 8 bytes are the preamble, each with the bit pattern 10101010. The last bit is known as the start of the frame or the frame delimiter. The last bit can be 1, which makes the last two bits 11. The preamble field is used to get the receiver’s attention.
  • Destination and Source Address: The destination and source addresses are 2 bytes. In these, the layer-2 addresses of the sender and receiver are stored.
  • Type: It is of 2 bytes that identify the network layer protocol used in the frame. The Type field also tells the receiver what to do with the frame. A number less than 0x600 (1536) is interpreted as a length, and any number greater than 0x600 (1536) is interpreted as a type.
  • Payload: It contains up to 1500 bytes of data. If the payload field of an Ethernet frame is less than 46 bytes, the padding field is used to make the minimum size frame.
  • Error detection: The error detection field of the Ethernet frame is used to detect errors during transmission. This can be a checksum method or a cyclic redundancy code (CRC).

The below diagram explains the frame processing.

advertisement
Processing of a Frame on a Channel
  • As shown in the figure, PC-1 wants to send an Ethernet frame to PC-4. All the PCs are connected to a switch, so there is no need for an IP address. Instead of the IP address, PC-1 will send the frame using the MAC address.
  • So, PC-1 will send Ethernet frame to channel, the switch will transmit Ethernet frame, so all devices receive Ethernet frame.
  • PC-2, PC-3, and PC-4 will check the destination MAC address with their MAC addresses stored in the NIC.
  • PC-2 and PC-3 will reject Ethernet frames because the MAC address of the Ethernet frame does not match their MAC address.
  • On the other hand, the PC-4 MAC address matches the destination Ethernet frame MAC address, so PC-4 accepts the frame sent by PC-1.

Switched Ethernet

The Switched Ethernet concept has evolved from the single long cable architecture of classic Ethernet.

  • Hubs and switches are used to connect devices on a network. A hub is a central device that electrically connects all connected wires as if they were soldered together.
  • Switches are used to connect devices in the LAN to switch frames from one device to another device.
  • In switched Ethernet, it is easy to add or remove devices, and damaged cables can be easily detected.
  • Hubs do not increase capacity as they are equivalent to a classic Ethernet single cable. If more devices are added, each station is assigned a little bandwidth portion of the fixed bandwidth.
  • We can increase the transmission speed on a LAN by increasing the transmission rate, for example, 10 Mbps to 100 Mbps or 100 Mbps to 1 Gbps. But if media and powerful servers are present on the network, 1-Gbps Ethernet can saturate.
  • With the help of Switched Ethernet, one can deal with the increased load on the network. The switch looks like a hub and has 4 to 48 ports, each with a standard RJ-45 connector for twisted-pair cables.

The figure below shows the structure of an Ethernet switch.

structure of an Ethernet switch
  • The switch looks like a hub, as shown in the figure. A switch is a device that only outputs frames to the ports for which those frames are assigned.
  • Twisted pair cables are connected to switch ports that receive Ethernet frames from a device. When the switch receives the frame, it checks the Ethernet address to see which port it is assigned to.
  • The switch forwards the frame to the destination port at its high speed. The Switch can handle if more than one device wants to send a frame at the same time.

Switch improves performance on a network over a hub in two ways.

  • There are no collisions between Ethernet frames when transmitted from the switch, so the capacity is used more efficiently.
  • Multiple frames can be sent simultaneously by different devices. Frames reach the switch port and travel on the switch backplane to be output to the appropriate port.
  • The switch temporarily stores the received frame in the buffer until it decides the destination.

advertisement

Forwarding of Frames via Switch

It is the responsibility of the switch to forward the frame to the correct destination. If the switch forwards every frame it receives on all ports, the network will be congested and down. An Ethernet switch uses layer-2 addresses (MAC addresses) to forward frames.

  • An Ethernet switch does not know the details of the data contained in an Ethernet frame, it only knows the MAC addresses of the sender and receiver.
  • When devices send frames over the network, the switch learns the MAC addresses of the devices. After learning the MAC addresses of devices, the Ethernet switch stores MAC addresses in the MAC address table.
  • An Ethernet switch dynamically builds a MAC address table of devices by finding and examining the MAC address in the receiving device’s frame on a port.

The diagram below explains Ethernet switching on a network.

Forwarding Frames Through an Ethernet Switch
  • As shown in the figure, 6 devices are connected to the Ethernet switch port. Initially, the MAC address table of an Ethernet switch is empty.
  • Now, PC-1 wants to send the Ethernet frame to PC-5. So, PC-1 sends the Ethernet frame to the switch. An Ethernet switch will check its MAC address table, but the destination MAC address is not present, so the Ethernet switch will add the source MAC address and frame out all ports except the incoming port.
  • An Ethernet switch will filter the frame by examining all port MAC addresses. It finds that the PC-5 has the same MAC address as the source’s Ethernet frame. PC-5 will reply to PC-1.
  • The switch looks for the MAC address of PC-5 in an incoming frame on port 5. The switch adds the PC-5’s MAC address and port number to its MAC address table.
  • Now, if PC-1 sends another frame to PC-5, the switch already has the MAC address for PC-5, sending the frame only out of port 5.

Fast Ethernet

Fast Ethernet is one of the interfaces used in routers and switches to transmit data. Fast Ethernet provides 10 – 100 Mbps speed for transmission.

  • Fast Ethernet is the standard of Ethernet, and it competes with the protocol of local area networks.
  • When Fast Ethernet was released, Fast Ethernet cables with 10 Mbps speed were created. The new Fast Ethernet cable speeds up to 100 Mbps. It is also known as 802.3u, but generally known as Fast Ethernet.
  • The idea of ​​Fast Ethernet was to keep all the old frame formats, interfaces, and procedural rules.
  • It was designed to allow incompatible devices to be connected. For example, a device with a maximum bandwidth of 5 Mbps can communicate with a device that has a bandwidth of 50 Mbps.
  • By using Fast Ethernet, the device can test the capabilities of the hub, and fast Ethernet allows multiple capabilities to a single device.
  • Two or more devices can be connected using Fast Ethernet, forming a point-to-point connection or star topology connection.
  • Fast Ethernet can be used in UTP or STP category 5, UTP category 4, and fiber. It can travel up to 100 meters in twisted pairs and up to 2000 meters in fiber optic cables.

Gigabit Ethernet

The goals of creating Gigabit Ethernet were similar to the goals of faster Ethernet to increase network performance while maintaining compatibility with devices and Ethernet standards.

  • Like Fast Ethernet, Gigabit Ethernet’s configurations use point-to-point links.
  • Gigabit Ethernet supports half-duplex and full-duplex modes of transfer. In normal conditions, it operates in full-duplex mode.
  • Full-duplex mode is used when all devices are connected to a central switch and any device can send or receive frames.
  • Half-duplex mode is used when devices are connected to a hub instead of a switch.
  • Gigabit Ethernet provides transmission speed from 10Mbps – 100 Gbps .
  • Gigabit Ethernet can be classified as a two-wire or four-wire implementation, and it supports both copper and fiber cabling.
  • Fiber-short wave, fiber long-wave, STP, Category 5 UTP Gigabit Ethernet cables are used for travel up to 550m, 5000m, 25m, and 100m, respectively.

Ten-Gigabit Ethernet: The IEEE later created Ten-Gigabit Ethernet and called it as the standard 802.3ae, which upgrades the data rate to 10 Gbps.

  • Ten-Gigabit Ethernet enables existing LANs to be connected to a MAN or WAN. This makes Ethernet compatible with technologies such as frame relay and ATM.
  • The fiber-optic cables used for 10-Gigabit Ethernet can cover distances ranging from 10 meters to 40 km. It has 4 pairs of Twin-Axis and UTP Gigabit Ethernet cables covering 15 meters and 100 meters, respectively.

Key Points to Remember

Here is the list of key points we need to remember about “Ethernet”.

  • Ethernet is a technology that works at the data link layer and the physical layer. Ethernet is defined by the protocols used at the data link layer and the physical layer.
  • There are two types of Ethernet in today’s networks, Classic Ethernet and Switched Ethernet. Classic Ethernet solves the multiple access problem. In switched Ethernet, the switch connects different computers.
  • IEEE 802.3, 802.11, and 802.15, etc., are the standards used in the MAC sub-layer, the MAC sub-layer implemented in the device’s hardware.
  • Preamble, destination and source address, type, payload, padding, and error detection mechanism are the fields of the Ethernet frame.
  • With the help of Switched Ethernet, one can deal with network congestion. The switch looks like a hub and has 4 to 48 ports, each with a standard RJ-45 connector for twisted-pair cables.
  • The switch advertises the frame, learns the MAC addresses of the devices, and dynamically builds a MAC address table.
  • IEEE 802.3u standard is known as Fast Ethernet. Fast Ethernet provides 10 – 100 Mbps speed for transmission.
  • Fast Ethernet can be used in UTP or STP category 5, UTP category 4, and fiber. It can travel up to 100 meters in twisted pairs and up to 2000 meters in fiber optic cables.
  • IEEE 802.3z, 802.3ab, and 802.3ae are the Gigabit standards. Fiber-short wave, fiber long-wave, STP, Category 5 UTP Gigabit Ethernet cables are used for travel up to 550m, 5000m, 25m, and 100m, respectively.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.