Virtual networkについて

www.innervoice.in

Linux bridgeはあくまでbridge(トランスポート層に属しておりMACアドレスを見る)だから、vNICにもDHCPサーバーからIPアドレスが割り当てられる。さらに、外部ネットワーク(インターネット等)にも接続できる。

www.innervoice.in

Tap interfaces are special software entities which tell the Linux bridge to forward Ethernet frames as it is.
http://www.innervoice.in/blogs/2013/12/08/tap-interfaces-linux-bridge/

この辺りの意味がわからない。

In non-virtualized environments, the physical NIC interface will receive and process the Ethernet frames. It will strip out the Ethernet related overhead bytes and forward the payload (usually IP packets) further up to the OS.
http://www.innervoice.in/blogs/2013/12/08/tap-interfaces-linux-bridge/

であるならば、図でいうところのUplink Ethernet Port(server)でEthernet frameは削ぎ落とされるから、いくらbridgeにethernet frameを壊さないように依頼してもethernet frameはvNICに到達しないと思う。だが、実際には、例えばwiresharkなどのパケットキャプチャでethernet frameを取得できるからphysical NICではethernet frameは落とされていない?それとも、physical NICというのは、Uplink Ethernet Port(server)ではないのだろうか。

Tun/tap interface

考えても分からなかったので、tapインターフェースについて調べた

Tun/tap interfaces (略) can do userspace networking, that is, allow userspace programs to see raw network traffic (at the ethernet or IP level) and do whatever they like with it.
http://backreference.org/2010/03/26/tuntap-interface-tutorial/

つまり、tapインターフェースというのは、NICに入ってきたパッケトを加工せずにユーザープログラムに渡すのに使うvirtual interface。だから、vNICにethernet frameが残ったトラフィックをbridgeが渡すのに必要だった。bridgeのポートは自動で作成されるから置いておいて、VM側の仮想インターフェースはtapでなければ、VMethernet frameを取得できない。

ethernet or IP levelというのは、tap or tun による。

The difference between a tap interface and a tun interface is that a tap interface outputs (and must be given) full ethernet frames, while a tun interface outputs (and must be given) raw IP packets (and no ethernet headers are added by the kernel).
http://backreference.org/2010/03/26/tuntap-interface-tutorial/