Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 32889  / 3 Years ago, tue, june 1, 2021, 6:29:30

In our cloud, we generate MACs with the prefix 2c:c2:60 for instances.
When we re-use an instance, or duplicate it, the new copy gets another MAC address.
When the new copy boots, the NIC gets the name eth1 due to the new MAC.



I see that in /lib/udev/rules.d/75-persistent-net-generator.rules, there are rules for known prefixes such as 52:54:00 (KVM) and VMWare (00:0c:29).
But this file should not be edited as stated in its first line.
We would like to use our own registered MAC prefix and not others' ones.



How to disable net rules generation completely?


More From » 12.04

 Answers
6

You can override the /lib/udev/rules.d/* by copying them to /etc/udev/rules.d and then modifying them.



Or alternatively, you can create a new file with a lexically higher name e. g. /etc/udev/rules.d/99-stop-persistent-net.rules with the following "do nothing" entry:



SUBSYSTEM=="net", DRIVERS=="?*", NAME="%k"


This should prevent new rules from being created as udev thinks the interface is already listed. This will also survive udev updates etc.



Sorry, don't have time to test it…


[#33216] Tuesday, June 1, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
irripri

Total Points: 164
Total Questions: 111
Total Answers: 107

Location: South Georgia
Member since Sun, Aug 8, 2021
3 Years ago
irripri questions
Mon, Aug 29, 22, 03:19, 2 Years ago
Thu, Mar 30, 23, 01:56, 1 Year ago
Thu, Dec 30, 21, 08:53, 2 Years ago
;