[Mageia-dev] network interface renaming not working anymore

Christiaan Welvaart cjw at daneel.dyndns.org
Thu Aug 16 22:55:19 CEST 2012


On Thu, 16 Aug 2012, Colin Guthrie wrote:

> 'Twas brillig, and Christiaan Welvaart at 16/08/12 20:30 did gyre and
> gimble:
>> hi,
>>
>> When I finally rebooted a cauldron system that acts as a router, it
>> turned out the network interfaces eth0 and eth1 were switched, exposing
>> "internal" services to the outside world and leaving me without internet
>> access. Syslog contains:
>> Aug 15 22:48:29 zem systemd-udevd[404]: error changing net interface
>> name eth0 to eth1: File exists
>> Aug 15 22:48:29 zem systemd-udevd[404]: error changing net interface
>> name eth1 to eth0: File exists
>>
>> Of course this has worked for years, so it breaking is not something
>> anyone would expect. It also seems to be unneeded. After some looking
>> around I could (temporarily) fix it quite easily by adding:
>>         ifrename -i eth0 -n rename0
>>         ifrename -i eth1 -n rename1
>>         ifrename -i rename0
>>         ifrename -i rename1
>> to /etc/init.d/network and describing the mapping in /etc/iftab . So now
>> I have two questions:
>> - Has anyone else seen this?
>> - What change is causing this: kernel, udev/systemd, or something else?
>>
>> The network devices use the same driver so there is no other way to
>> distinguish them than by MAC address or PCI ID.
>
> Yeah this is no longer supported upstream as it was apparently very
> hacky. Last time I asked Kay about it, there was something else to
> replace it but I've not followed up what that is recently. I'll ask him
> again next time we're chatting.

So it's udev (I tried to install an old udev but that didn't work). Commit 
looks to be:
http://cgit.freedesktop.org/systemd/systemd/commit/src/udev?id=97595710b77aa162ca5e20da57d0a1ed7355eaad

Waiting 90s hoping the interface name becomes available is no fun of 
course but in fact this works fine when the user configured it properly: 
it did exactly what I now use as workaround only without global control. 
So we could simply revert it but I wonder why this change was considered 
necessary. So far I have not found any discussion about it.


     Christiaan


More information about the Mageia-dev mailing list