View Full Version : Switch vs Router
Lumet187
08-14-02, 01:05 AM
Are they the same thing? If not what are the differences? Thanks!
No, they are most definitely not the same thing. This may be a little confusing to understand if you are not familiar with how networks operate. Switches connect network devices that are on the same network, and they only understand physical addresses to do this (aka the mac addy). Routers move data between different networks, and they only know about logical adresses to do this. That's it in a nutshell. If you want more info let me know and I will try to help.
Crash893
08-14-02, 02:20 AM
from what i understand
a switch is a smart hub
as in it doesnt broadcast a signal to every port but it gets a signal and then finds the port its spoed to go to
a router is basicly a smart switch with a outlet to the internet or anotner router
a router dertermins if the packet is sposed to be in the netwrok or out
if in goes were its sposed to
if out it chucks it out the door.
routers are good becuase every thing behind it looks like 1 comptuer.
so you can have 40 comptuers behind it. and no body would know.
Edward2
08-14-02, 07:00 AM
If you are planning on using one with DSL or a cable modem, then the following applies:
With a switch, every computer connected to the switch must have an IP address assigned from your ISP. This is important if your ISP only allows 1-2 IP addresses per user. Also, a switch does not provide any firewall capabilities to protect you from hackers.
With a router, only the router is assigned an IP address from your ISP. All of the computers connected to the router are assigned LAN IP addresses by the router. Also, a router does provide a hardware firewall to your network to protect you from hackers.
If you are planning on using one with DSL or a cable modem, I highly recommend you get a router. They are not that much more expensive and definitely worth the money.
a switch can be a router and more. A router works on layer 3 which is the network layer which is responsible for routing information.
There are 3 types of switches, layer1, layer2, and layer3 switch.
Mainly a switch is known for being able to direct bandwidth to a specific computer and mainly dealing wiht bandwidth and stuff. They work faster then the router, hub, bridge, etc...
The layer1 switch is the one that works like the hub since the hub is also on layer1 and is much faster. The layer2 switch works like a bridge since bridges work on layer 2 which is the data-link layer and divides up the networks into different segments and stuff, it deals with mac addresses and stuff and the nic also works on layer2.
The layer3 switch is the router switch, it works on the network layer and will do all the work that a router do and more. So in essence, a router CAN work as a router.
I think there may be some confusion here because of broadband routers for cable and dsl that include switch ports. The important thing to keep in mind here is that switches deal with physical addressing - they do not route logical addresses. Routers know about networks only - not clients. Routers are used to segment networks and move data from one network to another. Switches cannot do that - they operate only within one network. When a router gets a packet it looks at the logical (IP) address it determines what network to send the packet to. When the packet gets to its destination network it is the switch that knows which client to send the packet to via the physical aka mac address. If a lan is connected with a hub the packet will be broadcast to every node. A switch on the other hand maintains a mapping table of mac address to port assignments and will send the packet only to the port to which the mac address is connected. In this way a switch defines multiple collision domains. This provides full duplex operation as well. If a switch receives a packet for which is has no entry in its table then it will be broadcast out on each interface. A router on the other hand will drop a packet if it has no information about the logical address in its routing table. These combination switch/router units have a basic router connected to a switch in one box. The router portion connects your local network to the wide area network. The switch portion simply connects your internal computers together. The router serves basic functions such as nat, but they're really not full featured routers in the sense of something like a Cisco unit.
TC - great post on explaining the difference between the devices.
Lumet187 - if you are planning to share your high speed connection (dsl/cable) the best way to go is with a dsl/cable router w/switch ports. Most vendors offer 4 port 10/100 switch ports on their dsl/cable routers. Using a 'router' of this type gives you the following,
>Hardware firewall via NAT (network address translation) This means the Internet see's only your router and not your internal network. The 'router' function routes traffic from the internet to your internal network.
>The router can act as a DHCP server and assign tcpip addresses to your internal pc's
>The 'switch' aspect of the equipment allows your internal pc's to see each other for file sharing if need be as well as talk to the router in order to get on the Internet.
Hope this helps,,,,,,,,,,,,,,
Lumet187
08-14-02, 10:38 PM
thanks for the replys. I'm beggining to understand the router vs. switch. Thanks!! A hub can not hook up to the internet correct? If it can, then it is really a switch? Thanks.
A hub or switch can hook to the internet, but you need to run Internet Connection sharing or similar on one pc that has the connection to the internet (dsl/cable) If the modem (dsl/cable) is internal, then you need a nic for pc1 and pc2 and a crossover cable connected to the two nics (that is the most simplistic config) Config #2 assuming internal modem (cable/dsl) would be nic in pc1 and nic in pc2, both hooked to a hub or switch with strait thru cables. Still the pc that has the connection to internet still needs to run ICS or similar for pc2 to connect to internet. Config #3 if pc with internet connection has external dsl or cable modem, then pc1 would need another nic, then you could either do the crossover cable config or hub/switch config as stated above. If your connection to internet is via an external dsl or cable modem, a better choice would be to go with a dsl/cable router/switch combination. You would already have a nic in pc one, so then you would just need another nic and cable for pc2 and connect pc1 and pc2 nic to switch ports on the router. In this config, you would not need to run ICS or similar on pc1.
Hope this helps
Originally posted by Lumet187
thanks for the replys. I'm beggining to understand the router vs. switch. Thanks!! A hub can not hook up to the internet correct? If it can, then it is really a switch? Thanks. Not quite how it works. Both a hub and a switch are used to connect multiple computers together on a network. A hub is a cheaper device that simply forwards everything it receives to everything connected to it. Because of this every computer is a member of one collision domain. The way ethernet works is called csma/cd carrier sense multiple access with collision detection. All devices share the same physical medium. When a nic in a computer wants to transmit it listens to the wire. If there is no carrier detected (meaning nothing else is currently talking) then it will transmit. If two computers happen to listen to the wire at the same time and decide it's okay to send, then you get a collision from two signals being transmitted at the same time. This is in part because ethernet is a baseband medium - meaning only one thing at a time can be sent over the wire. Anyway lots of collisions slow down the network. A switch prevents this by connecting the systems point to point with a virtual circuit. Once a switch has learned about everything connected to it, it will only send packets to the port which has the destination computer connected. So if two computers transmit at the same time to different places the switch prevents the packets from colliding by providing each message a dedicated path. Having said all of that, both a switch and a hub could be connected to a cable/dsl router and share your internet connection among multiple computers. A switch just does a better job of keeping your network running smoothly when you have lots of computers on your lan. For what you want to do a broadband router with some built in switch ports is perfect. Sorry for the long post. Sometimes I get carried away when I want people to understand something.
Spec_Ops2087
08-14-02, 11:52 PM
basicly if a switch is directly connected to the cable modem you can only use the computers if you buy seperate IPs for them where as a router will split up 1 IP address....but I believe you can take a router and then plug a switch into it so that you can use multiple computers on the switch without haveing to buy more IPs because the router splits it up for the switch...I think:o
Spec
Originally posted by Spec_Ops2087
basicly if a switch is directly connected to the cable modem you can only use the computers if you buy seperate IPs for them where as a router will split up 1 IP address....but I believe you can take a router and then plug a switch into it so that you can use multiple computers on the switch without haveing to buy more IPs because the router splits it up for the switch...I think:o
Spec Yep that's pretty much it. The router assigns private non routable IP's to your internal computers, and then provides NAT in out for the single public IP given to you by your ISP. If you get a dsl router that only has one port you can hook that up to a separate switch or hub and plug computers into that.
Smizack
08-15-02, 12:53 AM
Originally posted by jajmon
A hub or switch can hook to the internet, but you need to run Internet Connection sharing or similar on one pc that has the connection to the internet (dsl/cable) If the modem (dsl/cable) is internal, then you need a nic for pc1 and pc2 and a crossover cable connected to the two nics (that is the most simplistic config) Config #2 assuming internal modem (cable/dsl) would be nic in pc1 and nic in pc2, both hooked to a hub or switch with strait thru cables. Still the pc that has the connection to internet still needs to run ICS or similar for pc2 to connect to internet. Config #3 if pc with internet connection has external dsl or cable modem, then pc1 would need another nic, then you could either do the crossover cable config or hub/switch config as stated above. If your connection to internet is via an external dsl or cable modem, a better choice would be to go with a dsl/cable router/switch combination. You would already have a nic in pc one, so then you would just need another nic and cable for pc2 and connect pc1 and pc2 nic to switch ports on the router. In this config, you would not need to run ICS or similar on pc1.
Hope this helps
If you use a hub, you each computer has to have it's own ip add. Most isp's frown on this, and will suggest a router.
Every computer has to have its own IP regardless of anything else. A hub doesn't have any bearing on this. The issue is without a router to do NAT your internal computers would need a public IP assigned by your ISP whether you used a hub or a switch. Get a broadband router and it doesn't matter whether you use a hub or a switch on the "inside." A broadband router lets your ISP think you have one computer connected to the internet (one public IP),while on the inside you have multiple computers each with their own private IP.
Lumet187
08-15-02, 04:00 AM
Alright guys, Thanks for all the info. We are starting to get into the whole "isp allows this" and i've been around and around with my isp about networking:argue: Thanks again!
Lusankya
08-16-02, 11:22 AM
Having worked for a large city ISP...
Switch- if you have that many questions about it.. you really don't need it
Router- all you need for a network. Get one with Network Address Translation if you want to run a private network that your ISP can't see and hence charge you for more then one machine
Hub- nothing but bunch of wires that lets one cable see another cable.
I have AT&T cable at the moment going from the cable modem to my SMC Barracaide 4 port router which has my 4 rigs plugged into it.
Each comp has internet access
Each comp has a private IP that the cable company can't see.
The SMC Barracaide holds the IP so the cable company only see that as a single machine.
I recomend the SMC Barricade most highly
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.