The functions of the two devices—the router, switch are all quite different from one another, even if at times they are all integrated into a single device. Which device do you use when? Let's take a look...
A device that forwards data packets along networks. A router is connected to at least two networks, commonly two LANsorWANsor a LAN and its ISPs network. Routers are located at gateways, the places where two or more networks connect. Routers use headers and forwarding tables to determine the best path for forwarding the packets, and they use protocols such as ICMPto communicate with each other and configure the best route between any two hosts. The Challenges of Cloud Integration Download now switch in networks, a device that filters and forwards packets between LAN segments.
Switches operate at the data link layer (layer 2) and sometimes the network layer(layer 3) of the OSI Reference Model and therefore support any packet protocol. LANs that use switches to join segments are called switched LANs or, in the case of Ethernet networks, switched Ethernet LANs.