What is a difference between HUB and Switch with Port Mirroring?

Before reading this articles, you can check also following ones:

The Port Miroring feature was introduced on switches because of a fundamental difference that switches have with HUBs. When a HUB (see Figure 1) receives a packet on one port, the HUB sends out a copy of that packet on all ports except the one from where it was received (see below figure for illustration of HUB's work).

Figure 1. HUB

After a switch boots (see Figure 2), it starts to build up a Layer 2 forwarding table on the basis of the source MAC address of the different packets that the switch receives. After this a forwarding table is built, the switch forwards traffic that is destined for a MAC address directly to the corresponding port.

Figure 2. Switch

In a contrast to a HUB (which is a "dumb" repeater), managed switch with port mirroring (see Figure 3) feature is a "smart" repeater: it allows a configuration of which port(s) to monitor and where to send a copy of received packets. So, a copy of packets are sent to only one destination (analysis) port, while HUB sends copy of packets to all ports.

Figure 3. Switch with Port Mirroring

Table. Difference between HUB and Managed Switch with Port Mirroring support
 HUBManaged Switch with Port Mirroring
Performanceacceptable for 3-5 devices, connected to a HUBhigh performance
Voip packets prioritization (QOS)Not supported. Quality of audio during a call may degrade if other computers, connected to a HUB, use intensively a network bandwidth, for example, download large file during an active call.QOS is supported. Voip audio packets are given the higher priority than a general network traffic. Thus quality of audio is guaranteed.
Configurationno configuration availableconfiguration via web or command line interface
Source ports for monitoringall ports are permanently mirroredadministrator can specify which port or ports (or even VLAN) should be mirrored
Destination ports for monitoringall ports on a HUB receive a copy of packets, which are transmitted through a HUB.

only single port can be configured to receive a copy of packets, which are sent through monitored ports.

Althoug some of switches support multiple mirror sessions.


Related articles: