[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: udev won't let me change my network interface?



In <[🔎] 4A9D0FF1.6050108@cox.net>, Ron Johnson wrote:
>On 2009-09-01 06:51, C. G. Montgomery wrote:
>> Kevin Ross Kevin@FamilyRoss.net wrote:
>>> Edit /etc/udev/rules.d/70-persistent-net.rules to change the name of the
>>> device.  Edit /etc/network/interfaces to change its configuration (IP
>>> address, DHCP or static, etc).  The names must match in both files.
>> When I first tried changing the interface, I edited
>> /etc/network/interfaces as I described and removed the
>> file /etc/udev/rules.d/70-persistent-net-rules, and then rebooted.

I think you were told to edit 70-persistent-net-rules, not remove it.

>> The
>> latter file was recreated during the boot process, by some script invoked
>> by some other script invoked by ....  This is where I get lost.

The script that generates 70-persistent-new-rules should be found with:
find /etc/udev/ -name '*pers* -name '*net*' -name '*rule*' -name '*gen*'

>> I don't
>> know where those programs found the old eth0 information to put in the
>> new rules file that was created.

When no rule has a name for a network interface, udev (via the generator rule) 
automatically chooses one and then writes a rule so that the name will stick 
to that MAC address.

>> But I will try writing a new rules file; maybe that will work.
>>
>> Is there some set of services I can restart instead of doing a full reboot
>> to update the network interface?
>
>I still don't see why you insist on using eth1 instead of eth0, when
>you only have one Ethernet port...

That should work though.  70-persistent-net-rules should contain one rule 
right now, specifying the name "eth0" and the MAC address of the only NIC in 
the system.  If you change the name to "eth1" without changing anything else 
in the rule, the next time the interface comes up it should be with the name 
"eth1".

Besides doing a reboot you should also be able to remove and insert the module 
that runs your NIC to get the new name.
-- 
Boyd Stephen Smith Jr.                   ,= ,-_-. =.
bss@iguanasuicide.net                   ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy         `-'(. .)`-'
http://iguanasuicide.net/                    \_/

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: