Sunday, August 19, 2012
Hubs, switches and routers - What is the difference?
The backbone of a network of computers using 3 types of devices for interconnecting computers - hubs, switches and routers. Each is important and serves a different role in facilitating communication between networked computers. From out of these devices may look similar - small metal boxes with multiple connectors or ports on which the cables are fixed ethernet (router may also exhibit other types of connectors). 'Hub' terms, 'switch', and 'router' are often used interchangeably and misused - in fact, the devices are very different. Hubs are used to interconnect computers simply individual. Switches to do the same (but in a more efficient). However, routers interconnect different networks (as opposed to individual machines).
Network hub:
Compared to switches and routers, hubs are the least expensive, simplest device on the network. All data that enters a port of the hub is sent to all other ports. So, all computers connected to the same hub see each other's communications network. The hub does not pay any attention to the data transmitted, simply passes along to its other ports. The value of a hub is that it is inexpensive and offers a quick and easy way to connect computers in a small network.
Network Switch:
The work of a switch is similar to a hub - but does so more efficiently. Each data packet (Ethernet frame) that is transmitted on the network has a source and destination MAC address. A switch has the ability to remember the address of each computer connected to its ports and act as a policeman - one pass of the data transmitted to the target computer and not everyone else. This can have a significant positive effect on network performance by eliminating unnecessary transmissions and free up network bandwidth. A switch can be thought of as the central component of a single network. It is used to interconnect the devices on the network and to provide layer 2 (OSI) frame. A switch differs from a hub because it transmits the frame to all other devices - rather, a switch is a direct link between the transmission and reception.
Network Router:
Compared to switches, routers are slow and relatively expensive. A router is an intelligent device that interconnects two or more networks in order to provide layer 3 (OSI) packets. Since there may be more than one possible path, a router takes into account more criteria to determine which path to send the data packets. The fact that the switches and routers operate at different levels of the OSI model indicates are based on different information (contained in frames or packets) to send data from a source to a destination.
An important difference between the switched and routed networks is switched networks do not block the transmissions. As a result, the switches can be overwhelmed by broadcast storms. Routers block LAN broadcasts, so a broadcast storm affects only the broadcast domain from which it originated. Since the transmissions of block router, but also provide a higher level of security of the switches.
Analogy
Here's an analogy to help explain the difference between a router and switches - the mailroom of a company. When an employee sends a letter you can (a) to be delivered to its final destination by the internal mail system of the delivery company, or (b) take to the local post office (where the beneficiary resides outside the company) . A switch represents the mailroom of the company, and a router to the local post office.
A switch will not look inside your email or look at the type of mail that is delivered. The logic behind just a switch is a table of MAC addresses (one for each computer on the network) and a leading destination MAC is connected. That is, the switch stores a table of company employees and the respective numbers of office and is responsible for the delivery of internal mail to the employees. Thus, if the mail arrives the switch that is intended to an employee then a switch knows how to implement. A router, however, is responsible for delivering mail destined individuals outside the company. In addition, routers can look into the mail delivery and the rules can be applied based on the content of the post. This feature allows routers to play an important role in network security.
How a switch works:
The switches are essentially multi-port bridges. Have been designed to reduce the size of collision domains. In addition to faster CPUs and memory, two other advances in technology can go - the content addressable memory (CAM) and application-specific integrated circuits (ASICs). CAM is memory that works backwards compared to the conventional memory - that is, given a value of data in the memory returns the address associated. This allows a switch to directly find the port associated with a MAC address (the data). The ASIC is a device that can be programmed to perform logic functions in hardware speed. The use of CAM and ASIC technologies greatly reduced delays caused by processing software and allowed the move to keep pace with the demands for high data rate in Ethernet networks.
Switches can operate in one of three ways - store-and-forward, cut-through and fragment-free. The trade-off is performance than reliability. In store-and-forward switching the switch reads the entire frame and check for errors. In cut-through switching of the switch reads the beginning of the frame by the destination MAC address. In fragment-free switching of the first 64 bytes of a frame is read - enough to determine whether it is a collision fragment (representing the majority of the errors of the frame).
The Layer 2 switch builds its forwarding table based on MAC address. When a host has data for a non-local IP address, sends the frame to the nearest router (also known as the default gateway). The host uses the MAC address of the router as the destination MAC address.
How a router works:
Just as a switch keeps a table of known MAC addresses, a router maintains a table of IP addresses known as a routing table. An important function of a router is to keep these tables and make sure that other routers are aware of changes in network topology. This function is performed using routing protocols to communicate with other routers. When the packets arrive at the interface of a router applies different criteria and protocols to determine the best path on which to transmit the packet to its next destination.
A router can be programmed to apply sophisticated rules based on the content of data packets it sees. For example, routers can be programmed to act as a hardware firewall can implement network address translation (NAT) and DHCP to provide network services.
Because of their built-in intelligence, the routers are generally considered the most complex networked devices. Besides directing the traffic of packets, the router can be configured to monitor network traffic, adapt to network changes that dynamically detect and protect networks and packet filtering determines which packets will be blocked or allowed through. ......
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment