1

Background: I'm trying to install Vivado in my WSL2 instance, but its licensing scheme requires a fixed MAC address.

I'm able to change the MAC address using the following:

sudo ip link set dev eth0 down
sudo ip link set dev eth0 address 00:15:5d:35:ea:15
sudo ip link set dev eth0 up

After this, I can verify that my MAC address has changed, but the network can't see out

ping www.google.com, for example, no longer resolves:

ping: www.google.com: Temporary failure in name resolution

I'm assuming there's some firewall or filtering or something on the windows side, preventing the interface with the new MAC address from seeing the outside world.

Any suggestions?

2
  • Does its licensing require a fixed MAC address on eth0 specifically? Nov 21, 2021 at 17:05
  • @user1686 not sure, and I'm installing it right now to see what it requires. The webbased tool just says 'hostid type' with 'ethernet mac' being the only option. Nov 21, 2021 at 18:05

2 Answers 2

2

By default, Hyper-V virtual switches (that are also used for WSL2) are set to prevent "MAC address spoofing" by the guest VMs, and will only forward frames with the MAC address that was originally assigned in the VM's configuration.

But the FlexNet licensing software is likely to look for other interface names – it seems that in addition to eth0, it will also gather MAC addresses from wlan0, bond0..9, and vmnic0..9. Any one of the found MAC addresses can be used as the "Ethernet hostid" for licensing.

(Also, at least some versions of FlexNet will look for xp0 as the very first option and use it exclusively if found, unlike the other interfaces which are combined into a list, as can be seen from the lmhostid tool.)

So if you need an interface whose MAC address will never change, create a virtual one that looks like Ethernet (Linux offers several types, either a 'dummy' interface or a 'bridge' with no members would work equally well) with one of the listed names:

ip link add vmnic0 type dummy
ip link set vmnic0 addr 00:15:5d:35:ea:15

#ip link add vmnic0 type bridge
#ip link add vmnic0 type bond
#ip tuntap add vmnic0 mode tap

I haven't tested this with Vivado specifically, but it works with other vendors that use FlexNet's generic lmgrd.

(On a physical system or a full VM, it would also be possible to rename eth0 to something else, then create a virtual eth0 in its place, but this might not work with WSL2 due to the way it's architectured.)

1
  • This definitely worked. Any clue on how to have ubuntu under WSL do this at WSL startup. I put it in my .bashrc, but I'd prefer it just be done when the subsystem starts up. Nov 23, 2021 at 23:31
1

This reply probably comes too late to be of help to you, but I've just been battling with something rather similar, in this case with a Win10 installation of ISE, which runs in a VM Red Hat-type linux. It needs a known stable eth0 MAC address for IP licensing.

The method I used, was to edit a file located at /etc/sysconfig/network-scripts/ called ifcfg-eth0 and used nano to replace a line HWADDR= <some_MAC-Address> with MACADDR=<my_wanted_MAC_address.

Still not 100% sure if this is going to fix my license issues but at least ifconfig now reports 'my_wanted_MAC_address' as having been assigned to eth0.

Note that you'll need to use sudo to edit ifcfg-eth0.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .