GeneralThis forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Sounds to me like you want to google for a network hardware tutorial for detailed info...
Hubs and switches are very similar. A hub simply repeats any ethernet frames that come in on a port to all the other ports (including the one that the frames came in on). It's literally a repeater, all the ports are effectively connected all the time. This means that only a single machine can transmit data at any time, regardless of its destination.
A switch is a bit more intelligent. It looks at the ethernet frame that's arriving and uses it's destination (from the MAC address) to decide which ports to connect together (hence the name switch) so only the destination machine receives the frame. This has the advantage that multiple machines can talk through the switch at the same time, you can have full-duplex communication, and its more secure as not everyone 'sees' all the network traffic.
Routers typically work at a higher level than hubs/switches. (In the case of IP) They make a decision about what to do with the IP packet that arrives on one interface based on things like the destination IP address (most commonly) and possibly the source IP address or TOS flags. Typically they just forward packets to somehwere else, although sometimes they will drop packets, or send errors back to the source of the packet to indicate say a network failure.
Typically hubs/switches are used to connect machines together that are on the same subnet, routers are used inbetween subnets.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.