Monday 26 December 2016

Switch Vs Router: Differences And Comparison Of Their Working Functionalities

Switches are very popular as a layer two device whereas a router is very famous for being a layer three device. So, what is that something special that makes router the most popular layer three device? We will take a look at all the differences and functional aspects of a switch and a router

Let’s take a look:

Switch vs Router — Comparison and differences

Switch’s properties:

Works at the Data link layer of the OSI layerUses ‘filter and forwarding’ when it receives a data packet in form of a frameA virtual LAN can be created using a Switch which inside the same LAN separates the LANs and make them virtual to each otherUsually comes with 24 to 48 portsTransmits Frames (layer 2 packets) and Layer 3 packets of the OSI modelUses its software for admin access and other configurationsHas its own memory for memorizing the devices connected over to the networkCan learn the MAC addresses and stores those addressed in a CAM (Content Addressable Memories)Supports Half as well as full duplex transmission modeA hub has only one broadcast domainCan support Spanning tree protocolNo packet collisions occur commonly inside a SwitchNo dynamic sharing of the bandwidth

Router’s properties:

Connects more than two networks unlike a SwitchWorks as a traffic police to direct a data packetCan be used for LAN, MAN, and WANIts packet is called a packet unlike a frame at layer two and electrical signal at layer oneIt works at layer three or also known as network layer of the OSI layerIt usually has 2-4-8 portsIt also stored Ip addresses in a table called Routing table and from there, it decides where to send the data packetIn router, every port has its own broadcast domainDynamic bandwidth sharingFaster processing than a switchCan perform Network Address Translations (NAT)

Working differences — Switch vs router

Before you proceed to further reading, have a look at the basic concepts of the different networking devices and hardware types — hub, switch, router, modem, bridge, repeater.

Let’s say around fifty computers are connected in a local area network. In the network, there is also a common resource from where computers can download data locally. So, this network forms a kind of a private network. However, when one of the computers would want to get some data from online sites like Facebook or Google, they will have to go to the internet and fetch the data and that makes a public network

So, when a computer wants to access a public network, it sends a data packet to the Switch which is the next immediate device in terms of data transmission. The switch opens up the packet and looks for the destination where the request packet wants to go.

The packet is directed for the public internet or world wide internet and Switch has no idea about it. So, Switch forwards this packet to the router — ‘The default gateway’. A router works as a gateway that is more like it is a door to the outside world and gets the data that a particular computer wants.

However, inside the campus, all the computers are a part of the private network which is not known to the outside world. So, it tweaks the private packet into the public packet and vice versa. This is called NATting which we will cover in the later topics.

No comments:

Post a Comment