Difference between a router, switch and a hub

What's the basic difference between Router, Switches and Hub? Can router and switches be used interchangeably?
Hubs

    Requires Free Membership to View

    By submitting your registration information to SearchNetworking.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchNetworking.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

are used to expand the size of a LAN. Hubs are mainly used to expand the number of devices that can be used on a LAN.

A switch is used to segment a LAN into separate networks. If the traffic on you LAN were flooding the network with data then you would install a switch to segment the traffic.

Routers are used to connect a WAN or WANS to your LAN or connect dissimilar networks together. Routers can be used to filter and isolate traffic or segment network traffic like switches.

The differences of a router and switch can be confusing. A router can search among multiple active paths and determine which is the best path at that particular moment. In contrast, a switch can recognize only one path between networks.

This was first published in October 2002