Function
Switch: This device connects devices in a LAN and works at Layer 2 (data link layer). It uses MAC addresses to forward data frames within the LAN.
Router: Connects different networks, and operates at Layer 3 (network layer). Utilizes IP addresses to direct data packets between networks.
Data Handling
Switch: This program deals with data frames and forwards them based on MAC addresses without changing the frames' MAC addresses.
Router: This device handles data packets, modifies the data link layer header as packets move between networks, and may perform NAT.
Port Types and Usage
Switch: Has multiple Ethernet ports of the same type for connecting local devices like computers and printers.
Router: Ethernet ports for LANs and WAN ports for connecting to external networks like the Internet.
Broadcast Domains and Collision Domains
Switch: Segments collision domains (each port is separate ), but generally doesn't segment broadcast domains.
Router: Segments both collision and broadcast domains, preventing broadcast traffic from spreading across networks.
Click to Learn more about "Network Device"
Tag:Router,Switch