-
Notifications
You must be signed in to change notification settings - Fork 812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't change MTU #3957
Comments
Looks stubbed.
Use Legit enough ask, although it is real close in spirit to #1930. WSL has limited support for low-level networking, and enumerating all the things If you can describe your use case in rough detail it will probably help prioritize. Me I'd take the work-around. |
Thank you for your reply. I have a problem that if I I also tried change MTU using netsh interface ipv4 set subinterface "イーサネット" mtu=1000 store=persistent This can normally change the network interface on the Windows side. However, when I ran |
Good cite; appreciate you sharing, thanks.
Tried your Pretty sure your MTU changed fine, and that |
I tried to set MTU to a very low value like 700. However, ssh still freezes. If MTU is actually changed, then I don't know what to do to fix my problem... |
That part I can't help you with much. That serverfault link is great on its own merits, but there is no real way to tell if (a) MTU is really the problem even if the symptom is the same and (b) even if it is, whether changing the MTU is some kind of universal solution to "the problem" isn't certain. I am not even sure what, precisely (in specific detail), is causing the We can chase the rabbit for a bit if you want, but given I won't be able to reproduce the problem on my side we're pretty limited for options here. First, when it hangs, try resizing the window -- which is #2138. Yes, nutty, and yes, long shot. But I've seen it unstick stuck connections first-hand so it is worth a try. [ed] Or try that Next, see if you can reproduce your scenario as closely as humanly possible with a win32 |
This may deserve a new issue, but it's related and the ticket is still open. I ran into an issue where the MTU of the vEthernet interface for WSL didn't update when I joined a VPN. This led me to look for a way to persist MTU settings across restarts, which worked when using @m-azuma's command (above). Should I expect interface MTU to change automatically? (i.e. is this a bug?) If not, is the a recommended way for me to detect the changed MTU settings in the guest when the network changes and adjust setting accordingly? |
This one can serve as the landing zone, to the extent the OP ask (which is changing the MTU) is still open on WSL2. In a more perfect world one could imagine the vEthernet MTU changes flowing in both directions, at least in principle. What this issue needs most is a big like count (more than a new issue). |
From a technical TCP/IP standpoint this sort of behavior is expected unless something in between tells a side that the MTU is wrong. The ICMP "needs fragmentation" message can trigger corrective behavior if the message is enabled and not dropped. Which in most cases it is not sent or is dropped because security people don't like ICMP. The best option, in my opinion, is to enable MSS clamping if the VPN product supports the option. MSS clamping was made for exactly this situation and most major VPN products should have support. When MSS clamping is enabled the VPN server enforces a maximum MTU size by altering the MSS option in the TCP header during the handshake. This option should fix the issue without requiring intervention on any OS. Options like using the netsh command or running a script/command that changes the MTU or enables tcp_mtu_probing on the WSL2 distro can be used when MSS clamping is not available. |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
Your Windows build number:
Microsoft Windows [Version 10.0.17763.379]
What you're doing and what's happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)
MTU should be set to 1000, but it doesn't changed.
The text was updated successfully, but these errors were encountered: