Here is an uncomfortable truth about network security. The vast majority of the defences we build, and that I have written about across this series, operate at the upper layers. Firewalls inspect packets at the network and transport layers. TLS encrypts at the session level. Intrusion detection watches traffic flows and logs. All of it, almost without exception, assumes that the two layers underneath, the physical wire and the Ethernet link, are honest.
That assumption is exactly what a Layer 1 or Layer 2 attacker exploits. These are the quietest attacks in the entire stack, and the reason is structural: they happen below the altitude where your monitoring is looking. Your SIEM is watching logins and connections. Your firewall is inspecting traffic crossing the edge. But an attacker sitting inside the local segment, forging Ethernet frames and lying about MAC addresses, is beneath all of that. The traffic is not malformed. Nothing is technically broken. The attacker is simply telling a lie in a language your upper-layer tools never listen to.
This post is a defender's deep dive into that invisible layer. We will go through the main ways a network gets compromised at Layer 1 and Layer 2, exactly why each one evades notice, and then, in real and practical detail, the controls that catch and stop them. That second half is the part that matters, and it is squarely CCNA and real-world security territory. By the end you will understand not just how these attacks work, but why so many networks remain silently open to them, and what closes the door.
A note on intent before we start: this is written for the person building and defending the network. The focus throughout is on understanding and detection, the knowledge you need to spot these attacks and shut them down, not a recipe for carrying them out.
Why the Bottom of the Stack Is the Blind Spot
To understand why these attacks are so quiet, you have to hold one idea clearly: most security lives above Layer 2, and it trusts Layer 2 completely.
Think back to the OSI model. Layer 1 is the physical layer, the actual electrical or optical signal on the cable. Layer 2 is the data link layer, where devices on the same local network talk using MAC addresses and Ethernet frames. Everything above, IP addresses, ports, TLS, HTTP, is built on top of the assumption that frames arriving on the local segment are genuine and that the wire itself has not been tampered with.
Nothing in classic Ethernet or its helper protocols authenticates anything. A switch believes the source MAC address in a frame. A device believes an ARP reply. A host believes the DHCP server that answers first. As we saw in the quiet-protocols post of the main series, these local protocols were built for a small, trusting world, and that trust was never removed. So an attacker who gets a foothold on the local segment, physically or through a compromised device, can lie at this layer and be believed, while every tool watching the layers above sees nothing wrong, because at the frame level, nothing is wrong. The deception is perfectly legal Ethernet.
That is the whole reason this category stays invisible. Now let us look at the specific attacks, from the physical wire upward.
Layer 1: Tapping the Physical Wire
The most fundamental attack is also the hardest to detect, because it happens before the network logic even begins. If an attacker can touch the physical medium, they can potentially copy the traffic on it.
A network tap is a device placed inline on a cable that copies the signal passing through it. A passive tap, in particular, splits the optical or electrical signal without altering it in any way. The original traffic continues completely undisturbed, and a copy is sent to the attacker. This is the crucial point: because a passive tap changes nothing about the signal, timing, or behaviour of the link, it is essentially undetectable from the network side. There is no dropped packet, no latency spike, no log entry. The data simply flows to one more place than it should.
Physical access gives other quiet options too. An unused but live wall port in a reception area or meeting room is an open door onto the internal network. An unlocked network cabinet lets someone add a device. A small implant between a device and its port can sit there for a long time. None of these require breaking any software; they exploit the fact that physical security is often the weakest and least monitored part of a network.
This is why physical controls are genuine security controls, not an afterthought: disabling unused switch ports, locking cabinets and comms rooms, controlling access to cabling, and treating any unexplained device on the network as hostile. At Layer 1, the defence is substantially physical, because the attack is.
Layer 2, Attack One: MAC Flooding and CAM Table Overflow
Now we climb to the data link layer, and the first attack targets the switch's own memory.
A switch learns which devices are on which ports by recording source MAC addresses in a table, often called the CAM table or MAC address table. When a frame arrives for a known MAC, the switch sends it only out the correct port. This efficiency is the whole point of a switch, and it is also what normally stops one device from seeing another's traffic.
The attack is to overwhelm that table. In MAC flooding, the attacker sends a flood of frames, each with a different fake source MAC address. The table has a finite size, and once it fills completely, many switches respond by failing open, reverting to behaving like a hub and broadcasting incoming frames out of every port. The moment that happens, the attacker begins receiving traffic destined for other devices, quietly, because from every user's perspective nothing has changed. Their connectivity is fine. They have no idea their traffic is now being broadcast to a listener.
The defence: port security. Port security is a switch feature that limits how many MAC addresses are allowed to be learned on a single port. A normal access port has one device, or a few, behind it, so you cap the number of permitted MAC addresses. When the attacker's flood of fake addresses exceeds that limit, the port reacts according to its configured violation mode. The modes are worth knowing precisely, because they come up directly in the CCNA: shutdown (the default) disables the port entirely and puts it in an error-disabled state, restrict drops the offending frames and logs the violation while keeping the port up, and protect silently drops the offending frames with no logging. Shutdown is the safest default, because it fails closed. With port security in place, the flood never gets to fill the table, because the port stops it at a handful of addresses.
Layer 2, Attack Two: ARP Spoofing, the Silent Middleman
This is the classic Layer 2 attack, and it is the quietest man-in-the-middle in networking.
Recall how ARP works: when a device needs the MAC address for an IP on the local network, it broadcasts "who has this IP," and the owner replies with its MAC. The fatal flaw is that ARP has no authentication whatsoever, and worse, most systems accept ARP replies even when they never sent a request, so-called gratuitous replies. So an attacker on the segment simply sends forged ARP replies announcing that their own MAC address belongs to the IP of the default gateway. Every device that hears it updates its ARP cache, and now sends all its internet-bound traffic to the attacker instead of the real router.
Why is this so silent? Because the attacker forwards the traffic on to the real gateway afterwards. To the victims, everything works perfectly. Pages load, connections succeed, nothing times out. There is simply an invisible middleman reading, and potentially altering, everything in between. No alarm fires, because at the Ethernet level, the forged reply is a completely valid ARP packet. The lie is legal.
The defence: Dynamic ARP Inspection, built on DHCP snooping. This is one of the most elegant defences in the Layer 2 toolkit, and understanding it means understanding how two features work together.
First, DHCP snooping watches the DHCP process and builds a binding table: a trusted record of which IP address was legitimately given to which MAC address, on which VLAN, and through which switch port, along with the lease time. It learns this by watching the DHCP exchange complete, taking the assigned IP and the client's MAC straight from the DHCP messages. In effect, the switch builds a verified map of who legitimately holds which address.
Then Dynamic ARP Inspection (DAI) uses that map to police ARP. On untrusted ports (access ports, where users live), DAI inspects every ARP packet and checks it against the DHCP snooping binding table. It verifies that the sender's MAC and IP actually match a legitimate binding, and that they arrived on the right port. If an attacker sends a forged ARP reply claiming the gateway's IP with their own MAC, DAI looks it up, finds that this MAC-to-IP pairing was never legitimately assigned, and drops the packet, logging the violation to syslog. The forged reply never reaches its victims. The silent middleman is caught precisely because the switch now has an independent, trusted record of the truth, and the attacker's lie does not match it.
This is also a perfect illustration of the series' core theme: the protocol itself cannot verify truth, so the infrastructure has to vouch for it. DHCP snooping establishes the truth, and DAI enforces it.
Layer 2, Attack Three: DHCP Attacks
DHCP, the protocol that hands out IP addresses, is a target in two related ways, and both are quiet because DHCP, like ARP, trusts whatever it hears.
In DHCP spoofing, the attacker runs a rogue DHCP server on the segment and races to answer clients' requests before the real server does. If the attacker's answer wins, they get to set the victim's network settings, and the dangerous part is that they can set the default gateway and DNS server to addresses they control. Now every packet the victim sends toward the internet goes through the attacker first. It is another path to becoming the silent middleman, established before the victim has even finished connecting.
Often this is paired with DHCP starvation, where the attacker first floods the real DHCP server with a storm of requests using many different spoofed MAC addresses, exhausting its entire pool of available addresses. With the legitimate server starved and unable to answer, the attacker's rogue server is the only one left to respond.
The defences: DHCP snooping and port security together. DHCP snooping, the same feature that underpins DAI, stops spoofing directly. It classifies switch ports as trusted or untrusted. Only ports where a legitimate DHCP server is known to live are trusted and allowed to send DHCP server responses such as offers and acknowledgements. Every user-facing access port is untrusted, and untrusted ports are only permitted to send client messages like requests. If a DHCP server response ever appears on an untrusted port, which is exactly what a rogue server plugged into a normal port would produce, the switch blocks it, and typically err-disables the port. The rogue server is silenced before it can poison a single client. And DHCP starvation, which depends on flooding many spoofed MAC addresses, is blunted by the same port security from the MAC-flooding defence: capping the MAC addresses allowed per port stops one attacker from generating the thousands of fake identities the starvation flood requires.
Layer 2, Attack Four: VLAN Hopping
VLANs are how we segment one physical switch infrastructure into separate logical networks, and as we noted in the firewall and defence-in-depth post, segmentation is a core containment control. VLAN hopping is the attack that quietly defeats it, letting an attacker reach a VLAN they are supposed to be isolated from. There are two methods, and both are quiet because the frames involved look legitimate to the switch.
Switch spoofing abuses automatic trunk negotiation. Switch ports can negotiate whether to become a trunk (carrying all VLANs) using a protocol called DTP, and many ports are left in a mode that will happily form a trunk if asked. The attacker's device pretends to be a switch and negotiates a trunk link. Once it succeeds, the trunk carries traffic from every VLAN straight to the attacker. The segmentation is simply bypassed, silently, because forming a trunk is normal switch behaviour.
The defence is to disable that automatic negotiation. Any port connected to an end device should be hard-configured as an access port with trunk negotiation (DTP) switched off, so it can never be talked into becoming a trunk. Unused ports should be shut down and placed in an unused VLAN.
Double tagging is subtler and exploits how the native VLAN works on a trunk. The attacker crafts a frame with two VLAN tags: an outer tag matching the trunk's native VLAN, and an inner tag for the target VLAN they want to reach. The first switch sees the outer tag, strips it off because it matches the native VLAN (native VLAN traffic is sent untagged), and forwards the frame. The second switch then sees the inner tag and delivers the frame into the target VLAN. The attacker has reached across a VLAN boundary. It is a one-way trick, useful for sending an attack into another VLAN rather than a full two-way conversation, but it is quiet and effective.
The defence rests on the native VLAN. Because the attack depends on the attacker sitting in the same VLAN as the trunk's native VLAN, the fix is to make the native VLAN of every trunk a dedicated, unused VLAN that no actual user is placed in. If no user shares the native VLAN, no user can launch the attack. Hardening the native VLAN, along with careful VLAN access controls, closes this door.
802.1X: Authenticating the Port Itself
Underneath all of these specific defences sits a more fundamental idea, and it is where Layer 2 security meets the Zero Trust thinking that closes the main series. Most of the attacks above begin the same way: an unauthorised device gets onto the network, physically or logically, and is trusted simply because it is connected. What if a device had to prove its identity before the switch port would carry any of its traffic at all?
That is 802.1X, port-based network access control, and it attacks the root of the problem. With 802.1X, a switch port stays closed to normal traffic until the device connecting to it authenticates successfully. The model has three roles worth knowing: the supplicant (the device trying to connect, running software that provides its credentials), the authenticator (the switch itself, which guards the port), and the authentication server (typically a RADIUS server that actually checks the credentials). The device presents credentials, the switch passes them to the RADIUS server, and only if the server approves does the port open and allow the device onto the network. Until then, the port carries nothing but the authentication conversation.
This is powerful precisely because it removes the implicit trust that every Layer 2 attack relies on. A rogue device plugged into a wall port cannot flood MACs, spoof ARP, run a rogue DHCP server, or attempt VLAN hopping, because the port never opens for it in the first place. It never got to speak. 802.1X is the clearest expression, at Layer 2, of the principle this whole series arrives at: stop trusting something just because it is physically inside the network, and make everything prove itself.
The Modern Age: What Has Changed, and What Has Not
Your question had a sharp edge to it, how this happens "in the modern age," and the honest answer cuts both ways.
On the defender's side, one modern reality genuinely helps: pervasive encryption. Because the overwhelming majority of web traffic now travels over HTTPS and TLS, as we covered in depth in the main series, an attacker who silently intercepts traffic at Layer 2 often finds that the contents are encrypted and unreadable. The sealed envelope holds even when the postman is a thief. This meaningfully reduces the payoff of passive eavesdropping compared to fifteen years ago, when so much traffic was plaintext. Today, a Layer 2 man-in-the-middle position is more often a stepping stone, a place to launch a more targeted attack, than a simple way to harvest everyone's secrets wholesale.
But the other side of the modern reality is less comforting, and it is the real answer to why these attacks still succeed quietly. Every defence in this post, port security, DHCP snooping, Dynamic ARP Inspection, VLAN hardening, 802.1X, is a feature that must be deliberately turned on and configured correctly. None of them are on by default across a network. And in an enormous number of real-world networks, they simply are not enabled. The access layer, the switches users plug into, is too often left as the trusting soft centre we warned about in the defence-in-depth post. The attack stays invisible not because it is undetectable in principle, but because the specific controls that would have detected it were never switched on.
That is the lesson worth carrying. These attacks are quiet because of trust: the trust that classic Ethernet extends to anything on the local segment, and the trust that administrators extend by assuming the inside of the network is safe. The defences are not exotic. They are well-understood switch features, taught in the CCNA, that systematically replace that blind trust with verification. Enable them, and the quiet attacks stop being quiet.
What You Now Understand
You asked how a network gets hacked at Layer 1 and Layer 2 without anyone noticing, and now you can answer it precisely.
It stays invisible because these attacks live below the altitude where firewalls, TLS, and monitoring are looking, in a layer where classic Ethernet authenticates nothing and trusts everything on the segment. At Layer 1, a passive physical tap copies traffic while changing nothing detectable, which is why physical security is a real control. At Layer 2, MAC flooding overflows the switch's table to turn it into a hub, ARP spoofing forges replies to become a silent middleman, DHCP spoofing and starvation hand out poisoned settings from a rogue server, and VLAN hopping crosses segmentation boundaries that were supposed to contain the attacker. Each is quiet because, at the frame level, nothing is malformed. The deception is valid Ethernet.
And you understand the defences in practical detail. Port security caps MAC addresses per port and stops both flooding and starvation. DHCP snooping builds a trusted binding table and blocks rogue servers on untrusted ports. Dynamic ARP Inspection uses that table to catch forged ARP and drop it. VLAN hardening, disabling DTP and isolating the native VLAN, closes both forms of VLAN hopping. And 802.1X goes to the root, refusing to open the port at all until a device proves its identity. Every one of them works by the same move: replacing the implicit trust these attacks depend on with explicit verification.
Which is, in the end, the same truth the whole Networking Foundations series keeps arriving at, now at the very bottom of the stack. The internet, and the local network, were built for connection, not control. Security is the discipline of adding back the verification that the original design left out. At Layer 1 and Layer 2, that discipline is a set of switch features and a locked cabinet door, and the networks that get quietly hacked are the ones that never turned them on.
This was a standalone deep dive, a companion to my Networking Foundations series. If it made the invisible layer visible, share it with someone who secures networks, or who is studying for their CCNA. The main series builds all of this from the ground up: start with Post 1 on what a network actually is, and the post on the quiet protocols covers ARP and DHCP in depth. Subscribe to our newsletter for more.





