Routers, Switches and Hubs are all common components of wired Ethernet networks. They look alike on the outside, but they are very different on the inside.Open Systems Interconnection (OSI) model defines the communications process into 7 layers, which divides the tasks involved with moving information between networked computers into seven smaller, more manageable task groups. Layers 7 through 4 deal with end to end communications between data source and destinations. Layers 3 to 1 deal with communications between network devices. As per the OSI model, network switches devices, operate at Layer 2(Data Link Layer). However, certain multi-layer switches can operate at higher layers as well ,Hubs operate at layer 1(physical layer) and Routers operate at Layer 3 (Network Layer).
To understand the internal differences of these devices,first of all we have to know each,one by one :
Hubs are dumb devices that simply repeat everything they hear. When one computer sends a signal to the hub, the hub sends the exactly alike signal back out to all of the other ports on the hub. Hubs enable computers on a network to communicate. Each computer plugs into the hub with an Ethernet cable, and information sent from one computer to another passes through the hub. A hub can not identify the source destination of the information it receives, so it sends the information to all of the computers connected to it, including the one that sent it. The ports on the hub provide a point-to-point connection to the Ethernet interface in each computer. With a hub each node must wait for the network to be idle and detect collisions between multiple nodes.
Switches work the same way as hubs, but they can identify the targeted destination of the information that they receive, so they send that information to only the computers that are supposed to receive it. Switches can send and receive information at the same time, so they can send information faster than hubs can. Switches are much more intelligent devices that analyze each packet coming in. The switch determines where the traffic needs to go and transmits it only on the port connected to the destination computer.
This is a much more efficient use of the network’s bandwidth, and it also prevents unauthorized users from intercepting traffic on the network. When an Ethernet packet arrives at the switch the destination MAC address is examined and the packet is switched to the proper port. Each Ethernet interface has a Media Access Controller (MAC) 48-bit address assigned by the hardware vendor. The switch remembers which MAC addresses are connected to each port. If the Switch does not know which port to use it floods the packet to all ports. When it gets a response it updates its internal MAC address table.
A network Router is a more sophisticated network device compared to either a network Switch or a network Hub. Like hubs and switches, routers are typically small, box-like pieces of equipment that multiple computers can connect to.Each features a number of ports on the front or back of the unit that provide the connection points for these computers, a connection for electric power, and a number of LED lights to display device status.
Traditional routers are designed to join together multiple local area networks (LANs) with a wide area network (WAN). Routers serve as intermediate destinations for network traffic. They receive incoming network packets, look inside each packet to identify the source and target network addresses, then forward these packets where needed to ensure the data reaches its final destination.Routers can be wired (using Ethernet cables) or wireless. A router is used to interconnect multiple networks.
The Internet is literally Internetwork — a network of networks. Internet router’s work on IP addresses to determine how best to interconnect the sender to the destination. Because router’s work at the IP layer different physical networks can be interconnected, Ethernet, Token Ring, Sonet, even RS232 serial used for dialup can carry IP packets. Routers intended for home use include Network Address Translation (NAT). This allows a single address assigned by the ISP to be shared by multiple hosts connected to the local network.
HUB ,SWITCH AND ROUTER CONNECTION through Bridge( A bridge device filters data traffic at a network boundary. Bridges reduce the amount of traffic on a LAN by dividing it into two segments.Bridges serve a similar function as switches, that also operate at Layer 2)-