Macvlan 802.1q Trunk Bridge Mode / Macvtap

564 views
Skip to first unread message

Tarik Haddouchi

unread,
Jan 6, 2022, 4:16:37 PM1/6/22
to kubevirt-dev
Hello All,
I'm currently digging the different network possibilities with kubevirt as we'd like to use it for our cloud infrastructure. Great work by the way, congrats to the team!
Actually I have 2 questions:
- First, Is there a way to have a similar configuration as Docker's Macvlan 802.1q Trunk Bridge Mode: The Ethernet link connected to a Docker host can be configured to support the 802.1q VLAN IDs. Thus each container can be connected to the Host's NIC using different subnet.
-  What is the use case of macvtap in comparaison with macvlan. I mean, as macvtap in kubevirt is still a feature gate, what could be the 'need' that would make me choose macvtap over macvlan?
Thanks in advance

Miguel Duarte de Mora Barroso

unread,
Jan 7, 2022, 4:45:45 AM1/7/22
to Tarik Haddouchi, kubevirt-dev
Macvlan would get you an interface on the pod; you'd then require kubevirt's bridge interface type to extend networking from the pod into the VM (create bridge + tap; connect pod interface and tap to the in-pod bridge, indicate in the domain XML spec that the tap device is to be used to create the emulated network device).

Macvtap gets you a macvlan interface on the pod *plus* a character device that qemu can use to create the emulated network device from. I.e. creating the in-pod bridge and tap device are not needed).
You can find more info about it in [0].
 
Thanks in advance

--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/e34b9bc3-8306-45d5-8927-687bbc1425c8n%40googlegroups.com.

Petr Horacek

unread,
Jan 7, 2022, 9:06:15 AM1/7/22
to Miguel Duarte de Mora Barroso, Tarik Haddouchi, kubevirt-dev


pá 7. 1. 2022 v 10:45 odesílatel Miguel Duarte de Mora Barroso <mdba...@redhat.com> napsal:


On Thu, Jan 6, 2022 at 10:16 PM Tarik Haddouchi <haddouc...@gmail.com> wrote:
Hello All,
I'm currently digging the different network possibilities with kubevirt as we'd like to use it for our cloud infrastructure. Great work by the way, congrats to the team!
Actually I have 2 questions:
- First, Is there a way to have a similar configuration as Docker's Macvlan 802.1q Trunk Bridge Mode: The Ethernet link connected to a Docker host can be configured to support the 802.1q VLAN IDs. Thus each container can be connected to the Host's NIC using different subnet.

The recommended way is to use linux bridges and their vlan-filtering feature. You may find this blog post interesting https://kubevirt.io/2020/Multiple-Network-Attachments-with-bridge-CNI.html.
 
-  What is the use case of macvtap in comparaison with macvlan. I mean, as macvtap in kubevirt is still a feature gate, what could be the 'need' that would make me choose macvtap over macvlan?

Macvlan would get you an interface on the pod; you'd then require kubevirt's bridge interface type to extend networking from the pod into the VM (create bridge + tap; connect pod interface and tap to the in-pod bridge, indicate in the domain XML spec that the tap device is to be used to create the emulated network device).

Macvtap gets you a macvlan interface on the pod *plus* a character device that qemu can use to create the emulated network device from. I.e. creating the in-pod bridge and tap device are not needed).
You can find more info about it in [0].
 
Thanks in advance

--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/e34b9bc3-8306-45d5-8927-687bbc1425c8n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.

Tarik Haddouchi

unread,
Jan 8, 2022, 9:11:30 AM1/8/22
to kubevirt-dev
Hello,
Thanks for the response.
Hum I see. So it gives us those two configurations, right?
MACVLAN-MACVTAP.png

Tarik Haddouchi

unread,
Jan 8, 2022, 9:19:32 AM1/8/22
to kubevirt-dev
Hello,
Thanks for the information. Indeed the blog is interesting for me. 
Reply all
Reply to author
Forward
0 new messages