Get familiar to Switch ,Router,Bridge and Hub

The_Anshuman
4 min readJun 20, 2023

--

OSI Layers

Devices are shown on which layer they work according to OSI model.Now we will go one by one to devices.

Hub

A hub is a basic networking device that connects with multiple devices in a local area network (LAN).

Hub can send Binary and electrical both signals.

Originally its name originated from wheel’s middle part that is called hub Although it looks like that it works on star topology but it actually works on bus topology.

Hub is generally used where there is requirement to communicate 8–10 systems.

Hub is not an intelligent device as it broadcast data packets to all ,unlike other switch and router ending up to be very less secured device to communicate.

Hub can send only one datapacket at one time as it is half duplex so no parallel communication is possible ,but if two system send data at same time then collision will occur as it has single collision domain means then one signal get out at a time

Hub Working

Hub is also called multiport repeater because it amplifies and broadcasts incoming data packets to all connected devices. It works at Physical Layer.

There are two type of hub

Active hub

It needs electricity and amplify signal(if analog) and regenerate (if digital) and act like repeater .

Generally we use 10 base 2 cable that can send upto 185m after then it is mandatory to use repeater.

Passive hub

It does not need electricity and there will be no change in signal transmission and send signal as it is.

Bridge

A bridge is a device that connects two network segments together, allowing them to communicate and share resources within a LAN.

It has two collision domains one on each side of it. It works in layer 2 of the OSI model.

It has table where it divide mac id’s between its two port and as the reqirement come it will save mac id along on which port we have accessed it.

Switch

It is also called Multi-port bridge.

A switch is a device used to connect multiple devices, such as computers, servers, and other networking devices, within a local area network (LAN).

It works on layer 2 of OSI model. And layer 2 devices works on mac address .

Generally it has maximum 32 ports.

It is full duplex hence data can be transmitted and received simultaneously in both directions on a communication channel.

When a switch receives a packet, it examines the destination MAC address and forwards the packet only to the port connected to the destination device.

The broadcasting domain of a switch is limited to the specific ports where devices are connected, and broadcast packets are only forwarded to those ports.

In switch no message can collide with as there are path to connect each port individually means each port has a separate collision domain.

Switch has CAM content accessible memory in this it maintains table of port number and mac address. For the first time it was broadcast to all to get its table populated.

Router

It is a Layer 3 device of OSI model .So it will work on network ip.

A router is a device that is responsible for communication between network between different networks. So it is called internetworking device.

Diagram

Router Architecture

Generally router is used for WAN and not for LAN as it expensive then others.

Router create separate subnets, and each subnet has its own broadcasting domain. Routers do not forward broadcast packets between different subnets by default, as broadcasting is limited to each individual subnet.

Every port in router has broadcasting domain .

Some important terms -:

  1. Simplex — In this mode of transmission, data can only move to one direction i.e., a device can only send data but cannot receive and the receiver can only receive but cannot send the data.
  2. Half-Duplex — In this mode, only one device can send or receive data at a time but not both at the same time.
  3. Full-Duplex — In this mode, a device can send and receive data at the same time.

For more Networking related stuff follow:

https://medium.com/@The_CodeConductor

--

--