What are the Hub, Switch Router and Bridges?
HUB
Hub also called a repeater hub is the basic networking component used in traditional 10-Mbps Ethernet networks to connect network computers to form a local area network (LAN).
SWITCH
A switch is a networking component used to connect workgroup hubs to form a larger network or to connect computers that have high bandwidth needs. The switches provide superior performance to hubs but are more expensive.
When a signal enters a port of the switch, the switch looks at the destination address of the frame and internally establishes a logical connection with the port connected to the destination node. Other ports on the switch have no part in the connection. The result is that each port on the switch corresponds to an individual collision domain, and network congestion is avoided. Thus, if a 10-Mbps Ethernet switch has 10 ports, each port effectively gets the entire bandwidth of 10 Mbps-to the frame, the switch's port appears to provide a dedicated connection to the destination node. Ethernet switches are capable of establishing multiple internal logical connections simultaneously, while routers generally process packets on a first-come, first-served.
There are two main types of switches. Layer-2 switches operate at the data-link layer of the OSI model and are based on bridging technologies. They establish logical connections between ports based on MAC addresses. Use layer-2 switches for segmenting your existing network into smaller collision domains to improve performance. Layer-3 switches operate at the layer 3 of the OSI model and are based on routing technologies. They establish logical connections between ports based on network addresses. Use these for connecting different networks into an internetwork. Layer-3 switches are sometimes called routing switches or multilayer switches.
The actual mechanism by which switching occurs divides Ethernet switches into two general device classes. Store-and-forward switches buffer whole incoming frames, perform error checking, and switch the packet to the correct port according to the internal address table of the switch. This is similar to how bridges work, but this mechanism suffers from high latency (delay) as the frame is processed. Cut-through switches read only the source and destination addresses of an incoming packet, check the address table, and switch the packet to the correct port. Error checking is not performed. This kind of switching has extremely low latency but can cause problems by forwarding jabbers throughout the network.
ROUTER
Router is a networking device that is used to extend or segment networks by forwarding packets from one logical network to another. Routers are most often used in large internetworks that use the TCP/IP protocol suite and for connecting TCP/IP hosts and local area networks (LANs) to the Internet using dedicated leased lines.
Routers work at the network layer (layer 3) of the Open Systems Interconnection (OSI) reference model for networking to move packets between networks using their logical addresses. Routers contain internal tables of information called routing tables that keep track of all known network addresses and possible paths throughout the internetwork, along with the cost of reaching each network. Routers route packets based on the available paths and their costs, thus taking advantage of redundant paths that can exist in a mesh topology network. Because routers use destination network addresses of packets, they work only if the configured network protocol is a routable protocol such as TCP/IP or IPX/SPX. This is different from bridges, which are protocol independent.
There are two kinds of router. Static routers must have their routing tables configured manually with all network addresses and paths in the internetwork. Dynamic routers automatically create their routing tables by listening to network traffic. (The first route must be configured manually, however.)
BRIDGE
Bridge is a networking component used either to extend or to segment networks. Bridges work at the OSI data-link layer. They can be used both to join dissimilar media such as unshielded twisted-pair (UTP) cabling and fiber-optic cabling, and to join different network architectures such as Token Ring and Ethernet. Bridges regenerate signals but do not perform any protocol conversion, so the same networking protocol (such as TCP/IP) must be running on both network segments connected to the bridge. Bridges can also support Simple Network Management Protocol (SNMP), and they can have other diagnostic features.
Bridges come in three basic types. Local bridges directly connect local area networks. Remote bridges can be used to create a wide area network (WAN) link between LANs. Wireless bridges can be used to join LANs or connect remote stations to LANs. Bridges operate by sensing the source MAC addresses of the transmitting nodes on the network and automatically building an internal routing table. This table is used to determine which connected segment to route packets to, and it provides the filtering capability. If the bridge knows which segment a packet is intended for, it forwards the packet directly to that segment. If the bridge doesn't recognize the packet's destination address, it forwards the packet to all connected segments except the one it originated on. And if the destination address is in the same segment as the source address, the bridge drops the packet. Bridges also forward broadcast packets to all segments except the originating one.