You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to make "ether" value from "bond0" field static across WSL sessions #5866
Is your feature request related to a problem? Please describe.
I have an application which access the "ether" value from "bond0" field as input parameters to generate a license (Note:- Without this license application cant be opened).
This ether value is found to be dynamic across WSL restarts.
So, on every WSL restart, I will have to generate another new license to continue using it.
Describe the solution you'd like
I want "ether" value under "bond0" to be static across across WSL sessions.
changed the title [-]Require ether value of bond0 field to be Static for licensing purpose[/-][+]Require ether value of bond0 field to be Static across sessions for licensing purpose[/+]on Sep 7, 2020
changed the title [-]Require ether value of bond0 field to be Static across sessions for licensing purpose[/-][+]How to make "ether" value from "bond0" field static across WSL sessions [/+]on Sep 9, 2020
This isn't materially very different from #5291 (with a side of #5352).
It does seem like changing the MAC of bond0 has no ill effects, on first glance anyway:
Will it affect accessing GUI apps, internet browsing or any other service?
Also I would like to know, if at all it affects anything, are there any irreversible affects?
Will it affect accessing GUI apps, internet browsing or any other service?
It does not seem to, on the first and only first glance I did, anyway. Can't tell you it won't with any specificity. It appears to be state DOWN so there is no obvious reason why it should. Any ill effects it did have, should they arise, would be reversible.
Sure. Something like this at the end of your /etc/sudoers. You can edit with sudo /etc/sudoers.
yourusername ALL=(ALL) NOPASSWD: /usr/bin/ip
In your .bashrc you can test and set with something like:
wantmac=00:15:5d:7d:e1:2b
mac=$(ip link show bond0 | awk '/ether/ {print $2}')
if [[ $mac != $wantmac ]]; then
sudo ip link set dev bond0 address $wantmac
fi
Activity
[-]Require ether value of bond0 field to be Static for licensing purpose[/-][+]Require ether value of bond0 field to be Static across sessions for licensing purpose[/+][-]Require ether value of bond0 field to be Static across sessions for licensing purpose[/-][+]How to make "ether" value from "bond0" field static across WSL sessions [/+]therealkenc commentedon Sep 10, 2020
This isn't materially very different from #5291 (with a side of #5352).
It does seem like changing the MAC of
bond0has no ill effects, on first glance anyway:ramees041 commentedon Sep 14, 2020
Is there a way automate it rather than typing it manually on every restart?
therealkenc commentedon Sep 14, 2020
In
.bashrcadd a test to see if the MAC has been set to the value you want, and if not, set it. Add/usr/bin/ipto/etc/sudoers.ramees041 commentedon Sep 15, 2020
Will it affect accessing GUI apps, internet browsing or any other service?
Also I would like to know, if at all it affects anything, are there any irreversible affects?
therealkenc commentedon Sep 15, 2020
It does not seem to, on the first and only first glance I did, anyway. Can't tell you it won't with any specificity. It appears to be state
DOWNso there is no obvious reason why it should. Any ill effects it did have, should they arise, would be reversible.ramees041 commentedon Sep 23, 2020
Could you please elaborate more on how can I add
/usr/bin/ipto/etc/sudoers?I am afraid I might do it wrong.therealkenc commentedon Sep 23, 2020
Sure. Something like this at the end of your
/etc/sudoers. You can edit withsudo /etc/sudoers.In your
.bashrcyou can test and set with something like: