Changing interface names in pppd, where is the ifname option?
Derek Broughton
derek at pointerstop.ca
Thu Mar 26 00:33:25 UTC 2009
Josef Wolf wrote:
> On Wed, Mar 25, 2009 at 03:50:24PM -0300, Derek Broughton wrote:
>> Josef Wolf wrote:
>
>> > So how do I tell udev to name the device based on the provider name?
>>
>> What do you mean by "provider name"? As I mentioned, it's a looong time
>> since I used ppp. How do _you_ know what the provider name is in the
>> first place?
>
> Well, it is part of the configuration:
>
> $ perl -ne 'print if /ppp0/../^$/' /etc/network/interfaces
> iface ppp0 inet ppp
> pre-up ifconfig eth1 up
> post-down ifconfig eth1 down
> provider TCOM1
So TCOM1, which you want to be ppp0 is always associated with eth1, and you
want Some Other Provider (SOP1) to be ppp1 and associated with eth2? (or
maybe eth0, but it's just easier for me if we keep incrementing the
numbers :-) )?
It seems, if I'm understanding you right, that we can use the MAC
addresses - see /etc/udev/rules.d/70-persistent-net.rules
& /etc/udev/rules.d/75-persistent-net-generator.rules. If the MAC address
really isn't available to udev at the time of creating the ppp name, that's
when invoking a script in the rule comes in - you managed to show me the
appropriate 'eth' line with a little bit of perl, so you should be able to
get the name you want fairly simply.
It might even be as simple as adding ppp in
75-persistent-net-generator.rules:
# device name whitelist
KERNEL!="eth*|ath*|wlan*[0-9]|ra*|sta*|ctc*|lcs*|hsi*",
It seems too easy, but I have had odder things work :-)
> $ udevinfo -a -p /sys/class/net/ppp0/
...
>
> looking at device '/devices/virtual/net/ppp0':
Admittedly, this information is pretty sparse, but I'd be looking at what's
different, and what's the same between the ppp interfaces and the eth ones.
Particularly, these look interesting:
> ATTR{iflink}=="7"
> ATTR{ifindex}=="7"
> ATTR{type}=="512"
> ATTR{flags}=="0x1091"
I'm afraid, without pppoe connections, it'll probably be another 9 months
(when I'm hoping we get a wimax provider who _will_ be using pppoe) before
I can be more help. otoh, you could be right, and ifname support might be
coming...
--
derek
More information about the ubuntu-users
mailing list