Although routers and switches are often located near each other in a network environment, the two devices offer very different functionality. Routers are network devices that send data packets to distinct network segments. A router examines incoming packets and makes routing decisions based on the destination address in the packet. This means a router can send a packet in a direction even if the destination is not adjacent to the router. This is distinct from the operation of a switch. A switch is aware of all MAC addresses on the local network segment. It too makes decisions based on destination addresses, but those addresses must be local. If a switch cannot find a corresponding entry for the MAC address listed in the packet, it sends the packet out all ports in the hope that it will find its destination (Bird & Harwood, 2003).
The key to remembering the differences between routers and switches is to remember where they sit within the network. Routers sit on the edge of a network and act as gatekeepers between two networks. They often employ routing protocols to share destination address information with each other. Switches, on the hand, sit in the middle of the network. All destinations are local for these devices, so it is not necessary for them to share destination address information. Since packet destination decisions are easier for switches, these devices typically transmit data at rates much faster than routers are capable of (Bird & Harwood, 2003).
When choosing a router or switch, it is important to choose a device that suits the needs of the network. When selecting either device, it is important to ensure the device has the proper number and type of ports for the network in question. It is advisable to select a device that either features enough ports to fit the expected growth of the network, or is modular and capable of adding additional ports if necessary. Beyond ports, the primary concerns for router selection are processing speed and memory. The routing decisions made by routers often rely on the primary processor and the tables of destination addresses kept in memory. This means the router must have enough processing power to handle the number of decisions required and enough memory to hold the routing tables. Switches, on the hand, do not require as much processing power and the MAC address tables are usually much smaller. When selecting a switch, buyers should be sure that the switch can pass the required number of packets per second. High-density switches may offer more total bandwidth than the switch can truly handle (Bird & Harwood, 2003).
Bird, D. & Harwood, M. (2003). CompTIA: Network+ training guide. Indianapolis, IN: Que/Certification.