Network equipment, domains, and layers
The deeper a device looks into headers, the smarter it manages traffic. Compare how a repeater works at the signal level (L1), a switch by MAC table (L2), and a router by subnet table (L3).
Network Interface Cards (NIC), transceivers, and repeaters (L1–L2)
In a network, one can distinguish user devices (PCs, printers, servers) and network devicesproviding transport.
- Network Interface Card (NIC): operates at OSI layers 1 and 2. It interfaces the PC system bus (PCIe, USB, or motherboard-integrated) with the communication medium, has a unique MAC address, controller, ports (RJ-45, SFP, historical BNC/AUI), and LED indicators.
- Transceiver and Media Converter: transmits and converts signals (e.g., electrical ↔ optical via pluggable modules SFP / SFP+ with a laser and photodetector).
- Repeater (L1) and Hub (L1): do not read addresses and do not check CRC. A repeater (2 ports) restores the shape and amplitude of an attenuated signal; a hub is a multi-port repeater (4–24 ports) that duplicates the signal from the input to all other ports. All hub ports form one common collision domain.
Bridge and Switch (L2): MAC learning and microsegmentation
Switch = switch (English and Russian name for the same device). Bridge Wi-Fi 6 Switch operate at the data link layer (L2): a bridge usually has 2–4 ports and switches via software, while a switch is a multi-port bridge with hardware-based switching on an ASIC.
- Learning: upon receiving a frame, the switch looks at the source MAC and records the pair
MAC → Ingress portin the switching table (CAM table). - Forwarding: by destination MAC: if the address is known, it sends it strictly to one port; if unknown (Unknown Unicast) or
FF:FF:FF:FF:FF:FF(Broadcast), it broadcasts to all ports of the same VLAN, except the input port. - Microsegmentation: each switch port is a separate collision domain. With Full-Duplex, collisions disappear completely.
- VLAN and STP: VLANs logically divide one switch into isolated broadcast domains. When connecting switches in a ring (for redundancy), the protocol STP blocks the redundant link, preventing a broadcast storm (L2 loop).
Why does a computer search for the MAC itself (ARP) instead of letting the Switch do this work?
A computer, a standard switch, and a router have different tasks and different tables — a standard L2 Switch does not analyze IP addresses when switching frames.
| Device | Responsible for | Stores table |
|---|---|---|
| Computer | Knows the destination IP and searches for the recipient's (or gateway's) MAC via ARP | ARP table: IP → MAC |
| Switch (L2) | Remembers sender MAC addresses and their corresponding ports | MAC table (CAM): MAC → Port |
| Router (L3) | Determines which IP network (via which interface) to send a packet to | Routing table: Network/Mask → Interface/Gateway |
The computer determines to whom to send data (MAC by IP), and the switch determines via which physical port to send the already prepared Ethernet frame.
Router (L3), Firewall, NAT, and Gateway (L3–L7)
Router (L3) connects different IP networks (and different L2 technologies: Ethernet, Wi-Fi, WAN optics). It does not pass broadcast frames beyond its interface — that is, it divides the network into separate broadcast domains.
- Packet processing: removes the incoming L2 frame → checks the destination IP in the routing table → decrements
TTLby 1 and recalculates the IP header checksum → encapsulates the packet into a new L2 frame for the next segment (IPs do not change, MACs are rewritten at each step!). - Gateway: in the narrow sense on a PC default gateway — is the local IP of the router for accessing external networks (on routers, the route
0.0.0.0/0is called gateway of last resort). In the broad OSI sense, a gateway operates up to layer 7, converting incompatible protocols and formats. - Firewall and NAT: a firewall filters packets/connections based on security rules; NAT rewrites private local IP addresses into a public address at the border with the Internet (standard routing within a network works without NAT).
Summary table: collision and broadcast domains
| Device | OSI Layer | What it analyzes | Collision domains | Broadcast domains |
|---|---|---|---|---|
| Repeater / Hub | L1 (Physical) | Electrical/optical signal only | Does not divide (all ports = 1) | Does not divide |
| Bridge / Switch | L2 (Data Link) | MAC addresses and VLAN tags | Divides (1 port = 1 domain) | Does not divide (unless VLANs exist) |
| Router | L3 (Network) | IP addresses and routing table | Divides | Divides (1 interface = 1 domain) |
| Home Wi-Fi router | L1–L4 (combo) | Switch (LAN) + Access Point + Router + NAT + DHCP | Divides on each port | Divides between LAN and WAN |