A Switch is a network device that is
used to segment the networks into different subnetworks called subnets
or LAN segments. It is responsible for filtering and forwarding the
packets between LAN segments based on the MAC addresses of the connected devices.
Types of Switches
Virtual Switches: Virtual Switches are the switches that are inside Virtual Machine hosting environments.
Routing Switches: These are the switches that are used
to connect LANs.They also have the work of performing functions in the
Network Layer of the OSI Model.
Unmanaged Switches: Unmanaged
Switches are the devices that are used to enable Ethernet devices that
help in automatic data passing. These are generally used for home
networks and small businesses. In case of the requirement of more
switches, we just add more switches by plug and play method.
Managed Switches: Managed
Switches are switches having more complex networks. SNMP (Simple
Network Management Protocol) can be used for configuring managed
switches. These types of switches are mostly used in large networks
having complex architecture. They provide better security levels and
precision control, but they are more costly than Unmanaged switches.
LAN Switches: LAN
(Local Area Network) Switches are also called ethernet switches or data
switches. LAN switches always try to avoid overlapping of data packets
in the network just by allocating bandwidth in such a manner.
PoE Switches: Power Over Ethernet are the switches used in Gigabit Ethernets. PoE help in combining data
and power transmission over the same cable so that it helps in receiving
data and electricity over the same line.
Smart Switches: Smart
Switches are switches having some extra controls on data transmissions
but also have extra limitations over managed Switches. They are also
called partially managed switches.
Stackable Switches: Stackable switches are connected through a backplane to combine two logical switches into a single switch.
Modular Switches: These types of switches help in accommodating two or more cards. Modular switches help in providing better flexibility.
How Does Switch Works
Once a device is connected to a switch, the switch notes its media
access control (MAC) address, a code that’s baked into the device’s
network-interface card (NIC).The NIC attaches to an Ethernet cable that
connects to the switch. The switch uses the MAC address to identify
which device’s outgoing packets are being sent, and where to deliver
incoming packets.
The MAC address identifies the physical device
and doesn’t change, while the network layer (Layer 3) IP address, can be
assigned dynamically to a device and change over time.
When a packet enters the switch, the switch reads its
header, then matches the destination address or addresses and sends the
packet out through the appropriate ports that lead to the destination
devices.
To
reduce the chance for collisions between network traffic going to and
from a switch and a connected device at the same time, most switches
offer full-duplex functionality in which packets coming from and going
to a device have access to the full bandwidth of the switch connection.
Example:
As shown in above figure Laptop wants to send the data
packet to the PC, the packet first enters the switch, and the
switch reads its header and finds the MAC address of the PC to
identify the device then it sends the packet out through the appropriate
port 0/5 that lead to the PC.
Switch MAC Address Table
Multiple addresses can be learned on each switch port.
The switch learns source MAC address from packet frame.
Source address and port numbers are stored in MAC address table.
Destination addresses are used make forwarding decisions.
MAC address table is also referred to as CAM table.