Switches: Local Network Bridges
Switches operate at Layer 2 (Data Link) of the OSI model. They link devices within the same local area network (LAN). A switch maintains a MAC address table, directing incoming electrical frames only to the physical port connected to the destination device.
Routers: Connecting Separate Networks
Routers operate at Layer 3 (Network) of the OSI model. They connect completely different networks (e.g. your home LAN to your ISP's backbone). Routers inspect logical IP addresses, exchange route matrices with other routers, and determine the optimal route to destinations.
