Re: Assigning to new NICs the previous interface names.
On Thu, 29 Jul 2010 14:06:24 +0700, Sthu Deus wrote:
> Thank You for Your time and answer, Camaleón:
>
>> Just guessing, but... how about changing/adjusting their udev names
>> matching their MAC address?
>
> In my view it is impossible (though correct me if I'm wrong here): I do
> not know the MACs of the new NICs that will be installed as a
> replacement for the existing ones.
I'm not following you here. You can:
1/ Write the rules _after_ plug-in the cards: they will get detected as
eth2 and eth3 then you only have to adjust the udev rules.
2/ Write the rules _before_ plug-in the cards: you can edit the udev
rules and create new ones by reading the MAC address of the adapters
which is printed (or "sticked") on the card.
Udev rules for network adapters are used to have persistent names for
uniquely identifying eth0, eth1, eth2, eth(n) with a physical device...
in the same manner that udev handles hard disks.
So, if your goal is to replace the current ethernet cards with a newer
ones and keep the iptables rules to match the older ("eth0", "eth1")
names -which will be pointing to the legacy/removed devices-, you just
need to update the rules so that the new adapters get the older names. I
know, it sounds a bit messy.
>> /etc/udev/rules.d/70-persistent-net.rules
>>
>> Once/if that file gets modified, take care for the rest of the involved
>> files (/etc/networking/interfaces) are pointing to the right devices.
>
> Is possible to be done somehow automatically (by the tools available for
> Debian and not writing my own scripts)?
Unless I'm wrong, I see no objection to edit "70-persistent-net.rules"
directly. Dunno if there is another "Debian-way" (manual or automatic)
for this :-?
Greetings,
--
Camaleón
Reply to: