Click to See Complete Forum and Search --> : difference between hub and switch


criatura
08-17-2003, 08:15 PM
What is the difference between a hub and a switch? also i am trying to connect 2 routers to make more ports (the only reason i am using 2 routers instead of a router and a switch/hub is b/c i already own 2 routers).
i tried just connecting the WAN port on the 2nd router to the uplink port on the first one but it isn't working and i tried some other ports but that didn't work either. any suggestions would be helpful

kshim5
08-17-2003, 08:35 PM
Hubs are commonly used to connect segments of a LAN.

A switch is a device that filters and forwards packets between LAN segments.

michaelk
08-17-2003, 09:06 PM
A hub is a dumb device. When one PC sends Traffic it will be sent to all ports at once.

A switch is a smart device. It will learn which computer is on which of its ports and instead of retransmitting traffic to all of its ports will just send to that specific port/PC.

No reason why you can't use two routers. Be sure to check your documentation on the routers. Uplink ports usually need crossover cables but some routers have a switch on the uplink port that will allow either straight or crossover cable. You might want to set the WAN port to a fixed IP address of the first router to just make things easier to get things configured.

Be sure to make the local IP addresses something different.
2nd router WAN port should match 1st routers i.e 192.168.0.xxx
2nd routers local IP should be set something like 192.168.1.xxx

criatura
08-17-2003, 09:14 PM
thanks much! i just had to change the range of IPs on the second router and it works like a dream (didn't need a crossover jsut a straight through for anyone in the future)

chort
08-17-2003, 09:50 PM
And because I didn't see anyone mention it yet, it's important to note that hubs will only allow HALF duplex media settings, while switches allow up to FULL duplex. If you force a device to 100/full to a hub, you're in for a world of hurt.

Usually broadband routers (such as those from Linksys, Netgear, D-Link, Belkin, etc) contain switched interfaces, so treat them as a switch unless the documentation notes otherwise. Also as mentioned above, they'll do NAT as a hardwired function, so when you plug them into another network device you need to set the WAN IP to something in the range of the device it's plugged into, but the LAN IP range needs to be a separate subnet.

Final point, since hubs just repeat all traffic to all ports it is possible to put a network sniffer (tcpdump, snoop, Ethereal, etc) on any port and listen to ALL traffic that goes across the hub (no matter what IP it's supposed to go to). On a switch the traffic normally only gets sent to the port which has the MAC address the traffic is supposed to go to, so normally using sniffers on a switch does not work (there are special exceptions to that rule, but they're out of the context of this discussion).

sharth
08-17-2003, 10:06 PM
usually, you connect the uplink to a normal numbered port, I messed that up first time i tried linking multiple routers togeater.