The fundamental difference between a switch and a router lies in their functions and the layers at which they operate. A switch operates at the data link layer, transferring packets without altering their content and potentially adjusting the transfer rate on each port. In contrast, a router functions at the network layer, remapping IP address information in packets and assigning IP addresses to devices connected to its internal ports. While switches use circuit identifiers to determine the appropriate port for packet delivery, routers analyze IP addresses to decide the forwarding path for packets.