A Network switch is a device that filters, forwards
A switch moves traffic based on MAC addresses. Each switch maintains a MAC address table in high-speed memory, called content addressable memory (CAM). The switch recreates this table every time it is activated, using both the source MAC addresses of incoming frames and the port number through which the frame entered the switch.
Switches perform their routing functions at the layers 2 model of the OSI. Some switches process data at the Network Layer (layer 3), this types of switches are referred to as layer 3 switches or multilayer switches. Switches form an integral parts in networking LAN or WANs. Small office, Home office (SOHO) applications normally, use single or all-purpose switches.
As mentioned earlier, switches operates at the data-link layer of the OSI model, switch function is to create a different collision domain per switch port. Let take an example, four computers PC 1, PC 2, PC 3, PC 4 attached to switch ports, then PC 1 and PC 2 can transfer data between them so as PC 3 and PC 4, simultaneously without interfering with each other's conversations. Unlike a hub, which allows the sharing of bandwidth by all port, run in half-duplex and is prone to collisions of frames and retransmissions?
With some ISPs and other networking environments where there is a need for much analysis of network performance and security, switches may be connected between WAN routers as places for analytic modules. Some switches provide in built firewall, network intrusion detection and performance analysis modules that can plug into switch ports.
Functions of a Network Switch
A switch is a device that is used at the Access or OSI Layer 2; a switch can be used to connect multiple hosts (PCs) to the network.
Unlike a hub, a switch forwards a message to a specific host. When any host on the network or a switch sends a message to another host on the same network or same switch, the switch receives and decodes the frames to read the physical (MAC) address portion of the message.
Forwards Frames with MAC address
When a message is sent between hosts on a network or the same switch, the switch checks its MAC address table for the destination address. A switch MAC address table contains a list of all active ports, host or PCs MAC addresses that are attached to it. If the destination MAC address is not found in the table, the switch will not have the necessary information to forward the message. When the switch cannot determine where the destination host is located, it will flood or forward the message out to all attached hosts. Each host compares the destination MAC address in the message to its own MAC address, but only the host with the correct destination address processes the message and responds to the it.
How Switches Learn MAC addresses
A switch builds its MAC address table by examining the source MAC address of each frame that is sent between hosts. When a new host sends a message or responds to a flooded message, the switch immediately learns its MAC address and the port to which it is connected. The table is dynamically updated each time a new source MAC address is read by the switch. In this way, a switch quickly learns the MAC addresses of all attached hosts.
A switch prevents collisions by providing a circuit between the source and destination ports. This circuit provides a dedicated channel over which the hosts connected to the various ports on the switch can communicate. Each port is allocated with a separate bandwidth; these separate circuits allow many conversations to take place at the same time, without collisions occurring.
Main Types of Switches
Fixed configuration switches:-
These types of switches are fixed in their configuration. What that means is that you cannot add features or options to the switch beyond those that originally came with the switch. The particular model you purchase determines the features and options available. For example, if you purchase a 24-port gigabit fixed switch, you cannot add additional ports when you need them. There are typically different configuration choices that vary in how many and what types of ports are included.
Modular switches: -
These types of switches offer more flexibility in their configuration. Modular switches typically come with different sized chassis that allow for the installation of different numbers of modular line cards the line cards actually contain the ports. The line card fits into the switch chassis like expansion cards fit into a PC. The larger the chassis, the more modules it can support.
Stackable switches can be interconnected using a special back cable that provides high-bandwidth between the switches. Cisco introduced StackWise technology in one of its switch product lines. Stack Wise allows you to interconnect up to nine switches using fully redundant back plane connections. As you can see in the figure, switches are stacked one atop of the other, and cables connect the switches in daisy chain fashion. The stacked switches effectively operate as a single larger switch. Stackable switches are desirable where fault tolerance and bandwidth availability are critical and a modular switch is too costly to implement. Using cross-connected connections, the network can recover quickly if a single switch fails. Stackable switches use a special port for interconnections and do not use line ports for inter-switch connections. The speeds are also typically faster than using line ports for connection switches.