Switch & Router
Switch & Router
A network switch connects devices in a network to each other, enabling them to talk by exchanging
data packets. Switches can be hardware devices that manage physical networks or software-based
virtual devices.
A network switch operates on the data-link layer, or Layer 2, of the Open Systems Interconnection
(OSI) model. In a local area network (LAN) using Ethernet, a network switch determines where to
send each incoming message frame by looking at the media access control (MAC) address. Switches
maintain tables that match each MAC address to the port receiving the MAC address.
Switches are responsible for relaying information between different endpoints and offer a plethora of benefits:
Switches form the majority of network devices in modern data networks and carry huge amounts of traffic
They offer full-duplex communication, connect network segments, boost network performance and make
Switches provide the wired connections to desktop computers, wireless access points (APs), printers,
industrial machinery and some internet of things (IoT) devices, such as card entry systems.
They connect the computers that host virtual machines (VMs) in data centers, as well as physical servers and
Most modern switches employ the Power over Ethernet technology, which can deliver up to 100 watts of
power to support the connectivity of network devices. This enables businesses to set up equipment like
outdoor lighting, security cameras, voice over IP phones and various kinds of sensors for monitoring remote
Data from IoT devices can be collected by a network switch and used by artificial intelligence and machine
All switches transmit data from one location to another, but their hardware and software configurations can vary
Edge, or access, switches. These switches manage traffic either coming into or exiting the network.
network topology. Edge switches connect into these and send traffic from switch to switch or send it up to
core switches.
Core switches. These network switches form the backbone of the network. Core switches connect
aggregation or edge switches, users or device edge networks to data center networks and enterprise LANs to
routers.
A data frame is flooded to all ports in the switching domain if it is forwarded to a MAC address that the switch
infrastructure is not familiar with. Data frames for multicast and broadcast are also flooded. This is known
as broadcast, unknown unicast and multicast flooding. This capability makes a switch a Layer 2 device in the
Many data centers adopt a spine-leaf architecture, which eliminates the aggregation layer. In this
design, servers and storage connect to leaf switches (edge switches). Every leaf switch connects into
two or more spine (core) switches. This reduces the number of hops data takes to get from source to
Some data centers establish a fabric or mesh network design that makes every device appear to be
on a single, large switch. This approach reduces latency to its minimum. High-demanding applications
For small business and home networking, network switches provide the benefit of additional Ethernet
a bus, hub or repeater. In these networks, every network-connected device sees all traffic and reads the traffic
addressed to it. A network can also be established by directly connecting computers to one another without a
separate layer of network devices. This approach is mostly for HPC, which requires sub-5-microsecond
Routing switches connect LANs. In addition to doing MAC-based Layer 2 switching, they perform routing
functions at OSI Layer 3 (network layer), directing traffic based on the IP address in each packet.
Managed switches let a user adjust each port on the switch. This enables monitoring and configuration
changes.
Unmanaged switches enable Ethernet devices to pass data automatically using autonegotiation, which
determines parameters such as data rate. The configuration is fixed and cannot be edited.
Smart switches can be configured to enable more control over data transmissions, but they have more
limitations compared to managed switches. Smart switches are also known as partially managed switches.
Stackable switches are fixed switches that may be connected to one another via a backplane cable interface
Modular switches are switch cards for modular or chassis-based switches and can be inserted into a sizable,
fixed-form factor chassis that can accommodate two or more cards. Since switch interfaces can be changed
as needed, this kind of switch gives the greatest flexibility and upgradeability.
A switch plays a crucial role in delivering internet connectivity and network communication across a network.
By automating link connections, which removes manual and time-consuming settings, network switches
provide effective connectivity, speed and ease of use among network devices.
Switches help with building a more reliable and secure network as they provide some level of control over
connection as they have several ports in the front. Usually, those ports are RJ-45 ports for Ethernet cables;
Switches can also operate in full-duplex mode, which enables simultaneous data transmission and reception
across the network. Compared to hubs, which only enable half-duplex mode, switches practically quadruple
Network switches are helpful for home networks and scenarios where high-powered streaming services are
used regularly. They are especially beneficial if one needs a reliable way to stream or play 4K video.
Since network switches maintain a list of the distinct MAC addresses of every device connected to them,
most of the network communication is only routed to the intended destination and not broadcast to all
connected devices. This reduces collisions and eliminates broadcast domains in a network.
Network switches can be easily confused with routers. However, they have different functions and operate on
separate layers.
A network switch is a Layer 2 device on the OSI model. A router is primarily a Layer 3 device.
A router moves data between two or more computer networks, while a switch facilitates the sharing of
To determine the route and destination of a packet, a router examines the IP addresses of packets. A switch
looks at the MAC address of each device to transfer data to the correct destination.
Routers use data packets, whereas switches, which are part of the data-link layer, typically work with data
frames.
A switch is less sophisticated than a router because, unlike a router, a switch doesn't use routing algorithms
Routers can work within both wired and Wi-Fi networks, but a switch is restricted to wired network
connections.
A router offers network address translation, NetFlow and quality of service, while a switch offers none of
these services.
While a network switch is a Layer 2 device on the OSI model, a hub is a Layer 1 physical device.
A hub is relatively simple compared to a network switch because, unlike a switch, it doesn't keep track of
The goal of a hub is to connect all the nodes in a network, whereas an Ethernet switch connects all the
network devices together and transfers data packets between those devices.
Because a hub can't manage data going in and out of it as a network switch can, there are a lot of
communication collisions.
Switches prevent collisions by buffering Ethernet frames, but hubs cannot prevent collisions as the devices
What is a Router?
A router in a computer network is a device connecting two or more networks or subnetworks that are
packet-switched. These are networking devices functioning at layer 3 or a network layer of the OSI
paradigm.
The principal function of a router in networking is to manage traffic between these networks. It does
so by forwarding data packets to their respective IP addresses and allowing numerous devices to use
the same internet connection.
A network devices router receives, analyzes, and forwards data packets between computer networks.
When a data packet arrives, the router consults its routing tables to determine the best route, after
inspecting the destination address, and then forwards the packet down that path.
There are various types of routers. However, the majority of routers transfer data between WANs
(wide area networks) and LANs (local area networks). A single router in networking is often required
for a LAN. By contrast, a WAN is scattered over a vast area and often demands many routers and
switches.
Uses of a Router
To ensure that data is flowing to the right destination, users send the emails to the correct recipient.
Routers defend against unwanted data, such as when an enormous file is delivered to each
workstation on the network, and also increase network performance.
The router in networking acts as a buffer between the modem and the network and allows software
protection to reduce the danger of viruses and other malware.
To share information with other routers connected to the network.
Routers perform the primary role of segregating the internet network from an internal network in the
residential area or business.
Dynamic host configuration protocol (DHCP) allows the IP addresses of each computer that is joined
to the network. Most routers are enabled with DHCP protocol over the internet that is utilized for small
home and office networks.
Routers give protection from intruders and malicious users via the internal networks and are identified
through the internet along with firewall firmware and software.
Routers also help many users to share resources like faxes, scanners, printers, and file folders on the
discs located remotely.
Given below is a diagram that explains the architecture of a router in a computer network:
Source
The following are several variables that contribute to the successful operation of a router:
Input Port
The input port can perform the physical layer operation of terminating an incoming physical link to a
router. It carries out the data link layer functionality required to communicate with the data link layer
functionality on the opposite side of the incoming link.
The input port also conducts a lookup and forwarding function, ensuring that a datagram forwarded
into the router’s switching fabric arrives at the correct output port.
Output Port
The output port stores packets from the switching fabric and sends them to the incoming link by
executing link-layer and physical-layer functions. As a result, the output port serves the same reverse
data link and physical layer functions as the input port.
Switching Fabric
It is a mix of hardware and software that sends data from a network node to the next node in the
network via the correct port.
Routing Processor
Routing processors carry out routing protocols. It stores routing information as well as forwarding
tables. It also handles network administration within the router.
Types of Routers
Wireless Routers
A wireless router gives Wi-Fi connectivity to Wi-Fi devices such as laptops and smartphones. They
can also provide normal Ethernet routing. Indoor connections have a range of 150 feet, while outdoor
connections have a range of 300 feet.
Broadband Routers
A broadband router is used to connect to the Internet by telephone and to provide high-speed internet
access via voice over Internet Protocol (VoIP) technology.
Core Routers
A core router can route data packets within a certain network but cannot route the packets between
networks. They assist in connecting all devices within a network, forming the network’s backbone.
Edge Routers
The most common forms of Edge Routers are low-capacity routers located at the network’s
peripherals. An edge router connects the internal network to the external networks and can send data
packets across networks. They employ the Border Gateway Protocol (BGP) for connectivity. There
are two types of edge routers: label edge routers and subscriber edge routers.
Brouters
These are specialized routers that can also perform bridge functions. Brouters, like bridges, aid in
data transit between networks. And, like a router, they route data among network devices.