Sign in with
Sign up | Sign in
Your question
Solved

Still not getting the Router/Switch difference

Last response: in Networking
Share
January 26, 2011 7:42:39 PM

I read this on Wikipedia:

"A standard 10/100 Ethernet switch operates at the data-link layer of the OSI model to create a different collision domain for each switch port. If you have 4 computers (e.g., A, B, C, and D) on 4 switch ports, then A and B can transfer data back and forth, while C and D also do so simultaneously, and the two "conversations" will not interfere with one another. In the case of a "hub," they would all share the bandwidth and run in Half duplex, resulting in collisions, which would then necessitate retransmissions. Using a switch is called microsegmentation. This allows you to have dedicated bandwidth on point-to-point connections with every computer and to therefore run in Full duplex with no collisions."

I am wondering, can data be transfered full duplex if you use a router? Or is it like a hub where it runs Half Duplex, having the LAN speed be shared among transmissions? Am referring specifically to LAN communication.

Am asking because a router would be cheaper than a switch to buy.

Thank You
January 26, 2011 7:53:50 PM

A router has a built in switch essentially. The router takes care of the DHCP services, and then has an internal switch to allow multiple connections. The difference is that a separate switch wouldn't run a DHCP server.
m
0
l
January 26, 2011 8:02:48 PM

Pyroflea said:
A router has a built in switch essentially. The router takes care of the DHCP services, and then has an internal switch to allow multiple connections. The difference is that a separate switch wouldn't run a DHCP server.



Thanks for the description DHCP, but I am only asking about LAN communications. If i have a router to connect to a WAN, can i "daisy chain" a second router to it to act as a switch? Lets say that the connected servers need data replicated over to one another continuously. Can my router (acting like switch) run full duplex and allow separate communications without dividing the LAN speed?

Or is my router limited, and a switch is the only device capable of running full duplex. Is the router act like a hub, half duplex?

I've searched up "router as a switch" in the search engine but none of them cover this issue sadly.
m
0
l
Related resources
January 26, 2011 11:13:01 PM

invulnarable27 said:
Thanks for the description DHCP, but I am only asking about LAN communications. If i have a router to connect to a WAN, can i "daisy chain" a second router to it to act as a switch? Lets say that the connected servers need data replicated over to one another continuously. Can my router (acting like switch) run full duplex and allow separate communications without dividing the LAN speed?

Or is my router limited, and a switch is the only device capable of running full duplex. Is the router act like a hub, half duplex?

I've searched up "router as a switch" in the search engine but none of them cover this issue sadly.

Hubs basically haven't existed for the past 10 years or so. People still call them hubs, but they're really switches. The router has two components inside the same box, a switch (that runs full duplex) and a router. The switch can be connected to another switch and as network engineers call it, cascade on to other switches. If you purchase an additional router to use the LAN ports to extend your network, it could be a mess if you don't disable all of the router software on the second unit. Dedicated switches typically have better hardware that is able to provide slightly lower latency.

http://www.newegg.com/Product/ProductList.aspx?Submit=E...$10%20-%20$25

and there's three more that are less than $10.
m
0
l
January 26, 2011 11:48:59 PM

someone19 said:
If you purchase an additional router to use the LAN ports to extend your network, it could be a mess if you don't disable all of the router software on the second unit.


Thanks for your reply. By disabling the software on the second router(one being used as a switch), what do you mean exactly? I've read over some documentation, and came across someone having a similar setup as the one I described:
ISP -> ROUTER -> ROUTER(used as switch) -> Multiple PC's

They were advised to do this: "The 2nd router should get a wan ip by dhcp from the first router. Leave dhcp off on the 2nd router. This should make all the wireless connections get their ip from the first router."

Is this what you are proposing, or is there other software you are referring to?

Thanks
m
0
l
January 27, 2011 12:03:37 AM

invulnarable27 said:
Thanks for your reply. By disabling the software on the second router(one being used as a switch), what do you mean exactly? I've read over some documentation, and came across someone having a similar setup as the one I described:
ISP -> ROUTER -> ROUTER(used as switch) -> Multiple PC's

They were advised to do this: "The 2nd router should get a wan ip by dhcp from the first router. Leave dhcp off on the 2nd router. This should make all the wireless connections get their ip from the first router."

Is this what you are proposing, or is there other software you are referring to?

Thanks

Without a context of what the other people are discussing, I can't agree or disagree.

Using two routers in a LAN is ill-advised. The router portion of the device wants to be able to direct and control the network its attached to, and if there are two of them, everybody gets confused. I really don't like the idea of having one router connect to a different router's WAN port, as now any computers connected to the second router in line are double nat'd. You don't need to know what that means, its just bad. Everybody will be able to connect to the internet just fine, but the PC's won't be able to communicate, and some internet services might not work as intended for any of the computers that are in the double nat situation.

Why are you considering this again? Cost? Adding wireless? Got one for free and need to know how to set it up? Curious?
m
0
l
January 27, 2011 1:01:30 AM

Yes, I had a spare router at home that was collecting dust. I just tried it out, ur right internet access is fine, but LAN communication is nonexistent.

Found my answer, thread done.
m
0
l
January 27, 2011 1:14:19 AM

Since you have it, what brand / model? You might be able to disable the router stuff and use it as a plain ol' switch.
m
0
l

Best solution

January 27, 2011 3:15:46 AM

Difference between router / switch is how they approach the OSI model. Switch's control and route packets based on layer 2, the MAC address. If a packet comes in one port, the switch will read the header and route the packet to the port with the destination MAC address. A "hub" is an older device that would receive a packet on one port and transmit that packet to every other port on the device, it would never read the packet header.

A Router is a device that routes based on the IP address from Layer 3 of the OSI model. It receives a packet, looks into an internal table called a "routing table" to determine the destination of the device and sends to through the proper port to the next hop router who then sends it to the next one and so forth until the packet gets to its intended destination. A router is not a switch and doesn't care about layer 2 routing nor does it contain a switch.

Now your "home router" that is so common these days is actually several devices rolled up into one. Its a Firewall + Router + Switch and often + Wireless AP all put together into one small low-power device. The internal router has three ports, one being WAN (eth0) second being LAN (eth1) and the third being wireless (wl0) if included. Most home routers have wl0 and eth1 bridged in software, you can unbridge them if you want and use them as separate networks. There is also an internal five (or more) port switch with one port of the switch physically wired to the routers eth1 port, the wiring is on the internal PCB and the home user never sees it.

DHCP is a completely separate function that has nothing to do with routers or switch's. Router manufacturers have implemented DHCP inside the routers software as a feature for easy home use. This is the same with the wireless AP function, its just software that has been included inside the router for easy home use. NAT is something the router does to mask your private LAN IP address's from the world and allow you to use a single ISP provided IP address for external access from your LAN.

You can use a home router as a switch, don't connect anything to the WAN port and its no longer a router. The switching circuitry is a separate device and will function as a switch regardless of what the router itself is trying to do. You can also disable the router function completely or just disable the NAT function and use the 2nd router to build as a subnet.
Share
January 27, 2011 9:22:31 AM

I doubt either of them will be able to completely remove the added routing bits and not cause problems with your network.
m
0
l
January 27, 2011 4:20:48 PM

palladin9479 said:
You can use a home router as a switch, don't connect anything to the WAN port and its no longer a router. The switching circuitry is a separate device and will function as a switch regardless of what the router itself is trying to do. You can also disable the router function completely or just disable the NAT function and use the 2nd router to build as a subnet.



Hi Palladin9479,

Can you describe how to disable the router function completely, or disable the NAT? I don't have any experience in this field unfortunately.

Also when you say don't connect anything to the WAN port, I tried it yesterday: Plugged an ethernet cable from Router to leftover router's LAN Port. Nothing happened. My computers couldn't access the internet and couldn't see each other on the LAN. Maybe cuz I didn't know how to disable the router function. The old router was broadcasting a separate signal again unfortunately.
m
0
l
January 28, 2011 12:45:08 AM

Quote:
I doubt either of them will be able to completely remove the added routing bits and not cause problems with your network.


No such thing as "routing bits". The when a router sends out a packet it appends routing information to the header unless your doing a GRE tunnel, in which case the entire packet is encapsulated and sent as a datagram to the tunnel destination. Connect two nodes to the switch ports and the switch will act exactly like a switch, it will route the local packets based on MAC address. To the router software ~every~ switch port is the same interface and would be promptly ignored unless the datagrams destination address where the routers own address.

@invulnarable2

We need to establish a basic lay out first.

Router 1 (Internet GW)
WAN Port (eth0) -> Internet connection, Cable / DSL modem ect ..
LAN Port 1~3 (eth1) -> local network devices
LAN Port 4 (eth1) -> cross over cable (if the port is not autosensing) Router 2 LAN Port 1

Router 2 (internal switch)
WAN Port (eth0) -> disconnected
LAN Port 1 (eth1) -> cross over cable to Router 1 LAN 4
LAN Port 2~4 (eth1) -> local network devices

Configure router 1 like you would any SOHO PC router. In router 2 you must set the router mode to "none / disabled", depending on the make / model there should be an option for that. On linksys routers its listed as "Internet Gateway, Router, Disabled" with internet gateway being router + NAT, router being route without NAT, and Disabled being to disable the routing entirely.

Next you have to understand how IP address's work, you should only use DHCP for wireless devices or devices that will connect / disconnect often otherwise all other items should have static IP address's. This fixes many configuration problems that tend to arise. DHCP requests are special broadcasts, most SOHO / basic switch's will not pass them to the intended DHCP server, some will though.

Actually something very interesting happens when your using those two routers like that. The second router even with routing disabled most likely still has its DHCP server enabled and will try to hand out DHCP address's with itself as the gateway. This is an invalid configuration and instead the 2nd router should be configured to either not give out DHCP and instead rely those requests to the first, or to hand out its own section of IP space and use the 1st router's IP as the gateway. Or you can just statically configure everything and not have to deal with DHCP headaches.
m
0
l
January 28, 2011 12:50:34 AM

A separate note about SOHO "routers". They are just miniature computers running a Linux or VMS (Cisco) based operating system using iptables as their routing engine, a dhcp service software and some sort of packet inspection program. They have a CPU, usually running 200~300 MHZ and anywhere from 8 to 32MB of RAM and 8~16MB of ROM FLASH. They have a web frontend software package that you use to configure them and is what you see when you do http://routerip. Their switching capability is provided by a dedicated network switching chip that is hardwired to their local network interface. Configure it for SSH and you can putty into it and get root access, then do all sorts of cool linux stuff.

This is important to keep in mind when your dealing with these, there is no secret sauce.
m
0
l
January 28, 2011 6:53:03 PM

Quote:
Be sure to disable DHCP server on the second router and set the second routers address to something different than the first if you want to access it on the network. Your second router will act like a switch so your first router will be assigning IP addresses to them so make sure you have DHCP on the first router.


I just got into networking and don't know how to do this. I am running Fios right now, and my old routers were on DSL or something, .80Mbps speed. If I need to configure the DHCP I would type this into the url right: 192.168.1.1. However this connects to my Fios account, not the old routers. How would I do the above mentioned exactly?

I am not subscribed anymore to DSL, so I dont think accessing the old router menu will work. Unless anyone has any bright ideas?
m
0
l
January 28, 2011 7:00:40 PM

palladin9479 said:
They have a web frontend software package that you use to configure them and is what you see when you do http://routerip. Their switching capability is provided by a dedicated network switching chip that is hardwired to their local network interface. Configure it for SSH and you can putty into it and get root access, then do all sorts of cool linux stuff.


I asked didaggle about this, but if I am not subscribed to DSL anymore, how can I configure the old router? Typing http://routerip brings me to my Fios router menu.
m
0
l
January 28, 2011 7:33:17 PM

Quote:
Tell me. How many routers do you have connected at the moment?


Just the one Fios router. Older router models are posted earlier in thread.
m
0
l
January 28, 2011 8:18:22 PM

router works at Level3 or higher. They are meant to transmit data between networks. Switches are meant to be dumb and just let local machines talk.

eg. a router may know which "route" of many different routes to send a packet in order to get it across the internet. A switch doesn't know anything except what MAC addresses are on the local network.

Some higher end enterprise switches have routing capabilities, but are targeted for local network routing for a large LAN. True routers are meant to allow the local LAN to communicate with the internet. They may have a lot of the same features, but true routers are more fine tunes for WAN-to-LAN communication.
m
0
l
February 5, 2011 4:19:01 PM

Best answer selected by invulnarable27.
m
0
l
!