Interface Name
Hi,
i am using ppp for pppoe for my adsl and PPTP
the interface name for pptp is ppp as well as pppoe
how to modify the interface name become pptp0 or adsl0 or any other name according to type of connection?
Regards,
Soragan
Quoted 2 lines · Soragan Guo
how to modify the interface name become pptp0 or adsl0 or any other name according to type of connection?
The name is set by the PPP kernel module. With suitable expertise you could modify the kernel module.
There is a program called ifrename that will let you change the interface name for a network interface. This is also released as as package by the same name in the Debian project.
http://packages.debian.org/ifrename
I've not investigated it for use with PPP. The man page says it has to run before the interface is brought up. My experience with PPP so far is that the interface is created and brought up immediately.
The author of ifrename is Jean Tourrilhes <[email protected]>
Signature · 3 lines
James Cameron http://quozl.netrek.org/ HP Open Source, Volunteer http://opensource.hp.com/ PPTP Client Project, Release Engineer http://pptpclient.sourceforge.net/
Quoted 6 lines · James Cameron
Quoted 2 lines · Soragan Guo
how to modify the interface name become pptp0 or adsl0 or any other name according to type of connection?
The name is set by the PPP kernel module. With suitable expertise you could modify the kernel module.
Actually pppd 2.4.x includes an options called "unit" with which you can request pppd give you that numbr for the interface. If it is not available, it will use the next available one anyway.
Quoted 6 lines · James Cameron
Quoted 5 lines · Soragan Guo
Quoted 2 lines
how to modify the interface name become pptp0 or adsl0 or any other name according to type of connection?
Quoted 6 lines
Quoted 2 lines
The name is set by the PPP kernel module. With suitable expertise you could modify the kernel module.
Actually pppd 2.4.x includes an options called "unit" with which you can request pppd give you that numbr for the interface. If it is not available, it will use the next available one anyway.
never try that option, but what i am trying to do it to change the interface name, not the number like ppp0 ppp1 :)
soragan
Quoted 2 lines · On Wed, Apr 28, 2004 at 12:15:38PM +1000, [email protected] wrote:
never try that option, but what i am trying to do it to change the interface name, not the number like ppp0 ppp1 :)
At least with that option, you could ensure that the interface has a consistent name to begin with, rather than be allocated in order of creation.
e.g. unit 40 for the adsl, unit 50 for the pppoe.
This may simplify the ifrename.
Signature · 3 lines
James Cameron http://quozl.netrek.org/ HP Open Source, Volunteer http://opensource.hp.com/ PPTP Client Project, Release Engineer http://pptpclient.sourceforge.net/
Quoted 9 lines · On Wed, 28 Apr 2004 [email protected] wrote:
Quoted 9 lines · James Cameron
Quoted 7 lines · Soragan Guo
Quoted 2 lines
how to modify the interface name become pptp0 or adsl0 or any other name according to type of connection?
The name is set by the PPP kernel module. With suitable expertise you could modify the kernel module.
Quoted 6 lines
Quoted 3 lines
Actually pppd 2.4.x includes an options called "unit" with which you can request pppd give you that numbr for the interface. If it is not available, it will use the next available one anyway.
never try that option, but what i am trying to do it to change the interface name, not the number like ppp0 ppp1 :)
There is also the linkname option.
linkname name
Sets the logical name of the link to name. Pppd will create a file named ppp-name.pid in /var/run (or /etc/ppp on some sys- tems) containing its process ID. This can be useful in deter- mining which instance of pppd is responsible for the link to a given peer system. This is a privileged option.
Do not know if that would do what you want.
Quoted 1 line · Bill Unruh
There is also the linkname option.
[...]
Quoted 1 line
Do not know if that would do what you want.
It doesn't. It just sets a vanity name for the pid file, so that writing a kill script is easier.
Signature · 1 line
James Carlson <[email protected]>
Quoted 10 lines · James Cameron
At least with that option, you could ensure that the interface has a consistent name to begin with, rather than be allocated in order of creation.
e.g. unit 40 for the adsl, unit 50 for the pppoe.
This may simplify the ifrename.
it make sense, good solution
Quoted 7 lines · James Carlson
Quoted 1 line · Bill Unruh
There is also the linkname option.
[...]
Quoted 1 line
Do not know if that would do what you want.
It doesn't. It just sets a vanity name for the pid file, so that writing a kill script is easier.
That may be all he wants.
Quoted 16 lines · Bill Unruh
Quoted 12 lines · James Carlson
Quoted 3 lines · Bill Unruh
There is also the linkname option.
[...]
Quoted 3 lines
Do not know if that would do what you want.
Quoted 9 lines
Quoted 4 lines
It doesn't. It just sets a vanity name for the pid file, so that writing a kill script is easier.
That may be all he wants.
no it is not what i want actually, hehe
what i want is to change the interface name in ifconfig
soragan
Quoted 5 lines · Soragan Guo
Quoted 3 lines
Quoted 2 lines
It doesn't. It just sets a vanity name for the pid file, so that writing a kill script is easier.
That may be all he wants.
no it is not what i want actually, hehe
what i want is to change the interface name in ifconfig
I suppose I should have said "maybe that is all that he needs". Since I have no idea what problem it is that you wanted to solve, I also have no idea what would consitute a solution.
The short answer is that the interface names, like ppp0, are assigned by the kernel, and if you want to change them, you have to change the kernel, as has been stated by others. You are of course free to do that, but I suspect that you do not want to do that. Then the question is whether there are other things which are easier to do which would accomplish the same goals. I suggested two of them. Eg using the unit option to pppd. That would mean that you (or a script you used) would have to translate ppp50 to pptp in your mind, and that may be good enough. On the other hand it might not be for some reason.