A network switch connects devices on a local computer network and forwards Ethernet frames toward the appropriate destination ports. If you are wondering what a network switch does, how an Ethernet switch works or whether you need a switch or router, the crucial idea is selective forwarding: the switch learns where devices are reachable instead of indiscriminately sending every ordinary frame everywhere.
An Ethernet switch uses link-layer information, particularly source and destination media access control addresses, to build a forwarding table. It can give classrooms, homes, offices and data centres more wired connections while keeping separate conversations from using every port. Managed switches can also support virtual local area networks, monitoring and other controls. They do not by themselves supply internet access, assign meaningful application permissions or make data confidential.
This guide explains switching from first principles, including MAC address learning, unicast, broadcast, unknown destinations, Ethernet frames, VLANs, switching capacity, loops, spanning tree, routers, wireless access points and real troubleshooting. It includes a complete worked forwarding-table example and a carefully unit-checked transfer-time calculation so students and tutors can test whether they understand the mechanism rather than memorising a diagram.
Begin with a room full of devices
Imagine three computers and a printer. Each has a network interface that can send and receive frames. If the computers are plugged into a basic Ethernet switch, the switch becomes a meeting point for the physical links. It observes a frame arriving from one interface and decides which link or links should carry it onward. Its job is not to read the student’s essay or understand the printer’s document.
The physical picture matters: a cable connects each device to a switch port, not one giant shared wire. Modern switched Ethernet normally provides a separate point-to-point connection per port. This allows conversations on different ports to proceed at the same time, subject to the device’s architecture, link capacities and traffic patterns. Start by distinguishing this physical arrangement from the higher-level idea of a website or internet service.
What is an Ethernet frame?
A frame is the data-link unit transmitted across a local Ethernet segment. It carries a destination MAC address, a source MAC address, information identifying or encapsulating the payload, and an error-detection field. A packet is a common term at the network layer, particularly for an Internet Protocol datagram; a frame may contain a packet as payload. Mixing these words hides which layer is making a decision.
The Ethernet frame-check sequence helps detect corruption on a link. A typical ordinary switch forwards on the basis of link-layer fields and switching policy, not by interpreting the entire web page inside the payload. Remembering the frame boundary also clarifies why replacing a switch need not change a computer’s IP address, while changing routers or IP configuration may alter where traffic can travel.
MAC addresses and where they matter
A MAC address is an identifier used within a link-layer addressing system. Ethernet interface addresses are often written as six bytes in hexadecimal, for example 02:11:22:33:44:55. Such an example is illustrative, not a guarantee that a manufacturer’s printed address will never change. Modern devices may use locally administered or randomised MAC addresses in some situations, particularly on wireless networks.
The switch usually needs the destination MAC address to choose an egress port. It also watches the source MAC address to learn where a sender is reachable. A MAC address does not encode a person’s identity, a street address or the correct internet route. It is an input to local forwarding, and its practical significance depends on the VLAN and topology in which the device is operating.
How source-address learning works
When a valid frame arrives on a port, a learning bridge can associate the source MAC address with that port within the relevant forwarding domain. The entry belongs to a forwarding database, commonly called a MAC or CAM table in operational discussions. On later frames for that destination, the switch can use the learned association to choose an output port. Learning happens by observing sources, not by receiving a master map of every device.
Entries generally age out after inactivity, and a moving device may be relearned on another port. The switch therefore adapts to an ordinary classroom where a computer changes desk. A stale entry or sudden MAC movement can also be a diagnostic clue. The basic principle is evidence from observed traffic: location is inferred from where a sender’s frame entered the switch.
Three outcomes: known unicast, unknown unicast and broadcast
If the destination MAC address is known in the same VLAN, the switch forwards a unicast frame to the associated appropriate port, rather than all other ports. If the destination is unknown, ordinary transparent bridging can flood the frame to eligible ports in that VLAN except the incoming port. If the destination is Ethernet broadcast, the frame similarly reaches the relevant broadcast domain.
Flooding is not the same as permanent hub-style repetition. Once replies allow source-address learning, later unicast traffic can become selective. Special multicast rules and switch features can modify forwarding in particular cases. A useful tutor question is: “What does the switch know at this exact moment?” The answer depends on which frames arrived earlier, not solely on which cables are attached.
Worked example: make a MAC learning table
Take a four-port switch. On VLAN 10, computer A is on port 1, computer B on port 2 and computer C on port 3. Port 4 is assigned to VLAN 20 for another device. Initially the VLAN 10 forwarding table is empty. A sends a unicast frame addressed to B. The switch learns A → port 1 because A is the source. B’s address is not yet known, so the switch floods eligible VLAN 10 ports 2 and 3; it must not flood that VLAN 10 frame into access port 4 assigned to VLAN 20.
B replies from port 2 to A. The switch learns B → port 2 and, because it already knows A → port 1, forwards the reply only toward port 1. A sends again to B. Now the switch sends the frame only toward port 2. The initial flooding was a discovery consequence, not a permanent rule. The VLAN 10 table now contains A → 1 and B → 2; it has not yet learned C’s address merely because C is plugged in.
What a VLAN really separates
A virtual local area network divides a switched network into separate logical layer-two forwarding domains. Devices can share the same physical switch yet occupy different VLANs. Ordinary broadcast and unknown-unicast forwarding remains within the relevant VLAN according to the switch configuration. A VLAN can express useful administrative boundaries between classroom devices, office equipment or guest connections.
A VLAN number is not an encryption key. Frames on a VLAN are not automatically confidential from administrators or compromised endpoints, and VLAN membership does not replace authentication or appropriate firewall policy. Two devices in different VLANs may communicate through an approved router or layer-three switch when routing rules permit it. Separation must therefore be designed across both link and network layers.
Access ports and tagged trunk links
An access port commonly carries traffic for one assigned VLAN toward a simple endpoint. An inter-switch link may carry several VLANs using tagged Ethernet frames. IEEE 802.1Q defines VLAN-aware bridging and associated mechanisms; a VLAN tag conveys information used by compatible network equipment. The presence or absence of a tag on a wire depends on configured port behaviour, not merely the device type.
A teaching diagram should show two switches connected by one trunk carrying multiple VLANs, while individual student computers use access ports. If the permitted VLAN list differs at either end, some traffic may disappear even when cable lights are on. Likewise, a VLAN mismatch can create unexpected connectivity. The diagnostic question is whether both devices agree on the same forwarding domain.
Learning is usually scoped to a VLAN
Two devices in different VLANs may use identical-looking MAC address values without requiring the switch to combine all forwarding information into one unrestricted domain. VLAN-aware forwarding decisions take account of the relevant VLAN context. A table shown without its VLAN column may therefore conceal an essential fact. This is why professional troubleshooting commands often display both VLAN and port.
A student may be tempted to infer “the destination is on port 4” from a displayed address alone. The correct conclusion is “the destination is on port 4 in the context of this VLAN or forwarding instance”, if that is what the evidence shows. Context prevents a diagram from making the entire switch seem like one undifferentiated broadcast space.
Switch versus hub
A classic Ethernet hub is essentially a physical-layer repeater: it repeats signals rather than maintaining a MAC forwarding table and deciding which destination link should receive a known unicast frame. That design creates one shared medium with different practical collision behaviour from ordinary full-duplex switched Ethernet. A modern switch instead makes selective forwarding decisions across separate ports.
The difference is visible if one machine sends frames to another while a third machine captures traffic. In a correctly configured switched setup, the third ordinary endpoint should not automatically receive every known unicast frame merely because it occupies another port. Monitor ports, flooding, broadcasts and attacks can change that observation, so this is a typical behaviour rather than a security guarantee.
Switch versus router
A router joins IP networks and makes forwarding decisions using network-layer addresses and routing information. A conventional layer-two switch forwards Ethernet frames within a link-layer domain. Many products combine both capabilities: a layer-three switch can route between VLAN interfaces, and a consumer “Wi-Fi router” commonly contains a router, small Ethernet switch and wireless access point inside one case.
The distinction is about function, not the label on the box. If two laptops already have suitable IP addresses on the same VLAN and can reach each other’s MAC addresses, a layer-two switch can exchange their frames. If they belong to different IP subnets, suitable routing is generally needed. Ask which address controls the current hop before deciding which device is responsible.
Switch versus wireless access point
A wireless access point connects wireless stations through Wi-Fi and commonly bridges traffic into a wired distribution network. The radio link has its own channel-access and management mechanisms, so a Wi-Fi access point is not simply an Ethernet switch with antennas. A cable from the access point may connect to a switch, and VLAN configurations can place different wireless networks into different logical networks.
For a school, the wireless access point handles radio association and local wireless traffic, while the switch supplies a wired connection and sometimes power. An internet outage, a wireless authentication failure and a broken Ethernet port can all produce the phrase “Wi-Fi does not work”, but each points to a different stage. A clear diagnosis follows the complete path.
What happens before the first IP packet arrives?
When a device starts, it may establish link speed and duplex settings with the switch. It can then use local network mechanisms such as DHCP for IPv4 configuration or IPv6 router advertisements, depending on network design. Address resolution maps a relevant IP next-hop address to a link-layer destination so a frame can be sent on the local segment. These are distinct protocols and events.
A switch does not ordinarily assign every connected device an IP address merely because a port light appears. An interface may have a working Ethernet link but no usable IP configuration, or a valid IP configuration but a broken DNS resolver. Teach students to separate physical connection, link-layer forwarding, IP reachability and application resolution. Solving the wrong layer first wastes troubleshooting effort.
Frames move through a local path, not directly through the internet
A browser request to a distant server can cross multiple physical and logical networks. On the local wired link, the computer constructs an Ethernet frame addressed to an appropriate next-hop device, often its default gateway. The switch forwards that frame according to the local MAC and VLAN rules. The router then processes and forwards the IP packet using the next network’s link-layer encapsulation.
Thus the destination MAC address in a frame may change as a packet crosses routers, while the destination IP address generally identifies the intended remote endpoint unless translation or other processing applies. Keeping these layers separate explains why a switch table is not a global directory of every website and why a traceroute tells a different story from an Ethernet MAC table.
Port speed, duplex and advertised bandwidth
Ethernet ports have negotiated or configured link speeds, and many modern wired links support full-duplex communication in which sending and receiving can occur simultaneously. A port advertised as one gigabit per second provides a nominal signalling or line-rate capacity, not a promise that each application will transfer a gigabit of useful file data per second. Protocol overhead, storage speed, other traffic and endpoint limits reduce application throughput.
A fast switch cannot overcome a slow receiving interface. If a laptop uses a 100 Mbps link and a server uses 1 Gbps, the 100 Mbps side can constrain that particular transfer. Link negotiation problems, damaged cabling and errors can further reduce effective throughput. This is why engineers check port counters and negotiated values before blaming an application.
Worked example: convert a file into a transfer-time estimate
Suppose a computer needs to send a 100 MB file across a path whose bottleneck has a nominal capacity of 100 Mbps. Using decimal units, 100 MB contains 100 × 8 = 800 megabits. The absolute idealised time at 100 megabits each second is 800 / 100 = 8 seconds. This calculation intentionally ignores framing, interframe gaps, acknowledgements, retransmissions, congestion and endpoint processing.
The real file transfer usually takes longer, so eight seconds is not a predicted completion time. If the file size were 100 MiB rather than 100 MB, the byte count would be 104,857,600 and the payload bit count 838,860,800, yielding about 8.39 seconds before overhead. This second step catches a common confusion between binary and decimal prefixes. The useful insight is a properly qualified lower bound.
What switching capacity does and does not mean
A switch’s forwarding fabric and internal resources determine how many frames can be processed and moved simultaneously. Manufacturers may advertise switching capacity in gigabits per second, sometimes counting both directions of full-duplex ports. Interpret the convention carefully rather than comparing unlike product figures. Port count multiplied by line speed describes one aspect of a fully utilised configuration, not guaranteed useful traffic through every possible traffic pattern.
For example, eight 1 Gbps full-duplex ports have an aggregate nominal ingress of 8 Gbps and aggregate nominal egress of 8 Gbps when considered as directions; a bidirectional marketing convention might quote 16 Gbps. Yet traffic from seven sources aimed at one 1 Gbps destination creates output contention regardless of the fabric’s advertised total. Workload shape determines the bottleneck.
Buffers and congestion
Switches often include buffers that temporarily hold frames when the selected output cannot transmit immediately. Buffers absorb short bursts but are finite. If arrivals continue faster than a destination link can drain them, frames may be dropped or delayed. TCP and other protocols respond to loss or congestion in their own ways; the switch does not guarantee lossless delivery merely by providing a queue.
Latency matters as well as raw throughput. A busy uplink can make video calls choppy despite apparently fast access ports. Buffering can increase delay under heavy load. A correct diagnosis examines utilisation, drops, errors, queueing and end-to-end behaviour. It avoids assuming that replacing every switch with a higher nominal capacity model will solve a single congested destination.
Why loops can be destructive
Imagine connecting two switches using multiple cables without appropriate loop prevention. Ethernet broadcast or unknown-unicast frames can circulate through a bridged loop and be replicated repeatedly. A broadcast storm can consume capacity and destabilise forwarding-table learning. The problem is not that data chooses a physically longer route; it is that layer-two forwarding generally lacks the same type of hop-by-hop lifetime reduction that limits ordinary IP packet forwarding.
Bridging standards include control mechanisms such as spanning-tree approaches that prevent active forwarding loops in suitable configurations. Modern networks may also use other topologies and technologies. Learners should never create test loops on a production network. A correct network diagram marks which physical links are present and which are permitted to forward traffic.
Spanning tree and redundant links
Redundant links are valuable because a cable can fail, but uncoordinated active bridging loops are dangerous. Spanning-tree protocols organise participating bridges so an appropriate loop-free forwarding topology is maintained, with alternative links able to become useful under relevant failures. How fast and how safely this happens depends on protocol versions, implementation and design.
The classroom analogy is a road network with temporary one-way closures to prevent circular traffic that could otherwise never exit. It is imperfect because Ethernet frames and road vehicles differ, but it highlights the need for a control plane. In practice, administrators check bridge priorities, port roles and edge-port settings. Automatic protection is not a substitute for understanding the topology.
Link aggregation is not one giant magical cable
Link aggregation can combine several physical connections into a managed logical link between compatible devices. It can improve aggregate capacity and resilience for suitable traffic patterns. However, traffic distribution often uses a hash of flow characteristics, so one single flow may remain limited to the speed of one member link instead of receiving the sum of all speeds. Exact behaviour depends on the implementation.
For instance, two 1 Gbps links in an aggregate can support different flows across separate members, but copying one file is not guaranteed 2 Gbps merely because two cables exist. The two ends must agree on compatible aggregation configuration. Mixing ordinary parallel links with an aggregation design can create confusing failures. Ask what is being balanced: frames, flows or separate conversations?
Multicast: one sender, selected receivers
Multicast traffic is intended for a selected group rather than one unique destination or every device. Naive layer-two treatment may flood certain multicast frames within a VLAN. IGMP or MLD snooping features can help a switch learn which ports have interested receivers and reduce unnecessary replication in relevant circumstances. The IETF’s RFC 4541 discusses operational considerations and is explicitly informational, not a standard that replaces IEEE bridging rules.
A school might use multicast media or service discovery. Its presence does not mean every streaming video automatically uses multicast; many applications use unicast. Troubleshooting multicast requires knowing the actual protocol, group memberships, router presence and network policy. The phrase “one-to-many” alone does not tell a switch which ports should receive a frame.
Power over Ethernet and practical cabling
Some Ethernet switches can supply electrical power over suitable twisted-pair cabling to compatible devices, such as wireless access points, IP cameras and phones. This is called Power over Ethernet. The switch must support an appropriate standard or compatible design and have sufficient power budget. A port capable of data transfer is not automatically able to power arbitrary equipment.
Installation also requires attention to cable categories, lengths, environmental ratings, grounding practices where applicable and electrical safety. If an access point periodically reboots, the cause might be insufficient power budget rather than bad Wi-Fi software. Checking the powered device’s demand and switch capabilities is a more productive first step than repeatedly reconfiguring radio settings.
Managed, unmanaged and smart switches
An unmanaged switch typically offers basic plug-in forwarding without a user-facing interface for detailed configuration. Managed devices may expose VLAN controls, link statistics, mirroring, access policies, spanning-tree settings and administrative monitoring. Intermediate “smart” product categories differ by vendor. The most important question is which features are genuinely required and supported, not which label sounds more advanced.
For a family connecting several wired devices in one trusted home network, a simple switch may be sufficient. A school separating staff, student and guest services may need managed VLANs, policies and professional maintenance. Complexity creates responsibilities: misconfigured management access or unused features can increase operational risk. Simpler is safer when it meets the actual requirement.
VLAN separation is not full network security
A VLAN reduces where ordinary layer-two forwarding goes, but it does not automatically encrypt traffic, authenticate every user or stop a malicious administrator. Security may require endpoint hardening, port access control, router/firewall policies, monitoring and encrypted applications. A switch’s management interface itself must be protected from unauthorised changes.
For example, a visitor might be assigned to a guest VLAN but still reach a protected server if inappropriate inter-VLAN routing rules permit access. Conversely, two devices on one VLAN may fail to communicate because host firewalls block their application traffic. Security is an end-to-end system property. Students should ask which boundary a control enforces and which threats it does not address.
Observability: what a switch can tell an engineer
Managed switches can show port link states, negotiated speeds, traffic counters, error counters, MAC-learning tables and sometimes sampled or mirrored traffic. These observations help separate physical problems from forwarding or configuration problems. A rising error count on one port suggests a different path of investigation from an unexpected MAC address moving between ports.
A mirror or monitoring port may receive copied traffic for authorised diagnostics. Its existence does not mean normal endpoints receive all conversations. Administrators must treat captured data as potentially sensitive. Collect only what is justified and comply with relevant school or workplace privacy controls. Diagnostic power does not erase duties to protect information.
Diagnosing a device that appears disconnected
Start with a concrete symptom: no port light, no IP address, inability to ping a gateway, or inability to open one website. Verify power, cables and negotiated link speed first. Then check VLAN assignment, MAC learning and whether the correct gateway is reachable. If other sites work but one name fails, DNS or application service is more plausible than a broken switch.
Avoid changing many settings at once. Record the before state, test one hypothesis and observe the outcome. For example, if a printer is reachable on VLAN 20 but not from student VLAN 10, investigate routing and policy between those VLANs rather than repeatedly plugging the printer into different switch ports. This diagnostic method is transferable to many other technical systems.
Case study: a school classroom network
A classroom has twenty wired computers, two printers and a teacher workstation. One or more switches connect the machines, with sufficient port count and uplink bandwidth. Administrators may create VLANs or policies that limit student access to administrative services while permitting approved printing and internet connectivity. A network plan must account for the actual IP architecture, security requirements and failure points.
Now a computer on port 7 cannot reach the printer while nearby computers can. The switch could be functioning normally; the affected computer may have an incorrect IP configuration, local firewall or bad cable. A tutor can ask students to draw the packet/frame path, then name a test at each layer. This exercise turns an intimidating wiring cabinet into an understandable chain of decisions.
Case study: a small office experiencing slow backups
An office stores backups on one network-attached storage device with a 1 Gbps connection. Several computers each have fast access links and start backing up at once. Total offered traffic toward the storage port can exceed that port’s forwarding capacity, even if the switch fabric is otherwise capable. Waiting and queueing are expected consequences of shared output capacity, not proof the network is broken.
Solutions might include scheduling, upgrading the bottleneck link and storage system, or reducing unnecessary transferred data. Choosing among them requires measurements, not assumptions. If the storage disks cannot accept the data quickly enough, adding a faster switch alone may give little benefit. A sound explanation follows data from the sending applications to the receiving storage.
How a switch fits into a larger information system
A frame carries data across one segment; an IP network provides addressing and forwarding across routers; transport protocols support communication patterns; applications give meaning to the transferred data. A switch occupies an important place in this stack but does not replace every adjacent function. A website loading successfully is the result of many cooperating components.
This layered model protects readers from misleading product claims. “Smart switch” does not mean every cyber threat is stopped, and “gigabit Ethernet” does not guarantee a one-gigabit-per-second download from a distant server. Ask which device controls each decision: physical link establishment, MAC forwarding, IP routing, name resolution, application response and access permission.
Common mistakes and misleading claims
One mistake is believing every frame must reach every port; learned unicast forwarding exists precisely to avoid that. Another is thinking a switch’s MAC table is a list of all internet destinations. A third is assuming that separate VLANs automatically permit or deny every application. Equally common is confusing advertised fabric capacity with a user’s file-transfer speed or expecting a second cable to double every flow.
Readers may also assume port indicators prove internet connectivity, or that an Ethernet switch supplies wireless access. Both are incorrect. A lit port ordinarily establishes a local link condition, not a complete end-to-end service. Always pair a claim with a test: which address was used, which table entry existed, which VLAN was involved, and where was the actual bottleneck?
A parent-and-tutor progression
For younger learners, lay four cards on a table as devices and choose one child to be the switch. Give each device a different symbolic address. The child initially does not know where B is, so it announces a message within a marked group. Once B answers, the switch records the location and makes later delivery selective. This role play shows learning rather than memorisation.
For secondary students, add VLAN labels and ask why an address learned in one group should not be treated as a free pass into another. Then introduce bits versus bytes and calculate a transfer-time lower bound. Advanced learners can inspect a real authorised switch’s MAC table, port speeds and error counters. Keep packet captures and administrative credentials out of unsupervised exercises.
Transfer questions for real understanding
If computer A moves from port 1 to port 6, what evidence would cause a switch to update its knowledge? Why might a frame to an unknown destination initially reach more ports than a later one? Why can two 1 Gbps computers still experience a slow transfer across a third link? What is the role of a router when devices belong to separate subnets or VLANs?
Next ask students to explain why three physically connected switches might fail after an accidental loop and what type of protocol can protect a bridged topology. Finally, compare a managed switch with a consumer Wi-Fi router. A correct answer names the functions involved rather than simply repeating that one device has more sockets.
Frequently asked questions
Does a network switch connect a home to the internet?
Not on its own. It supplies local network connectivity. An internet service, appropriate router or gateway and working network configuration are ordinarily required for external access.
What is the difference between a MAC address and an IP address?
A MAC address helps identify endpoints on a local link-layer network. An IP address supports network-layer addressing and routing. A frame and the packet inside it can carry different destination fields for different purposes.
Why does the switch sometimes flood frames?
Unknown-unicast and broadcast frames may need to reach multiple eligible ports within their forwarding domain. Learning source addresses lets later known unicast traffic become selective.
Can different VLANs communicate?
Yes, if an appropriate routing device and permitted policies support communication. Ordinary layer-two forwarding does not simply merge separated VLANs.
Is a VLAN an encryption technology?
No. It is a logical network-separation mechanism. Encryption, access control and security monitoring require suitable additional measures.
What does an unmanaged switch do?
It generally performs basic Ethernet bridging and forwarding without an administrator-facing suite of management features. Exact capabilities vary between products.
Can I plug two switches together?
Usually, with compatible links and proper network design. Avoid accidental loops and incompatible VLAN or link-aggregation settings.
Why is my 1 Gbps port not downloading at 1 Gbps?
The end-to-end path includes server capacity, uplinks, congestion, protocol overhead, storage and software. The nominal local link rate is only one limit.
Does a switch know which website I am visiting?
Ordinary layer-two forwarding uses MAC and VLAN information, not website meaning. Other devices and specialised features may observe additional metadata; privacy depends on the entire system.
What should I check first when one port fails?
Start with power, cable, link status, speed and port errors. Then inspect VLAN, learned MAC entries and the endpoint’s IP configuration before changing unrelated settings.
Authoritative sources and connected study routes
The primary technical foundation is IEEE 802.1Q-2022, Bridges and Bridged Networks, which defines MAC and VLAN bridging principles. The Linux kernel’s Ethernet Bridging documentation explains bridge forwarding in an implemented operating system. IETF RFC 4541 discusses IGMP and MLD snooping considerations and is explicitly an informational publication. Consult current equipment documentation for vendor-specific configuration and safety, because bridge features vary.
Continue within eduKateSingapore with What is a Data Packet? for IP and transport encapsulation, What is a Load Balancer? for traffic distribution at other layers, and What is an Optical Fibre? for one physical transmission medium. These linked ideas are complementary; none makes a switch an internet router by itself.
