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 Aggregation Routers 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.
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.