In computer networking, Switch (also called switching hub, bridging hub,and more correctly called a network switch) and Bridges are the Layer 2 interconnect devices that can be used to preserve bandwidth in the network by applying a segmentation strategy. Switches are used to re-send packets to a specific segment of the network using hardware MAC addressing (same as bridges). Since the switches are hardware-based, they can send packets faster than bridges.
Once the number of users began to push the limits of a single computer network segment, there was a need to create a new segment to link two computer networks together a device called bridges accomplished this. basically the bridges have 2 ports, one for each computer networks, bridges actually inspect the data that passes through them and make decisions about whether to send it to the other computer network or not. Switch takes data from one network device and forwards it to the destination node based on MAC address.
This decision is based on the MAC address in Ethernet networks and on the ring no. in Token Ring Networks. Because of this behavior (specifically that bridges read and act on the data in the Layer 2 headers of each frame), hence Bridges are layer 2 devices or Data-link layer function.
As networks become larger, and the amount of data transmitted by each computer increased, segmenting networks became even more important. 2 port bridges were no longer sufficient then switch began as multiport network bridge that uses hardware addresses to process and forward data and are considered layer two devices.
The switches have the functionality of the hubs to which they add the primary ability to dedicate the entire bandwidth exclusively to any communication between their ports. It achieved because the switch does not act as a multiport repeater, but only sends data packets to that door to which they directed. This is possible because the equipment sets up routing tables with the MAC addresses (OSI level 2) associated with each of its doors. This technology makes it possible for each of the doors to have the total bandwidth for its use. These devices usually work with bandwidths of 10 and 100 Mbps, and doors with different bandwidths can coexist on the same equipment. The doors of a switch can serve both personal workstations and network segments (hubs), being for this reason widely used as elements of network segmentation and traffic routing. In this way, it achieved that the internal traffic in the different network segments connected to the switch affects the rest of the network, thereby increasing the efficiency of bandwidth usage.
What is a Switch
A switch, in a networking is a high-speed networking device that receives TCP/IP data packets then filters them and forwards to their destination. Most switches have 12 to 24 ports but many are modular can have several hundred ports. Switches can handle several conversations at same time each 100base -TX port on a switch can send and receive frames at the same time, so switches are Full Duplex and hubs are Half-Duplex. A switch is advanced than a hub but not as advanced as a networking router.
Router is a Layer 3 Device : Routers are created to segregate broadcast domains.Roters act as boundary between broadcast domains. Routers read and make decisions based on layer 3 headers, Like:
• TCP/IP or IPX headers: So they become layer3 devices. A routers function is to inspect incoming packet and determine whether it belongs to local network or to a Remote Network,
If a local packet is determined then there is no need of routing and if a Remote packet is determined then it will route that packet according to the routing table other wise the packet will be discarded.
The switches can classify according to the technique they use to forward the packets to the appropriate segment. In this case, we talk about storage and forwarding switches, shortcut switches, and hybrids.
Switches that use forwarding and storage switching fully process the data packet, including CRC check processes and packet address determination. This technique requires that the package be stored temporarily before being re-dispatched to the relevant segment. This type of switching, therefore, reduces the number of damaged packets sent to the network.
Shortcut switches: (with cut-through technology) are faster than storage and forwarding switches since they send the packet as soon as they read the destination MAC address.
Hybrid Switches: This switch normally operates as Cut-Continue, but continually monitors the frequency at which invalid or damaged frames sent. If this value exceeds a preset threshold, the switch behaves like a Store -Transmit. If this level drops, it goes to the initial mode.
In case of a difference in speeds between the interconnected subnets, the switch must necessarily operate as Store-Transmit.
This technology allows several facilities such as:
• Smart filtering: Possibility of filtering traffic not only based on MAC addresses but considering additional parameters, such as the type of protocol or traffic congestion within the switch or on other switches in the network.
• Support of virtual networks: Possibility of creating closed groups of users, served by the same switch or by different switches on the network, that constitute different domains for broadcast purposes. In this way, the processes of movements and changes are also simplified, allowing users to be located or relocated via software.
• Routing integration: Inclusion of modules that perform the function of routers (routing), so that the connection between several different networks can make through switches themselves.