A device that filters and forwards packets between LAN segments. Switches operate at the data link layer (OSI layer 2) of the OSI Reference Model and therefore support any packet protocol. LANs that use switches to join segments are called switched LANs or, in the case of Ethernet networks, switched Ethernet LANs.
How a Switch Works?
The switch is added to the network by plugging various devices into the ports on the switch. When the switch gets the first bit of information from the first device, such as your computer, it reads the MAC address of that device. The MAC address is the media access control number. This number is an ID number that is assigned to most network adapters and is preset by the manufacturer. Once this number is read, it is recorded in memory by the switch.
Next, the switch attempts to look for any other devices on the network by sending out packet requests of information. Once another device gets this packet, it sends out a signal to the switch to acknowledge the request. Now the MAC address of this device is recorded. Each time these packets are sent, the information is "time stamped."
The switch works to filter this information that is communicated among all of the devices. The switch has enough memory to retain this information in its memory bank.