802.1q vlan transfer from real to Guest

Discussions related to using VirtualBox on Linux hosts.
Post Reply
ertanerbek
Posts: 45
Joined: 16. Aug 2011, 15:01
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: all of them
Location: Türkiye
Contact:

802.1q vlan transfer from real to Guest

Post by ertanerbek »

Hi All,
Image
https://i.hizliresim.com/kO9dBJ.png

I have one topology as linked picture file. On that topology I traying transfer real device to Virtualbox Guest via VLAN from my Debian ethernet adaptor via eno2. On that topology all system can comminicate togather but real hardware to guest upload speed horribly low, for your example I can download with 1Gigabit speed from any VirtualGuest to real hardware but I can send from real to virtual guest with 3-5 Mbit speed. In this case I try passthrough my real ethernet to Virtualbox guest via intel iommu also my real cpu and main board can support this system, but this time I experiance another problem with virtualbox, Virtualbox want ich9 chipset for passthrough.

I am sure my all VLAN setup correct, because I never see any duplicate packet or wrong VLAN header on any packet, but I realy not understand why I can transfer my real hardware packet to Virtualbox Guest horribly low speed. So anyone can assit my about Linux core to Virtualbox VLAN transfer ? Why I do not understand but Virtualbox and Linux can not agreesss about VLAN packet comming from real to Guest.

Hos Operation System : Debian 9.3
Virtualbox : 5.2.6
Epension : ok
Real hardware Switch : DrayTek G2080
Guest Operation System : VyOs 1.1.8 ( Debian 6 )

Code: Select all

root@virtserver:~# dmesg | grep -i iommu
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.9.0-6-amd64 root=UUID=612223a1-82d6-4e4d-8f09-26ad38b3ec8d ro quiet intel_iommu=on iommu=pt
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.9.0-6-amd64 root=UUID=612223a1-82d6-4e4d-8f09-26ad38b3ec8d ro quiet intel_iommu=on iommu=pt
[    0.000000] DMAR: IOMMU enabled
[    0.027985] DMAR-IR: IOAPIC id 8 under DRHD base  0xfed90000 IOMMU 0
[    0.649171] iommu: Adding device 0000:00:00.0 to group 0
[    0.649187] iommu: Adding device 0000:00:01.0 to group 1
[    0.649199] iommu: Adding device 0000:00:06.0 to group 2
[    0.649207] iommu: Adding device 0000:00:1a.0 to group 3
[    0.649215] iommu: Adding device 0000:00:1c.0 to group 4
[    0.649223] iommu: Adding device 0000:00:1c.4 to group 5
[    0.649231] iommu: Adding device 0000:00:1c.6 to group 6
[    0.649238] iommu: Adding device 0000:00:1c.7 to group 7
[    0.649246] iommu: Adding device 0000:00:1d.0 to group 8
[    0.649254] iommu: Adding device 0000:00:1e.0 to group 9
[    0.649269] iommu: Adding device 0000:00:1f.0 to group 10
[    0.649276] iommu: Adding device 0000:00:1f.2 to group 10
[    0.649284] iommu: Adding device 0000:00:1f.5 to group 10
[    0.649288] iommu: Adding device 0000:07:00.0 to group 1
[    0.649292] iommu: Adding device 0000:08:01.0 to group 1
[    0.649296] iommu: Adding device 0000:08:05.0 to group 1
[    0.649301] iommu: Adding device 0000:08:07.0 to group 1
[    0.649305] iommu: Adding device 0000:08:09.0 to group 1
[    0.649313] iommu: Adding device 0000:09:00.0 to group 1
[    0.649320] iommu: Adding device 0000:0a:00.0 to group 1
[    0.649327] iommu: Adding device 0000:0b:00.0 to group 1
[    0.649333] iommu: Adding device 0000:0c:00.0 to group 1
[    0.649359] iommu: Adding device 0000:03:00.0 to group 11
[    0.649379] iommu: Adding device 0000:03:00.1 to group 11
[    0.649387] iommu: Adding device 0000:04:00.0 to group 12
[    0.649412] iommu: Adding device 0000:01:00.0 to group 13
[    0.649424] iommu: Adding device 0000:01:00.1 to group 13
[    0.649436] iommu: Adding device 0000:01:00.2 to group 13
[    0.649447] iommu: Adding device 0000:01:00.4 to group 13
[    0.675308] AMD IOMMUv2 driver by Joerg Roedel <jroedel@suse.de>
[    0.675308] AMD IOMMUv2 functionality not available on this system
[    4.924920] vboxpci: IOMMU found
[    6.803260] vboxpci: created IOMMU domain ffff89cb6d3d0a08
[    8.954226] vboxpci: created IOMMU domain ffff89cb6d3d1f08
[   15.207762] vboxpci: created IOMMU domain ffff89cb6e033f08
[   18.326802] vboxpci: created IOMMU domain ffff89cb6d068a48
[   21.020176] vboxpci: created IOMMU domain ffff89ca682c9f48
[   24.237125] vboxpci: created IOMMU domain ffff89ca682c94c8
[   26.222412] vboxpci: created IOMMU domain ffff89ca682c8a48
[   28.996393] vboxpci: created IOMMU domain ffff89ca222d5488
[   32.272515] vboxpci: created IOMMU domain ffff89ca222d4a08
[   34.876817] vboxpci: created IOMMU domain ffff89ca222d5f08
[   37.565511] vboxpci: created IOMMU domain ffff89c9c30194c8
[   40.189035] vboxpci: created IOMMU domain ffff89c9c3019f48
[   43.138884] vboxpci: created IOMMU domain ffff89c9862d5f08
[   45.662085] vboxpci: created IOMMU domain ffff89c9862d4a08
[  367.982858] vboxpci: freeing IOMMU domain ffff89ca682c94c8

Code: Select all

root@virtserver:~# lshw -c network -businfo
Bus info          Device           Class      Description
=========================================================
pci@0000:09:00.0  enp9s0           network    AR8131 Gigabit Ethernet
pci@0000:0a:00.0  enp10s0          network    AR8131 Gigabit Ethernet
pci@0000:0b:00.0  enp11s0          network    AR8131 Gigabit Ethernet
pci@0000:0c:00.0  enp12s0          network    AR8131 Gigabit Ethernet
pci@0000:03:00.0  eno1             network    NetXtreme BCM5720 Gigabit Ethernet PCIe
pci@0000:03:00.1  eno2             network    NetXtreme BCM5720 Gigabit Ethernet PCIe
                  vnetsv1v300      network    Ethernet interface
                  vnetsv13vTrunk   network    Ethernet interface
                  vnetsv1v100      network    Ethernet interface
                  sw1              network    Ethernet interface
                  vnetsv13v300     network    Ethernet interface
                  vnetsv2v101      network    Ethernet interface
                  vnetsv13v100     network    Ethernet interface
                  vnetsv2v201      network    Ethernet interface
usb@1:1.1         enx00249b0b48a3  network    Ethernet interface
                  sw2              network    Ethernet interface
                  vnetsv1v200      network    Ethernet interface
                  l3sw1            network    Ethernet interface
                  vnetsv2v301      network    Ethernet interface
                  vnetsv13v200     network    Ethernet interface
usb@1:1.2         enx00249b0b48a2  network    Ethernet interface
                  ovs-system       network    Ethernet interface

Code: Select all

e-diablo@virtserver:~$ VBoxManage modifyvm "LAB Route VyOs" --pciattach 0c:00.0.1
VBoxManage: error: Host PCI attachment only supported with ICH9 chipset
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component SessionMachine, interface IMachine, callee nsISupports
VBoxManage: error: Context: "AttachHostPCIDevice(iHostAddr, iGuestAddr, TRUE)" at line 3053 of file VBoxManageModifyVM.cpp

e-diablo@virtserver:~$ sudo VBoxManage modifyvm "LAB Route VyOs" --pciattach 0c:00.0.1
VBoxManage: error: Could not find a registered machine named 'LAB Route VyOs'
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "FindMachine(Bstr(a->argv[0]).raw(), machine.asOutParam())" at line 516 of file VBoxManageModifyVM.cpp

Code: Select all

e-diablo@virtserver:~$ ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 34:64:a9:9a:09:ac brd ff:ff:ff:ff:ff:ff
3: enp9s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether d4:ca:6d:13:9a:0e brd ff:ff:ff:ff:ff:ff
4: eno2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 34:64:a9:9a:09:ad brd ff:ff:ff:ff:ff:ff
5: enp10s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether d4:ca:6d:13:9a:0f brd ff:ff:ff:ff:ff:ff
6: enp11s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether d4:ca:6d:13:9a:10 brd ff:ff:ff:ff:ff:ff
7: enp12s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether d4:ca:6d:13:9a:11 brd ff:ff:ff:ff:ff:ff
8: enx00249b0b48a3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP mode DEFAULT group default qlen 1000
    link/ether 00:24:9b:0b:48:a3 brd ff:ff:ff:ff:ff:ff
9: enx00249b0b48a2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP mode DEFAULT group default qlen 1000
    link/ether 00:24:9b:0b:48:a2 brd ff:ff:ff:ff:ff:ff
10: vnetsv1v100: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast master ovs-system state DOWN mode DEFAULT group default qlen 1000
    link/ether a6:c2:11:fa:91:b1 brd ff:ff:ff:ff:ff:ff
11: vnetsv1v200: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast master ovs-system state DOWN mode DEFAULT group default qlen 1000
    link/ether 66:e6:8c:9f:2d:e5 brd ff:ff:ff:ff:ff:ff
12: vnetsv1v300: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast master ovs-system state DOWN mode DEFAULT group default qlen 1000
    link/ether ea:e6:4c:b2:0f:b1 brd ff:ff:ff:ff:ff:ff
13: vnetsv2v101: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast master ovs-system state DOWN mode DEFAULT group default qlen 1000
    link/ether fa:f9:45:1c:36:e9 brd ff:ff:ff:ff:ff:ff
14: vnetsv2v201: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast master ovs-system state DOWN mode DEFAULT group default qlen 1000
    link/ether 6e:07:3d:71:a7:78 brd ff:ff:ff:ff:ff:ff
15: vnetsv2v301: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast master ovs-system state DOWN mode DEFAULT group default qlen 1000
    link/ether 92:41:b1:ff:7d:c0 brd ff:ff:ff:ff:ff:ff
16: vnetsv13vTrunk: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP mode DEFAULT group default qlen 1000
    link/ether 46:70:91:75:ed:7f brd ff:ff:ff:ff:ff:ff
17: vnetsv13v100: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast master ovs-system state DOWN mode DEFAULT group default qlen 1000
    link/ether 26:0a:ea:bc:7c:ab brd ff:ff:ff:ff:ff:ff
18: vnetsv13v200: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP mode DEFAULT group default qlen 1000
    link/ether 6e:d9:27:12:88:4f brd ff:ff:ff:ff:ff:ff
19: vnetsv13v300: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast master ovs-system state DOWN mode DEFAULT group default qlen 1000
    link/ether 16:70:9e:f3:63:10 brd ff:ff:ff:ff:ff:ff
20: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 8e:af:47:5c:91:2f brd ff:ff:ff:ff:ff:ff
21: sw1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:24:9b:0b:48:a3 brd ff:ff:ff:ff:ff:ff
22: sw2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:24:9b:0b:48:a2 brd ff:ff:ff:ff:ff:ff
23: l3sw1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether da:ea:44:51:57:4b brd ff:ff:ff:ff:ff:ff
Last edited by socratis on 24. Feb 2018, 19:39, edited 1 time in total.
Reason: Enclosed the information in [code] tag for better readability
ertanerbek
Posts: 45
Joined: 16. Aug 2011, 15:01
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: all of them
Location: Türkiye
Contact:

Re: 802.1q vlan transfer from real to Guest

Post by ertanerbek »

Hi All,

I fixed this problem, this problem coused from MTU.

Real Router WAN 1500 MTU -> Real Switch Port 2 to Port 1 MTU 1500 -> Real Server Ethernet Port ( bride or real one booth ) MTU 1500 -> Software Router LAN or any VLAN MTU 1500

So in this case real server can not transfer my packet to virtual router exacly, because of that I change my sistem as this,

Real Router WAN 1500 MTU -> Real Switch Port 2 to Port 1 MTU 9000 -> Real Server Ethernet Port ( bride or real one booth ) MTU 9000-> Software Router LAN or any VLAN MTU 9000 I know 9000 bayte is very big but maybe I will tray jumbo feame in future :).


in this moment all systerm work perfectly...
Post Reply