Linux 的 macvlan 提供了直觀的使用方式及接近實體網路的速度, 配合 systemd-nspawn 產生 container 非常方便. 但, 使用 macvlan 的 container 及 host 沒法直接互通, 有時比較不方便. 查了下, 網上的解決方案都是在 host 側加上 macvlan, 這樣 host 及 container 中的 guest 就能看見對方. 如果是用 systemd-networkd 管理網路的情況下, 可照以下步驟完達成. 首先, 加張虛擬網卡 # /etc/systemd/network/macvlan.netdev [NetDev] Name=macvlan0