Switched Network

Switched network involves the use of a device that filters, forwards, or floods frames based on the destination address of each frame. Switches perform their routing functions at the layers 2 model of the OSI. Some switches process data at the Network Layer (layer 3), This types of switches are referred to as layer 3 switches or multilayer switches. Switches form integral parts in networking LAN or WANs. Small office, Home office ( SOHO) applications normally, use a single or an all-purpose switch.

The network switch is a very adaptable Layer 2 device; it replaces the hub as the central point of connection for multiple hosts.
In a more complex role, a switch may be connected to one or more other switches to create, manage, and maintain redundant links and VLAN connectivity. A switch processes all types of traffic in the same way, regardless of how it is used.

Switches move traffic base on MAC addresses. Each switch maintains a MAC address table in high-speed memory, called content addressable memory (CAM). The switch recreates this table every time it is activated, using both the source MAC addresses of incoming frames and the port number through which the frame entered the switch.

As mentioned earlier, switches operate at the data-link layer of the OSI model, switch function is to create a different collision domain per switch port. Let take an example of Four computers PC 1, PC 2, PC 3, PC 4 attached to switch ports, then PC 1 and PC 2 can transfer data between them so as PC 3 and PC 4, simultaneously without interfering with each other’s conversations.
Unlike the hub, which allows the sharing of bandwidth by all port, run in half-duplex and is prone to collisions of frames and retransmissions.

With some ISPs and other networking environments where there is a need for much analysis of network performance and security, switches may be connected between WAN routers as places for analytic modules. Some switches provide in-built firewall, network intrusion detection and performance analysis modules that can plug into switch ports.

Routed Network

On the other hand, A routed network is usually only used when a Bridged network is unavailable, either due to hosting provider restrictions or because the libvirt server is connected wirelessly to the LAN. Virtual machines (VMs) have their own IP addresses, but do not bind directly to them. Instead, packets destined for those addresses are statically routed to the libvirt server and forwarded to VMs (without using NAT).

Limitations of Routed Network

Unfortunately, libvirt’s built-in routed network automatically inserts iptables rules whether you want them or not, in an order that is difficult to control. If you would rather be in full control and prevent libvirt from interfering, create a Custom routed network instead.

On a dedicated server, a routed network is only possible when there are enough IP addresses to allocate one per VM. This is not a problem for IPv6, as hosting providers usually provide many free IPv6 addresses. However, extra IPv4 addresses are rarely free. If you only have one public IPv4 address (and need to serve clients over IPv4), either buy more IPv4 addresses or create a NAT-based network.