Javatpoint Logo
Javatpoint Logo


The switch means to change the state of the connected device. There are various types of switches used for different purposes. Let's discuss the types of switches and their uses. The switch is categorized into the following three types:

  • Network Switch
  • Electronic Switch
  • Nintendo Switch

Here, we will discuss all three types of switches in detail.

Network Switch

A network switch is a hardware device that helps in the transmission of data on a computer network. It uses packet switching that transmits the data in the form of packets.

The Network switch is a device that connects other devices on a computer network with the help of various data cables plugged into it. It manages data transmission from the device to the destination where the packet is intended to be received. It is known as packet switching.

Packet switching is a process to transmit the data over the network in the form of packets. The switches transmit the data with enhanced security and efficiency. The network address is used as a medium for the identification of the devices connected to the switch.

The switch is shown below:


Transmission at OSI layer

Switches can work on both the Layer 2 and Layer 3 of the OSI (Open Source Interconnection) Model. Layer 2 is called the data link layer, and Layer 3 is called the Network layer. Most of the switches operate at Layer 2 of the OSI Model. The switches that can operate on both the layers are called multilayer switches.

At layer 2, it uses MAC Address to forward the data and at layer 3, it uses IP address to forward the data. The devices connected to the different ports of a switch can transfer data to any port without interference. Switches also have the ability to operate even at higher OSI layers (layer three and above) but with different functions.

Function of switches at different OSI Layers

OSI (Open Source Interconnect) Model comprises of seven layers. It segments the flow of data into these seven layers.

Let's discuss the function of switches at different OSI layers.

Layer 2

Layer 2 is the data link layer of the OSI Model. Switches at layer 2 require the MAC address to transmit the data from the source to the destination. The MAC address or physical address is used to recognize the devices connected to the different ports. The operation of switches at layer 2 is fast compared to its operation at other layers of the OSI Model.

The drawbacks of layer 2 switches are similar to that of bridges.

Layer 3

Layer 3 is the network layer of the OSI Model. Layer 3 switches use network address or IP address to transmit the data. The physical address is used by switches to identify the device, while the IP address identifies the locations.

Switches operating at this layer are smarter than Layer 2 switches. It finds the best path to send a packet.

Layer 4

Layer 4 is the transport layer of the OSI Model. It identifies the protocols included with the packet. Layer 4 switches forward the packet based on the application protocols, IP address, and MAC address. The applications associated with the packet helps Layer 4 switches to organize priorities for network traffic.

The information at layer-4 switching can also be used to make routing decisions.

Layer 5 and layer 6

These switches are also known as Content switches and content service switches. The content switches generally use load balancing on different protocols, such as HTTP, VPN, etc. It can also include any TCP/IP traffic but using a particular port.

Some of the switches at these layers can also perform remapping of IP space into another. The process is known as NAT (Network Address Translation). It is used to reduce the assigning of new IP addresses.

Layer 7

Layer 7 technology may consist of a temporary cache called web cache. It can also participate in the geographically distributed network called Contact Delivery Network (CDN).

Functions of a network switch

The basic functions of a switch are learning, forwarding, and preventing.


Let's discuss the functions of a network switch in detail.


We know that switches use MAC address to forward the data at Layer 2 of the OSI Model. Learning means acquiring the MAC address of different devices connected to the ports of a switch. Each connected device has an Ethernet frame. The switch looks into the source's MAC address in the Ethernet frame of the source device and compares the address in its table called MAC address table. If the address and port number does not match, it adds it to the table list. If the address matches but not the port number, it updates the port number to the table.


Forwarding is defined as a process of passing traffic from one port to another port of a switch. The switch learns the MAC address of a source from the Ethernet frame, as discussed above. The destination MAC address determines the destination port number to which the device is connected on the switch. If the destination address matches from the MAC address table, it forwards the network traffic to that port.

If the destination address does not match, switch forwards the network traffic to all the connected ports except the source port. The process is known as flooding, which prevents traffic loss. When the destination port receives the network traffic, it sends a reply frame to the source port. The switch reads it and updates it in its MAC address table.

Filtering is a process where the switch drops the Ethernet frame when it finds a similar MAC address in the source and destination.


Preventing is a task to save a connected device in a network from any failure. For this, redundant links are created. But, sometimes redundant links can also cause broadcast storms and switching loops.

The function of the network switch at layer 2 is to protect the device from such broadcast storms and switching loops.

For example,

STP (Spanning Tree Protocol)

STP prevents the network from any switching loops but also allows redundancy.

Types of Switches


There are different types of switches, which are listed below:

  • Managed Switch
  • Unmanaged Switch
  • Fixed Switch
  • Smart Switches
  • Modular Switches

Managed Switch

Managed switches can protect themselves from Denial of service attacks. It consists of IPv4 DHCP snooping, ND Inspection, etc. It also includes other security features, such as Control Plane Policies (CPP). The table size of managed switches is large. Hence, we can create a large number of IP routers, VLANs, etc.

Unmanaged Switch

Unmanaged switches do not require any configuration. We need to simply plug the device in and start working. These switches are preferred when we require simple and basic connectivity. We can also use these switches at home or other places where we require adding extra ports. It offers different capabilities, such as energy savings and loop detection. As the name implies, we cannot manage or modify these types of switches.

It also has the capability of POE (Power over Ethernet) that works as a simple switch with the POE capability built-in. It enables powering a device over the same cable. It means that a device can receive data traffic and power in parallel over the same cable.

Fixed Switch

As the name implies, fixed switches consist of a fixed number of ports. It cannot be expanded. The fixed switches can be broken into other types of switches, such as unmanaged, managed, etc.

Smart Switches

Smart switches are less scalable, low cost, and low complexity with lighter capabilities than managed switches. VLANs are created to divide the network into a smaller number of workgroups. Smart switches include a lower number of nodes and VLANs as compared to manage switches.

Modular Switches

Modular switches are generally expandable. We can add the required number of modules to the switch as per the network requirements.

Switch Ports

There are three types of switch ports, which are listed below:

  • Access Ports
  • Trunk Ports
  • Tunnel Ports

Access Ports

An access port belongs to a single VLAN (Virtual Local Area Network). It transports the traffic of a single Virtual LAN.

Trunk Ports

A trunk port is a member of all the VLANs. It transports the traffic of multiple Virtual LANs or VLANs.

Tunnel Ports

These ports are different from access and trunk ports. Here, each unique VLAN belongs to a customer. The assigned VLAN to a single customer in tunnel ports support all other assigned VLANs to various customers. The tunnel port configuration is carried out o support tunneling, which permits data movement from one to another network.

Each switch has a different number of ports. The more network users a business has the more required numbers of ports in a switch.

Electronic Switch

An electronic switch is used to switch the electric current passing through the circuit. The switches are generally hand handled, which can be controlled by hand. It is a type of binary device that can be either ON or OFF. When the switch is ON, it means the circuit is closed, and the current is passing through the components of a circuit. When the switch is OFF, the circuit is open. It blocks the flow of current in the circuit.

Types of Switches

Various types of switches are used in different devices, such as toggle switches, pushbuttons, joystick switches, etc. Limit switches are also used today for controlling machinery parts. Let's discuss the concept and circuit diagram of different types of switches in detail.

  • Pushbuttons
  • Toggle Switches
  • Limit switches
  • Float Switches
  • Slide Switches
  • Magnetic Switches

Let's discuss the above types of electronic switches in detail.


The pushbuttons are the simple buttons that change the state of a circuit when it is physically pressed. Push buttons are further categorized as NO (Normally Open) and NC (Normally Closed), as shown below:


NO and NC pushbuttons are also called 'push to make' and 'push to break' buttons. Let's discuss this in detail.


The button blocks the flow of current when it is released. The state is often known as NO or Normally Open. The Normally Open is the state of a circuit that makes no electrical contact with the circuit. It means that the circuit is in an OFF state. The examples include Calculator buttons and keyboard keys.

Let's understand it with an example.

Consider a circuit with a NO switch, as shown below:


When we held or press a NO button, the circuit will appear as:


It means that the NO button permits the flow of current through the circuit when it is pressed. As soon as we release the button, it comes back to its original position.


The Normally Closed button works opposite as compared to the NO button. It is a state of a circuit that maintains an electrical contact. It means that the circuit is in an ON state when it is not pressed. For example, Alarm switches, etc.

Let's understand it with an example.

Consider a circuit with an NC switch, as shown below:

By default, the above circuit permits the current flow when the voltage is applied to the input. As soon as we press the NC button, the circuit comes to rest. It means that circuit is broken when we press an NC button.

Toggle Switches

The Toggle switch is shown below:

It is also known as the tumbler switch.

We can move the lever back and forth to open and close the circuit. It means that the flow of current in a circuit can be controlled by the lever or handle present on the top of a toggle switch. These switches are generally used to switch ON/OFF the electrical appliances.

Many toggle switches are built for use as multiple sets to control large voltages.

Toggle switches can be further categorized as:

  • SPST
  • SPDT
  • SP3T
  • DPDT

Let's discuss the above types of toggle switches in detail.

SPST (Single Pole Single Throw) Switch

It is a switch that has one input and one output. The ON state of the circuit allows the current to flow through the circuit. It occurs when the switch is closed. Similarly, the circuit is OFF when the state of the SPDT switch is open. It blocks the flow of current.

The open state of an SPST switch is shown below:


SPDT (Single Pole Double Throw) Switch

It is a three-terminal switch. It has a single input, which can switch between two outputs. It is also called a changeover switch. We can switch between two devices with the help of a single switch.

For example, the same switch can switch ON the green LED present at the first terminal, and the yellow LED at the other terminal.

The state of an SPDT switch in contact with the first terminal is shown below:


SP3T (Single Pole Three Throw) Switch

It is a switch with one input and three outputs. A single-pole can switch between three ON positions.

The SP3T switches are used in the military industry, the commercial industry, etc. Similarly, other switches, such as SP4T, SP5T, SP6T, etc., are used for different applications as a multi-configuration switch.

The SP3T switch in contact with the second ON position is shown below:


DPDT (Double Pole Double Throw) Switch

It is a switch with two inputs and four outputs. Each input can switch between two ON positions. DPDT switches use two SPDT controlled by a single switch. It is commonly used in main electrical switches, where a DPDT switch can separate the two (neutral and live) connections. It is also used in open and closing wiring applications, such as bridges.

The DPDT switch is shown below:


Here, each pole is in contact with the second throw.


Pole: It signifies the number of the circuit a product can control. A single-pole means a switch, which controls a single circuit. A double pole means a switch controlling two circuits. Similarly, other pole circuits work.

Throw: It signifies the number of positions in which each pole of the switch can connect. The word throw determines the number of ON positions a switch contains.

For example, an SP3T has three throws. It means that a single switch can control the three positions.

Limit switches

Limit switches were first operated to determine the limit at which the object can travel. Due to this, the switch was named a limit switch. The limit switches are used to detect the motion or the object's presence in a machine part, such as control systems. It can also be used to count the objects passing through a point. The switch consists of metal contacts. When a device comes in contact with the switch, it operates to allow or block the current passing through the circuit.

The advantages of limit switches are their reliability, low power consumption, and high accuracy. It can determine different moving objects' parameters, such as passing, end of travel, presence, absence, etc.

Float Switches

The float switches are used to check the level of water or liquid. It can also be used to control the pump, etc.

Let's discuss two applications of float switches.

The first application of the float switch is its use in condensate pumps. It detects the increasing level of fluid or liquid in the tank, which energizes the pump. The pump then throws off the extra liquid to maintain a level. After that, the pump is switched off.

The second application of the float switch is the two-stage switch. In the first stage, the tank is filled where liquid rises to reach the marked level. If the fluid or liquid continues to rise above the level, it triggers an alarm that switches off the liquid source.

Slide Switches

Slide switches consist of a slider on the top to switch the circuit ON/OFF. It is shown below:


Slide switches are easier to manufacture as compared to toggle switches. Such switches are used in small projects. The most common type of slide switch is the metal slider, which consists of metal contacts. When we slide a switch, the metal slider contact with the switch's metal completes the circuit and allows the electricity to flow through the circuit.

Slides of a switch remain in one state until we slide it into another state. For example, a slide switch will remain in the ON position until we again slide the switch to its OFF position and vice versa.

Magnetic Switches

The operation of magnetic switches depends on the applied magnetic field whenever a switch detects the magnetic field, it open or closes to maintain or block the electrical contact with the circuit.


There are various advantages of magnetic switches over other mechanical switches, which are listed below:

  • These switches are less affected by air, ice, water, dust, etc.
  • It is considered the most versatile type of switch.
  • Longer life
  • Quick response time
  • Low maintenance cost

We need to ensure to use the best-quality magnetic switch for its best results. Other types of magnetic switches include reed switches, transistor switches, Hall Effect switches, etc. Let's discuss a short description of these types of magnetic switches.

Transistor magnetic switches are used in DC circuits. It is preferred because it can switch high current and voltages; These switches are used in equipment required for food processing, disposal, etc.

Reed magnetic switches are also called 'dry contact' switches. Reed switches can operate in both AC and DC voltages; Common applications include power transmissions and automated equipment.

Hall Effect switches can withstand mechanical shock compared to other types of magnetic switches. The applications include elevators, DC transformers, etc.

Nintendo Switch

Nintendo Switch was released worldwide by Nintendo on the 3rd of March, 2017, as a video game console. A video game console is defined as a video game displayed on the screen controlled via a remote or game controller. Nintendo is a Japanese MNC located in Kyoto. It is a consumer company of Electronics and video games.


The Nintendo switch family is widely used to play different exclusive games. It also offers online gaming through an available Internet connection. It also offers local wireless connectivity with other Nintendo consoles. The latest Nintendo switch consists of a display screen, two Joy-Con controllers, HDMI (to connect it with television), charger, and a dock. The display with two Joy-Con controllers can be used as a handheld switch. The components are shown in the below image:


Components of Nintendo Switch

Let's discuss the components in detail.


The dock in a Nintendo switch kit is used to connect it to the television. We are not required to unplug the main set up. We can easily play games with our family members after connecting the Nintendo Switch to the TV with a dock's help.

Joy-Con Controllers

It is a wireless game controller, which comes in two individual units. It can be attached with a display screen or video game console. Each unit consists of an analog stick (used for 2D input) and an array of buttons (used to control the video game), as shown below:

Next Topic#

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA