-
Notifications
You must be signed in to change notification settings - Fork 859
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
WSL 2 - Static MAC Address or Changing MAC After Booting Without Breaking Internet Connection #5352
Comments
Was able to repro here. |
|
Yeah, I was all ready to dupe this user-error variation #4454 when you posted, but quickly figured out that's not it. I also looked to see if there was a way to modify the adapter properties from the Windows side (by mashing keys in powershell) but had no luck. I did find that putting the MAC address back the way it was does enable packets to route properly again. Which is of no use at all, except for the data point the damage is reversible. |
HcnCreateNetwork -> HcnCreateEndpoint -> HcsModifyComputeSystem |
I don't know the peoples in here how the issue faced on this, but I faced the licensing issue from this. Need to static hardware address for using License... Is there any other place to push this issue on Windows? I'm desperate now. |
Same reason. I just wrote a script that changes MAC for before and after checking the license. |
I have the same issue. I am trying to run MATLAB in WSL2 and get a license error every time I restart the WSL because the mac addresses change. |
I filed a QnA to docs.microsoft but they commented there is no solution for this... |
Hey fritut08, |
Hey mauver15, |
Ok, I got it.
You can do this with the flows I wrote. |
No, I do not think the bond0 address is the problem. The bond0 address is not used in the license files after all. It is the eth0 address that is mentioned in the license file. So I would have to change that. |
I think I am getting the same issue with Gurobi in WSL2, the licence does not work after reboot due to |
@BoZenKhaa Yeah, but the problem is the performance. |
Sorry, I didn't mean that as solution proposal. I wanted to highlight that this issue is affecting not only Matlab licenses and that there are currently no officially recommended solutions within WSL2. |
I had the same issue with Matlab but was actually able to resolve it by setting a static Here are the steps that worked for me:
I hope this helps, at least specifically for Matlab. Many thanks to @minmossi, @mauver15, and @therealkenc for their comments and solution! This was a very annoying issue. |
Why does a program check license status with MAC address of a network interface? That's the most horrible software. 😨 |
@Biswa96 Actually, many programs do like Xilinx Vivado, although I think it's certainly a horrible decision too. |
@ailiop It's so sad that Xilinx Vivado doesn't even let me change the interface name for checking license. :( |
I have another vendor that relies on the MAC for licensing and just got bit by this. As a result, this issue has just made WSL2 useless for our needs. I hope this issues is getting some attention and a patch is forthcoming? Also, if it's possible to modify this issue's title, can it be changed to something like "WSL 2 - MAC address changes every time network interface is started"? |
Anyone know of any updates on this topic? |
I'm experiencing the same issue mentioned in the OP, which this thread has since strayed from a little. Regardless of the reason for doing it, changing the MAC address for my
The original issue is about network connection breakage whenever the MAC is changed, not about the address changing when the interface is started. |
I switch to WSL1 but this problem still exists. For WSL1, the hostid still changed after rebooting |
It is possible to add new virtual network interface with a new MAC address using this workaround #7395. But it taps into some undocumented and dangerous APIs. |
I used the intelFPGA suites and it seems that it checks only eth0 and i can't change this. So i need to put a fixed MAC ADRESS to eth0 ... |
For software that only checks
The old |
I am in the same situation as @tanguy-e . Questa does not detect a license, even when I use the script you have. here is my IP setting now: ip address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
inet xxx.xxx.xxx.xxx/20 brd xxx.xxx.xxx.xxx scope global eth1
valid_lft forever preferred_lft forever
inet6 xx:xx:xx:xx:xx::xx/64 scope link
valid_lft forever preferred_lft forever
5: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/ipip 0.0.0.0 brd 0.0.0.0
6: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0 I note that |
Thanks @darchons this works perfect. I put your snippet in a bash file " Then I created
|
When I try this approach, I got the following errors
any idea? |
Apparently, You can create sudo ip link add bond0 type bond For me, this was sufficient for then setting its MAC address as per #5866 (comment). I suspect the same will be true for cloning |
The line
`sudo ip link set dev bond0 name eth1`
is not working and need to be somehow modified
|
Ran into the same problem, I needed static MAC addresses for network authentication, so I modified WSLAttachSwitch to add the ability to add NICs with static MAC addresses: you can get my modified version here, if the author hasn't merged it yet |
Not sure why, after upgrade windows recently, I can not change the mac address, |
大佬,我想问问这个方案还能用吗,我尝试了一下显示“The application to execute does not exist: 'D:**\WSLAttachSwitch.dll'.”,我搜索了一下都没有找到这个文件 |
作者已经合并此PR,请使用作者的版本。另外我没遇到这种问题 |
Hi. Can you please collect networking logs by following the instructions below? |
I want to add my solution to the already presented bulk as well. Since my original comments (#5352 (comment)) four years ago, a few things changed but this problem still persists. I have since switched machines and reinstalled WSL and MATLAB a few times. Currently, the WSL only has two network devices by default:
When MATLAB is registered in this situation, the license will include the mac address of
Afterwards, MATLAB can be started without license errors.
|
It's really common in specified domain softwares who use FLEXlm to manage license. One MAC, one license, and one bill |
I'm also having this issue while trying to use WSL within an organization that has firewall rules locally implemented by Symantec Endpoint Protection. We can apply firewall rule to MAC but if it keeps changing, this will not work. Any ideas? |
Environment
Steps to reproduce
Expected behavior
IPv4 and IPv6 address can change(and would change), but the connection to the local physical machine and internet should be OK.
Actual behavior
I cannot use any program that requires to connect to the internet and GUI program which is attached to the local physical machine's vcxsrv X server.
The text was updated successfully, but these errors were encountered: