Jun 7, 2023

Hub, Switches, Routers, and VLANs

Every Network has at least one SWITCH and ROUTER, where it is usually more than one SWITCH 

A switch is essentially an intelligent hub that has the ability to actually look at the contents of the packets it processes and make intelligent decisions about what to do with them.
    - A hub is a layer-1 device, which means that it can do nothing but receive and amplify electrical signals
    - Switches are layer-2 devices, which means they can actually inspect the layer-2 packets and act intelligently based on the content of each packet.

What is the Difference Between An Ethernet Hub and a Switch? (Link)
Ethernet hubs and switches are networking devices that connect computers [and IP devices] together. A hub is basic, offering simple data transmission capabilities to MAC addresses over Layer-1. A switch is complex, offering security, efficiency, intelligent function, and capability to transmit to specific in-network, MAC addresses over Layer-2 and Layer-3.

- Basically, the hub only has 4 to 12 ports while the switch generally has more ports is 24. (Link)
- Switch generally if the terms of safety, have a more strictly level of security than Hub.
- Switch has faster data transfer than Hub.
- Hub has a cheaper than switch.
- Hub is influenced by the number of ports, if Hub more numerous and larger the speed goes to more slowly  of the transmission process unlike the case with the switch because the number of ports does not affect the speed of data transmission.

Before switches, hubs received Ethernet frames and forwarded them to every connected device. There was no privacy or security and performance was poor. What the network needed was a more logical device that could make decisions for where to send data and block the traffic flow to irrelevant devices. The switch accomplishes these requirements by executing four basic functions: Learning, Forwarding, Filtering and Flooding. (Link)

»» Learning: The switch learns what devices are reachable on each of its ports.
»» Forwarding: The switch forwards incoming packets just to the correct port based on the intended destination.
»» Flooding: The switch forwards incoming packets to all ports when it hasn’t yet learned how to reach the intended destination.

Switch:
    - Examines the destination MAC address of every packet it receives and forwards only to the port that leads to destination, and aren't repeated on the port that don't contain destination packet. 
    - Know where to send its data to destination port, even in equal computer.
        Port 1 : MAC Address: 40-20-08-78-84-52                               
        Port 2 : MAC Address: 2F-B6-E0-F6-EA-05
        Port 3 : MAC Address: 21-76-3D-7A-F6-1E
        Port 4 : MAC Address: 63-44-E4-A7-4F-E0
        Port 5 : MAC Address: 76-2F-F9-C8-B6-08
    - In particular, the switch is not concerned with the possibility that the payload may be an IP packet, which in turn contains an IP address. Switching does not rely on or even know about IP addresses.
    - Switching is a layer-2 function, and layer 2 is concerned with MAC addresses. IP addresses are a layer-3 concern and, thus, are hidden from switches.




Layers are the paths over which data is transmitted. The Open Systems Intercommunication (OSI) standards define layers as the model for communication over a network. 


VLANs
is fancy technique that you split a single physical network into two or more logical networks.