Solved

When to use switch and when to use router

Posted on 2011-09-27
3
448 Views
Last Modified: 2012-05-12
Hi,
I'm a little confused about networking and have question about that. Could you, please, describe for me when to use a switch instead a router and vice versa?

Cheers,
PZ
0
Comment
Question by:pizdzielec
3 Comments
 
LVL 4

Expert Comment

by:JorisFRST
ID: 36710139
Hi,

you need a router when going from one network (subnet) to another.

A basic switch is used to connect multiple devices in the same network (subnet).
0
 
LVL 23

Expert Comment

by:Brian Gee
ID: 36710314
As FYI, most consumer grade wireless routers available in the market today have switches built into them.
0
 
LVL 25

Accepted Solution

by:
Fred Marshall earned 50 total points
ID: 36710831
You might be interested in the attached diagrams.

The simplest way to think about it for me is this:

- a switch connects things together without any routing, manipulation, etc.  A simple switch can interconnect computers on *different* subnets at the same time - just as the copper wires can share packets from different subnets.  Now, to be fair, I've rarely had the occasion to do this - but I've done it when I needed communication on more than one subnet.  A simple switch doesn't care about subnets at all.  A hub does the same thing as what I call a "simple switch".  These operate at Layer 2 of the OSI 7 layer model.
Modern "smart" switches learn which ports are communicating and connect those ports without collisions with traffic on other ports.  Hubs don't do this.
Switches come in at least 3 flavors:
- Plain old switches, including "smart" switches that have no user interface at all .. just ports.
- "Managed" switches that have a user interface so you can label, monitor and control (to some degree) the ports.  These almost always have Small Network Management Protocol (SNMP) capabilities so you can monitor switch port traffic levels, etc.  These also often have the capability to set up Virtual LANs (VLANs) so that traffic can be separated (usually by subnet) and combined, etc.
- Layer 3 switches which are generally higher performance and include routing features.  Here the difference between a switch and a router start to get blurred.

A simple router is like what's in the Simple Model of a Wireless Router paper attached.
The general purpose is to connect disparate subnets.  A router can use Network Address Translation (NAT) or not depending on the mode and NAT is generally only needed to interface a private LAN with the public internet address space - although it's often present between private address spaces (subnets) when commodity routers are cascaded.
Some routers and modems (which actually include routers) have a setting for NAT or No NAT.  Others use terms like Gateway (NAT) and Router (No NAT).
One of the abilities of a router is to route traffic around the LAN and to other places, just like a PC can.

For example, let's say that you have a router set up as your internet Gateway on the LAN.  This router does NAT to get packets to and from the internet.  
But, let's say that you have another public IP address that's dedicated to a VPN device (maybe one that's controlled by a third party).  
Since all the computers on the LAN send "foreign" packets to the Gateway router, the Gateway router needs a special route that says:
"any packets destined for the remote end of the VPN need to be send here on the LAN to the VPN device's LAN address"

If you do a "route print" from a command line on your PC, you'll see the routing table for your PC.  It takes a little learning to figure out how to read it but surely you'll see the route to 0.0.0.0 which means "everything else" and generally points to your LAN Gateway.

I hope this helps.
Simple-Model-of-a-Wireless-Route.pdf
Wireless-Router-as-a-Simple-Swit.pdf
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I see many questions here on Experts Exchange regarding switch port configurations and trunks. This article is meant for beginners in the subject to help to get basic knowledge about Virtual Local Area Network (VLAN (http://en.wikipedia.org/wiki/Vir…
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question