Opened 5 years ago
Closed 2 years ago
#19122 closed enhancement (fixed)
RFE: Can't increase MTU size for a Host-Only adapter
Reported by: | GnomeUser | Owned by: | |
---|---|---|---|
Component: | network | Version: | VirtualBox 6.0.14 |
Keywords: | Cc: | ||
Guest type: | all | Host type: | all |
Description
The host is Ubuntu 18.04.3
# ip link set vboxnet0 mtu 9000 Error: mtu greater than device maximum.
Change History (7)
follow-up: 3 comment:1 by , 5 years ago
Guest type: | other → all |
---|---|
Host type: | Linux → all |
Summary: | Can't increase MTU size for a Host-only adapter on linux host → RFE: Can't increase MTU size for a Host-Only adapter |
Type: | defect → enhancement |
comment:2 by , 5 years ago
It is just slow, the host is running proxy and the guest can barely achieve 300 Mb/s reaching the network. Very high CPU load. I've tried to increase MTU to lower the load and probably gain more speed when I run into this error.
Host type changed from Linux to all
On Win10 host running VB 10.0.8, command
netsh interface ipv4 set subinterface "VirtualBox Host-Only Ethernet Adapter" mtu=9000
works fine. It seems to be linux host specific
comment:4 by , 4 years ago
To fix the issue just one line of code needs to be added to the function vboxNetAdpNetDevInit of VBoxNetAdp-linux.c here is the patch:
--- src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c +++ src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c @@ -274,6 +274,9 @@ pNetDev->hard_start_xmit = vboxNetAdpLinuxXmit; pNetDev->get_stats = vboxNetAdpLinuxGetStats; #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0) + pNetDev->max_mtu = 65535; +#endif pNetDev->ethtool_ops = &gEthToolOpsVBoxNetAdp;
I've built and tested it. Please include it into the next release.
comment:5 by , 3 years ago
In the VB 6.1.20 the patch was partially accepted, but the maximum MTU size was overwritten to 16110. Why? It is a virtual device.
comment:6 by , 3 years ago
Yes, the device is virtual, but the emulated devices inside the VM still have limitations. Intel E1000 has a limitation of 16128 bytes according to linux 5.11 driver code. This means a MTU of 16110. I know that virtio-net would be able to deal with more, but allowing more than the most frequently used NIC in VMs may also increase the number of complaints.
comment:7 by , 2 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Replying to GnomeUser:
That's right, MTU sizes can only be set for the "NAT" option. Changing this from a "Defect" to a "Request for enhancement" (RFE).
Are you trying to solve a specific problem by attempting to do this?