Skip to main content

Hub vs Bridge vs Switch


Hub
Layer: Physical Layer
Connects network segments (wires) and broadcast traffic (without knowing to know MAC). 

Bridge
Layer - Data Link Layer
Connects two network segments (wires) and forward packets based on the MAC. 
Can be a software or a hardware. 

Switch
Layer - Data Link Layer
Multiple bridges are implemented in a switch hence it can forward traffic between more than two network segments based on the MAC. 





Comments

Popular posts from this blog

Running a docker container in host network namespace

Docker is utilizing network namespaces of Linux to provide the isolation for the containers. However, it is possible to define in which network namespace the container should be running. Hence, we can also get a container running in the host network. docker run --name hostbusybox --network=host busybox Since the above container is running in the host network, the interface of the container can be seen with the following command ip addr list

Default VirtualBox network with NAT

VirtualBox uses a NAT by default to allow each VM to reach internet. https://www.nakivo.com/blog/virtualbox-network-setting-guide/ Default IP assigned to the VM is 10.0.2.15 Default Gateway is 10.0.2.2 Read more: https://www.nakivo.com/blog/virtualbox-network-setting-guide/