kvm networking on linux with macvtap and macvlan
http://virt.kernelnewbies.org/MacVTap
Macvtap is a new device driver meant to simplify virtualized bridged networking. It replaces the combination of the tun/tap and bridge drivers with a single module based on the macvlan device driver.
http://backreference.org/2014/03/20/some-notes-on-macvlanmacvtap/ This is a good read. Lays out the four main modes of macvtap: VEPA (virtual ethernet port aggregator), bridge, private and passthrough. It documents some commands used in the iproute2 suite to set the mode, and then explains the role of macvlan w.r.t. KVM/libvirt:
ip link add link eth2 macvlan2 type macvlan mode [private|vepa|bridge|passthru]
and how to show the mode
ip -d link show macvlan2
The main use of macvlan seems to be container virtualization (for example LXC guests can be configured to use a macvlan for their networking and the macvlan interface is moved to the container's namespace), but there are other scenarios, mostly very specific cases, like using virtual MAC addresses
More importantly is the macvtap interface
A macvtap interface is similar to a normal tap interface in that a program can attach to it and read/write frames. However, the similarities end here. The most prominent user of macvtap interfaces seems to be libvirt/KVM, which allows guests to be connected to macvtap interfaces. Doing so allows for (almost) bridged-like behavior of guests but without the need to have a real bridge on the host, as a regular ethernet interface can be used as the macvtap's lower device.
http://seravo.fi/2012/virtualized-bridged-networking-with-macvtap
http://wikibon.org/wiki/v/Edge_Virtual_Bridging














