The world of networking revolves around hubs, switches, and routers, those are what make up an extensive majority of our home and enterprise networks nowadays (possibly now not so many hubs anymore even though!) it’s far consequently essential to recognize the difference between them and what their predominant cause is. Allow’s start off with hubs.
Notice: In this text, I may be referring to layer one, and three gadgets. Without going into too much detail approximately the OSI layer model for networking; Layer one refers to the physical communique. Layer refers to hardware-based cope with (using Mac addresses) and layer 3 refers to the logical network addressing, the usage of IP addresses.
Hubs, additionally referred to as repeaters are layer 1 devices that essentially reflect all network site visitors to every active port. That means that if a device on a hub sends statistics to some other tool at the network, all devices on that hub ought to listen to that facts and see if it is meant for them. Hubs do nothing in terms of studying facts or making decisions, due to this they’re in reality layer tools. You can probably already see that they may be very inefficient, when you have an 8 port hub with 8 gadgets on then every unmarried packet is read by means of each of the devices. Because of this form of technology, hubs are also vulnerable to collisions, wherein two devices try to speak at the same time. In present-day networking global hubs are becoming much less and less common and are being replaced through switches.
Switches Switches are layer devices, unlike hubs, they do not replicate traffic to each active port, instead, they make decisions based on layer addressing (Mac addresses). A switch will keep a record of every single Mac address that communicates to and from it, and from which port it did so. By doing this it is able to keep track of where devices are located on the network. When a packet comes into a switch it will have its layer 2 destination analyzed, the switch will then check its Mac address table to see where that device belongs, if the device is unknown to the switch then the packet will be flooded out to all ports (apart from the one it came in on). As you can see, switches are far more efficient than hubs. Collisions do not occur on switches as each port has its own collision domain.
Routers are layer 3 devices; they analyze network traffic based on its layer address, or IP address. Routers are used to link multiple networks together and they hold what is known as a routing table. This routing table contains information about different networks and where they are located. Routers are slower than switches in terms of moving traffic through a network, but this is simply because routers have to make decisions about where to send a packet, this can get quite complicated for a router when there are multiple routes to different networks when this happens a router has to calculate cost based on bandwidth, or how far away the link is for example. Routers are essential for creating a large network that consists of multiple smaller networks.
So there you have the fundamental differences between hubs, switches, and routers. Remember that hubs are becoming a lot less common due to their inefficiency, not only that but switches generally cost the same and are therefore becoming a more popular choice for small to large networks.