Ethernet is a link layer computer networking technology. It is the dominant wired LAN technology. It gained its dominance because of its simplicity, cheapness of cost, speed (from introduction to now, it has continually increased in speed bandwidth), and support by multiple vendors.
Ethernet is connectionless (no handshaking), unreliable (no ACKs or NAKs). The multiple access control protocol used by Ethernet is CD with binary backoff.
Physically
Modern Ethernet is now structured around switches.
- There’s an active link layer switch at the centre of the network, i.e., there are point-to-point connections directly between hosts and switches.
- It makes forwarding decisions based on MAC addresses rather than IP addresses.
- Each “spoke” runs a separate Ethernet protocol instance, so that nodes don’t collide with each other. This means each device/switch have an isolated communication channel that operates independently.
Previously, Ethernet used a shared bus where all devices connected to a single coaxial cable. A shared medium meant only one device could transmit at a time and there were frequent collisions.
Frames
Ethernet frames encapsulate network layer datagrams, where:
- The preamble is used to synchronise receiver and sender clock rates. 7 bytes of
10101010followed by 1 byte of10101011. - Addresses are each 6-byte MAC addresses.
- If the adapter receives a frame with a matching destination/broadcast (like ARP) address, it’ll pass the data in the frame to the network layer protocol.
- Otherwise, the adapter discards the frame.
- Type indicates the higher layer protocol. This is typically IP, but others are possible. This is used to demultiplex at the receiver.
- Then, CRC bits are used to check for errors at the receiver. If there’s an error, then the frame is dropped.
In the IEEE 802.3 standard, there’s a lengthfield instead of atypefield. Distinguishing the two is based on length. If it is less than 1500, then it is length. If it is greater than 1536, then it is type.
The end of a frame is not defined by a specific field. It is detected by the absence of a signal.
CSMA/CD
Ethernet uses CD to check for collision detection. It uses the following steps:
- NIC receives datagram from the network layer and creates a frame.
- NIC senses channel.
- If idle, start frame transmission.
- If busy, wait until the channel is idle, then transmit.
- If the NIC transmits the entire frame without collision, the NIC is done with the frame.
- If NIC detects another transmission while sending, abort and send a jam signal.
- After aborting, the NIC enters binary (exponential) backoff.
- After the th collision, NIC chooses at random from .
- NIC waits bit times, then returns to step 2.
- With more collisions, we have a longer backoff interval.
The jam signal makes sure that all other transmitters are aware of the collision. It is 48 bits long.
