How do I get NetworkManager to assign a fixed MAC address to eth0?
In the (distant?) past, I could assign a MAC address to a network interface by adding the following stanza to to /etc/network/interfaces
:
auto eth0
iface eth0
hwaddress 00:12:34:56:78:9a
As of Lubuntu 18.04, this no longer works (because the ifupdown
package is not installed by default).
My question is, what configuration file do I edit, and how do I edit it, so that NetworkManager will assign the fixed MAC address of my choice to eth0
.
(Aside: Yes, I know that by default Ubuntu 18.04 renames eth0
to a "predictable" name like enp1s0
. I have already disabled that renaming, so I do indeed have an eth0
interface on my system.)
I have glanced at the following documentation:
The Gnome NetworkManager.conf documentation
The Gnome nm-settings documentation- Thomas Haller's Blog - MAC Address Spoofing in NetworkManager 1.4.0
Based on the above documentation, I tried adding something like the below to /etc/NetworkManager/NetworkManager.conf
:
[device]
match-device=interface-name:eth0
ethernet.assigned-mac-address=00:22:68:1c:59:b1
Unfortunately, the above does not seem to work.
My use case is that I have installed Lubuntu onto a USB stick. Upon boot of the USB stick on any system, I want NetworkManager to assign a predetermined and fixed MAC address to eth0
.
networking lubuntu network-manager configuration
add a comment |
In the (distant?) past, I could assign a MAC address to a network interface by adding the following stanza to to /etc/network/interfaces
:
auto eth0
iface eth0
hwaddress 00:12:34:56:78:9a
As of Lubuntu 18.04, this no longer works (because the ifupdown
package is not installed by default).
My question is, what configuration file do I edit, and how do I edit it, so that NetworkManager will assign the fixed MAC address of my choice to eth0
.
(Aside: Yes, I know that by default Ubuntu 18.04 renames eth0
to a "predictable" name like enp1s0
. I have already disabled that renaming, so I do indeed have an eth0
interface on my system.)
I have glanced at the following documentation:
The Gnome NetworkManager.conf documentation
The Gnome nm-settings documentation- Thomas Haller's Blog - MAC Address Spoofing in NetworkManager 1.4.0
Based on the above documentation, I tried adding something like the below to /etc/NetworkManager/NetworkManager.conf
:
[device]
match-device=interface-name:eth0
ethernet.assigned-mac-address=00:22:68:1c:59:b1
Unfortunately, the above does not seem to work.
My use case is that I have installed Lubuntu onto a USB stick. Upon boot of the USB stick on any system, I want NetworkManager to assign a predetermined and fixed MAC address to eth0
.
networking lubuntu network-manager configuration
as far as i know 18.04 usesnetplan
Probably this link helps you somehow bugs.launchpad.net/netplan/+bug/1718607 and netplan.io
– AlexOnLinux
3 hours ago
The docs says aboutassigned-mac-address
: 'Note that this property only exists in D-Bus API. libnm and nmcli continue to call this property "cloned-mac-address".' So maybe you needcloned-mac-address="00:22:68:1c:59:b1"
?
– Olorin
56 mins ago
add a comment |
In the (distant?) past, I could assign a MAC address to a network interface by adding the following stanza to to /etc/network/interfaces
:
auto eth0
iface eth0
hwaddress 00:12:34:56:78:9a
As of Lubuntu 18.04, this no longer works (because the ifupdown
package is not installed by default).
My question is, what configuration file do I edit, and how do I edit it, so that NetworkManager will assign the fixed MAC address of my choice to eth0
.
(Aside: Yes, I know that by default Ubuntu 18.04 renames eth0
to a "predictable" name like enp1s0
. I have already disabled that renaming, so I do indeed have an eth0
interface on my system.)
I have glanced at the following documentation:
The Gnome NetworkManager.conf documentation
The Gnome nm-settings documentation- Thomas Haller's Blog - MAC Address Spoofing in NetworkManager 1.4.0
Based on the above documentation, I tried adding something like the below to /etc/NetworkManager/NetworkManager.conf
:
[device]
match-device=interface-name:eth0
ethernet.assigned-mac-address=00:22:68:1c:59:b1
Unfortunately, the above does not seem to work.
My use case is that I have installed Lubuntu onto a USB stick. Upon boot of the USB stick on any system, I want NetworkManager to assign a predetermined and fixed MAC address to eth0
.
networking lubuntu network-manager configuration
In the (distant?) past, I could assign a MAC address to a network interface by adding the following stanza to to /etc/network/interfaces
:
auto eth0
iface eth0
hwaddress 00:12:34:56:78:9a
As of Lubuntu 18.04, this no longer works (because the ifupdown
package is not installed by default).
My question is, what configuration file do I edit, and how do I edit it, so that NetworkManager will assign the fixed MAC address of my choice to eth0
.
(Aside: Yes, I know that by default Ubuntu 18.04 renames eth0
to a "predictable" name like enp1s0
. I have already disabled that renaming, so I do indeed have an eth0
interface on my system.)
I have glanced at the following documentation:
The Gnome NetworkManager.conf documentation
The Gnome nm-settings documentation- Thomas Haller's Blog - MAC Address Spoofing in NetworkManager 1.4.0
Based on the above documentation, I tried adding something like the below to /etc/NetworkManager/NetworkManager.conf
:
[device]
match-device=interface-name:eth0
ethernet.assigned-mac-address=00:22:68:1c:59:b1
Unfortunately, the above does not seem to work.
My use case is that I have installed Lubuntu onto a USB stick. Upon boot of the USB stick on any system, I want NetworkManager to assign a predetermined and fixed MAC address to eth0
.
networking lubuntu network-manager configuration
networking lubuntu network-manager configuration
edited 1 hour ago
Olorin
2,433822
2,433822
asked 5 hours ago
mpbmpb
43339
43339
as far as i know 18.04 usesnetplan
Probably this link helps you somehow bugs.launchpad.net/netplan/+bug/1718607 and netplan.io
– AlexOnLinux
3 hours ago
The docs says aboutassigned-mac-address
: 'Note that this property only exists in D-Bus API. libnm and nmcli continue to call this property "cloned-mac-address".' So maybe you needcloned-mac-address="00:22:68:1c:59:b1"
?
– Olorin
56 mins ago
add a comment |
as far as i know 18.04 usesnetplan
Probably this link helps you somehow bugs.launchpad.net/netplan/+bug/1718607 and netplan.io
– AlexOnLinux
3 hours ago
The docs says aboutassigned-mac-address
: 'Note that this property only exists in D-Bus API. libnm and nmcli continue to call this property "cloned-mac-address".' So maybe you needcloned-mac-address="00:22:68:1c:59:b1"
?
– Olorin
56 mins ago
as far as i know 18.04 uses
netplan
Probably this link helps you somehow bugs.launchpad.net/netplan/+bug/1718607 and netplan.io– AlexOnLinux
3 hours ago
as far as i know 18.04 uses
netplan
Probably this link helps you somehow bugs.launchpad.net/netplan/+bug/1718607 and netplan.io– AlexOnLinux
3 hours ago
The docs says about
assigned-mac-address
: 'Note that this property only exists in D-Bus API. libnm and nmcli continue to call this property "cloned-mac-address".' So maybe you need cloned-mac-address="00:22:68:1c:59:b1"
?– Olorin
56 mins ago
The docs says about
assigned-mac-address
: 'Note that this property only exists in D-Bus API. libnm and nmcli continue to call this property "cloned-mac-address".' So maybe you need cloned-mac-address="00:22:68:1c:59:b1"
?– Olorin
56 mins ago
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1121523%2fhow-do-i-get-networkmanager-to-assign-a-fixed-mac-address-to-eth0%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1121523%2fhow-do-i-get-networkmanager-to-assign-a-fixed-mac-address-to-eth0%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
as far as i know 18.04 uses
netplan
Probably this link helps you somehow bugs.launchpad.net/netplan/+bug/1718607 and netplan.io– AlexOnLinux
3 hours ago
The docs says about
assigned-mac-address
: 'Note that this property only exists in D-Bus API. libnm and nmcli continue to call this property "cloned-mac-address".' So maybe you needcloned-mac-address="00:22:68:1c:59:b1"
?– Olorin
56 mins ago