What is Ethernet?
Ethernet is how devices on the same wired network talk. Data is put into frames that carry a destination MAC address, a source MAC address, a type and a checksum. Each network card has a MAC address, a 48 bit number written like 3c:22:fb:1a:2b:3c.
A switch sits in the middle and learns which MAC address is on which port by reading the source of every frame. That lets it send each frame only where it needs to go. The same frame format is used by Wi-Fi once frames reach the wired side, so Ethernet is the base of almost every home and office network.
Think of it like this. A switch is like a new receptionist in an office building. At first, when a parcel arrives for someone unknown, they walk it to every room. Each time someone sends a parcel out, the receptionist notes which room they sit in, and soon every parcel goes straight to the right door.
Step by step
Switch learning
4 stepsA switch that just restarted floods the first frame, learns from the reply, then sends to one port only.
Switch learning
4 stepsA switch that just restarted floods the first frame, learns from the reply, then sends to one port only.
- 1
Frame leaves the laptop
Ravi pings Daniel's desktop
The laptop already knows the desktop's MAC address from an earlier ARP. It builds an Ethernet frame with that MAC as the destination and its own MAC as the source, and sends it to the switch on port 1.
- 2
Learn and flood
Unknown destination goes to every port
The switch writes down: 3c:22:fb:1a:2b:3c lives on port 1. It has no entry for the desktop's MAC yet, so it copies the frame out of every other port. This is called unknown unicast flooding.
- 3
Reply teaches the switch
Now it knows port 2
Only the desktop accepts the frame; the others see a MAC that is not theirs and drop it. The desktop's reply comes in on port 2, so the switch learns that MAC too, and already knows the laptop is on port 1.
- 4
Forward to one port
The MAC table is filled
From now on frames between the two go only to the right port. Other devices never see them. Entries expire after about 300 seconds of silence, then the switch learns again.
Broadcast
3 stepsAn ARP question goes to every port, but only one device answers.
Broadcast
3 stepsAn ARP question goes to every port, but only one device answers.
- 1
Who has this IP?
ARP request to everyone
Ravi's laptop knows the desktop's IP, 192.168.1.20, but not its MAC. It sends an ARP request to the broadcast MAC ff:ff:ff:ff:ff:ff.
- 2
Switch copies it everywhere
Broadcasts always flood
A switch never learns a broadcast address, so it sends the frame out of every port except the one it came in on. Every device in the same network, called a broadcast domain, reads it.
- 3
One answer
Only the owner replies
Only the desktop owns 192.168.1.20. It sends an ARP reply straight back to the laptop's MAC, as a normal unicast frame. Routers stop broadcasts, which is why big networks are split into VLANs or subnets.
Damaged frame
3 stepsA loose cable flips some bits, the checksum fails and the switch drops the frame.
Damaged frame
3 stepsA loose cable flips some bits, the checksum fails and the switch drops the frame.
- 1
Noise on the wire
A few bits flip
The laptop sends a frame to the file server, but a damaged cable or loose plug corrupts some bits on the way to the switch.
- 2
Checksum fails
Frame check sequence mismatch
Every Ethernet frame ends with a 4 byte CRC called the frame check sequence. The switch recomputes it, gets a different number and silently drops the frame. It counts it as a CRC error on that port.
- 3
Recovery is not Ethernet's job
TCP sends it again
Ethernet only detects damage, it never resends. The file copy runs over TCP, which notices the missing data and sends it again. A port with many CRC errors usually means a bad cable.
Myths and mix-ups
- A switch does not send every frame to every port; that was the old hub. It only floods broadcasts and unknown addresses.
- A MAC address is not proof of identity; most systems let you change it, and phones now use random MACs on Wi-Fi.
- Ethernet does not resend damaged frames; it only drops them, and TCP or the app has to recover.
- Collisions do not happen on modern full duplex switched links; that was a problem of shared coax and hubs.
- A faster cable rating does not speed up your internet if your internet plan is the slow part.
Try it yourself
Run these on your own computer to see Ethernet at work.
See your MAC and link speed (Linux)
ip link showlink/ether is your MAC. For speed, try: ethtool eth0 (name may differ).
See error counters (Linux)
ip -s link showRX errors that keep growing often mean a bad cable.
MAC addresses you learned (any OS)
arp -aLists IP to MAC pairs your computer has seen on the local network.
Your MAC (Windows)
getmac /vShows each adapter with its physical address.
Your MAC (macOS)
ifconfig en0 | grep etheren0 is often Wi-Fi on laptops; try en1 or others for a wired adapter.
Ethernet at a glance
- Layer
- Data link (2) and physical (1)
- Address
- 48 bit MAC address
- Frame size
- 64 to 1518 bytes (1522 with a VLAN tag)
- Payload (MTU)
- Up to 1500 bytes, jumbo frames up to about 9000
- Common speeds
- 100 Mbit/s, 1, 2.5, 10 Gbit/s and more
- Error check
- 32 bit CRC (frame check sequence)
- Invented
- 1973 at Xerox PARC, standard since 1983
- Defined in
- IEEE 802.3, switching in IEEE 802.1D and 802.1Q
Defined inIEEE 802.3IEEE 802.1DIEEE 802.1Q
Header fields
What Ethernet puts in its messages, with example values from the stories above.
Ethernet II
- Destination MAC
00:11:32:aa:bb:ccThe switch looks this up in its MAC table to pick the outgoing port.- Source MAC
3c:22:fb:1a:2b:3cThe switch notes which port this address came from. That is how it learns.- EtherType
0x0800 (IPv4)Tells the receiver an IPv4 packet is inside.- Frame check sequence
0x9e1d07b4 (expected 0x3f6c22a8)The switch's own calculation gives a different number, so it knows the frame was damaged.
Switch port counters
- Port
1- CRC errors
1This number keeps rising on a bad cable. You can see it with ip -s link or on the switch's admin page.
Test yourself
How does a switch learn which port a device is on?
Questions people ask
What is the difference between Ethernet and Wi-Fi?
Ethernet sends frames over a cable; Wi-Fi sends them over radio. Both use 48 bit MAC addresses, and an access point turns Wi-Fi frames into Ethernet frames on the wired side.
What is a MAC address?
A 48 bit hardware address that identifies a network card on the local network, written as six pairs of hex digits. It only matters inside your local network; routers do not pass it on.
What is the difference between a switch and a hub?
A hub repeats every frame to every port. A switch learns where each MAC address lives and sends frames only to the right port, which is faster and more private.
How long does a switch remember a MAC address?
Most switches forget an entry after about 300 seconds without traffic from it. The next frame from that device teaches it again.
Why is the minimum Ethernet frame 64 bytes?
The old shared cable design needed frames long enough to detect collisions. The rule stayed, so short frames like ARP are padded to 64 bytes including the checksum.