View previous topic :: View next topic |
Author |
Message |
474 l33t
Joined: 19 Apr 2002 Posts: 714
|
Posted: Wed Mar 10, 2004 12:17 am Post subject: |
|
|
Ok guys, the plot thickens ...
I found out something very interesting about ppp-2.4.2, something which has changed since the beta release. The good news is that the ip-up and ip-down scripts are now coded so that the DNS servers allocated upon a successful connection are automatically populated in /etc/resolv.conf. Furthermore, when the pppd process is terminated your original resolv.conf is restored
The bad news is that it sets the permissions for resolv.conf to 600 for the duration of the connection, which means that non-root users are unable to read it ... thus, non-root users are not able to resolve names
The simple fix is to adjust /etc/ppp/ip-up as follows (this excerpt begins on line 30): Code: | # backup the old configuration and install the new one
cp -a $REALRESOLVCONF $REALRESOLVCONF.pppd-backup
mv $REALRESOLVCONF.tmp $REALRESOLVCONF
chmod 644 $REALRESOLVCONF
fi |
You can bet your bottom dollar that I'll file a bug on this (assuming one hasn't already been filed). I am sure I'm not the only person to have noticed.
Kirja wrote: | No luck unfortunatly. I did as you instructed kerframil and the error message no longer appears but I am still unable to access the internet. |
Has the above got anything to do with it by any chance? If not, then the suggestions I had are probably null and void as you say the error message that you were originally experiencing (specifically, the "LCP: timeout" message) has gone away. If so, then perhaps we should get in touch so that I can take a closer look at exactly what is happening on your system (feel free to get hold of me on your chat network of choice).
Qubax wrote: | i wanted to try it out, but didn't come far |
Elementary, my dear Watson ... try the following: Code: | # emerge sync
# ACCEPT_KEYWORDS="~x86" USE="atm" emerge ppp
# sed -i -e "s/2\.4\.2b3/2\.4\.2/" /etc/ppp/peers/<file> |
... where <file> should obviously be substituted as necessary.
By the way, the reason I am suggesting that you sync and re-emerge is because the developer who committed ppp-2.4.2-r1 made a mistake when he first committed the ebuild to Portage. This mistake meant that the pppatm.so file was not copied into the right place (outside of the Portage sandbox) during the final merge stage |
|
Back to top |
|
|
Bubsy n00b
Joined: 29 Feb 2004 Posts: 29 Location: Antwerp, Belgium
|
Posted: Wed Mar 10, 2004 11:24 am Post subject: |
|
|
Great guide! I've followed it and everything works perfectly!
I run modem_run & pppd and I happily surf the net.
Untill.... I reboot.
pppd gives me this error msg:
Code: | Kernel doesn't support ppp_generic - needed for PPPoATM |
I have all necessary PPP kernel options set as modules. I'm sure ppp_generic is there.
To fix this, I need to re-emerge ppp-2.4.2-r1 (and copy pppoatm.so to it's correct loc.). After this, pppd runs without a problem! (Untill I reboot again and I have to re-emerge ppp again...)
As long as I don't reboot, I can start/stop pppd without a problem. |
|
Back to top |
|
|
gen536 n00b
Joined: 23 Feb 2004 Posts: 35
|
Posted: Wed Mar 10, 2004 1:57 pm Post subject: |
|
|
Hi ! I followed your great guide, uploaded the firmware, then when I run pppd : (the r1 ebuild, with copied pppoatm.so)
Code: |
sferbox root # pppd call adsl
Plugin /usr/lib/pppd/2.4.2/pppoatm.so loaded.
PPPoATM plugin_init
PPPoATM setdevname - remove unwanted options
PPPoATM setdevname_pppoatm - SUCCESS:0.38
pppd: In file /etc/ppp/peers/adsl: unrecognized option 'pty'
|
It complains on this line from peers/adsl : tty "/usr/sbin/pppoa3 -m ..."
I loaded every ppp* 2.6 module I could find, can someone tell me what's wrong ?
Thanks a LOT |
|
Back to top |
|
|
474 l33t
Joined: 19 Apr 2002 Posts: 714
|
Posted: Wed Mar 10, 2004 3:01 pm Post subject: |
|
|
Bubsy wrote: | Great guide! I've followed it and everything works perfectly!
I run modem_run & pppd and I happily surf the net.
Untill.... I reboot. |
I am getting this strong sensation that you are using udev on your machine ...
Even if you are not, the problem can be solved as follows: Code: | # echo "mknod /dev/ppp c 108 0" >> /etc/conf.d/local.start |
|
|
Back to top |
|
|
474 l33t
Joined: 19 Apr 2002 Posts: 714
|
Posted: Wed Mar 10, 2004 3:10 pm Post subject: |
|
|
gen536 wrote: | It complains on this line from peers/adsl : tty "/usr/sbin/pppoa3 -m ..." |
Please re-read the guide, in particular the part about options. You should not be using the pppoa3 binary at all. That is a user-space implementation of PPPoA which should only be used in the case that you are not using the Alcatel kernel module and kernel ATM implementation. This thread is about 2.6 kernels in which case we must use the kernel implementations. A ppp plugin is used to interface with the kernel modules in question.
To clarify, here is my current file (/etc/ppp/peers/zen): Code: | defaultroute
holdoff 4
maxfail 25
persist
asyncmap 0
lcp-echo-interval 2
lcp-echo-failure 7
name ********@zen
user ********@zen
plugin /usr/lib/pppd/2.4.2/pppoatm.so
0.38 |
And my /etc/ppp/options, which are inherited by any peer connection definitions, I believe: Code: | noauth
usepeerdns
lock
noipdefault |
|
|
Back to top |
|
|
474 l33t
Joined: 19 Apr 2002 Posts: 714
|
Posted: Wed Mar 10, 2004 3:36 pm Post subject: |
|
|
Bubsy wrote: | .... I need to re-emerge ppp-2.4.2-r1 (and copy pppoatm.so to it's correct loc.) |
The pppoatm.so should be in the correct location already. As I mentioned before, a developer screwed up when he initially bumped the ebuild to the -r1 release. That's been resolved now (here's the segment of code in the ebuild which was once missing): Code: | if [ "`use atm`" -a "`use x86`" ]; then
dolib.so pppd/plugins/pppoatm.so
fi |
So, the file should be placed under /usr/lib/pppd/2.4.2. |
|
Back to top |
|
|
Bubsy n00b
Joined: 29 Feb 2004 Posts: 29 Location: Antwerp, Belgium
|
Posted: Wed Mar 10, 2004 4:57 pm Post subject: |
|
|
Quote: | I am getting this strong sensation that you are using udev on your machine ... |
You're right. I am using udev.
Quote: | Even if you are not, the problem can be solved as follows: Code: | # echo "mknod /dev/ppp c 108 0" >> /etc/conf.d/local.start |
|
That solves it!!!
Thanks again for the great guide and the effort!!! |
|
Back to top |
|
|
Qubax Guru
Joined: 19 Jul 2002 Posts: 451 Location: Tirol, Austria
|
Posted: Wed Mar 10, 2004 7:57 pm Post subject: |
|
|
Quote: | if [ "`use atm`" -a "`use x86`" ]; then
dolib.so pppd/plugins/pppoatm.so
fi
|
is there, but as said above, pppoatm.so can be found in /usr/lib/, an not in /usr/lib/pppd/...
so either you move the file into the correct pppd directory (but won't be deleted if unmerging) an use the settings aobe, or set the correct path in the /etc/pppd/peers/<file> to Code: | plugin /usr/lib/pppoatm.so |
--------------
edit:
persist still not working, but a "connection without automatic reconnection" is better than no "connection with automatic reconnection"
Last edited by Qubax on Thu Mar 11, 2004 7:37 am; edited 1 time in total |
|
Back to top |
|
|
474 l33t
Joined: 19 Apr 2002 Posts: 714
|
Posted: Wed Mar 10, 2004 10:37 pm Post subject: |
|
|
Quote: | is there, but as said above, pppoatm.so can be found in /usr/lib/, an not in /usr/lib/pppd/... |
Ah, I see. Well, I think most of the issues concerning this topic appear to have been cleared up now. Time to update the guide ... |
|
Back to top |
|
|
rensi n00b
Joined: 12 Oct 2002 Posts: 66 Location: Salzburg, Austria
|
Posted: Wed Mar 17, 2004 8:19 am Post subject: |
|
|
kerframil wrote: |
The simple fix is to adjust /etc/ppp/ip-up as follows (this excerpt begins on line 30): Code: | # backup the old configuration and install the new one
cp -a $REALRESOLVCONF $REALRESOLVCONF.pppd-backup
mv $REALRESOLVCONF.tmp $REALRESOLVCONF
chmod 644 $REALRESOLVCONF
fi |
|
This is how my /etcp/ppp/ip-up looks now
Code: | #!/bin/sh
# this is a script which is executed after connecting the ppp interface.
# look at man pppd for details
# the followings parameters are available:
# $1 = interface-name
# $2 = tty-device
# $3 = speed
# $4 = local-IP-address
# $5 = remote-IP-address
# $6 = ipparam
if [ "$USEPEERDNS" ]; then
# add the server supplied DNS entries to /etc/resolv.conf
# (taken from debian's 0000usepeerdns)
# follow any symlink to find the real file
REALRESOLVCONF=$(readlink --canonicalize /etc/resolv.conf)
if [ "$REALRESOLVCONF" != "/etc/ppp/resolv.conf" ]; then
# merge the new nameservers with the other options from the old configuration
{
grep --invert-match '^nameserver[[:space:]]' $REALRESOLVCONF
cat /etc/ppp/resolv.conf
} > $REALRESOLVCONF.tmp
# backup the old configuration and install the new one
cp -a $REALRESOLVCONF $REALRESOLVCONF.pppd-backup
mv $REALRESOLVCONF.tmp $REALRESOLVCONF
chmod 644 $REALRESOLVCONF
fi
fi
[ -f /etc/init.d/firewall ] && /etc/init.d/firewall start
[ -f /etc/ppp/ip-up.local ] && . /etc/ppp/ip-up.local $1 $2 $3 $4 $5 $6
|
but I can't use as normal user
any ideas? |
|
Back to top |
|
|
474 l33t
Joined: 19 Apr 2002 Posts: 714
|
Posted: Wed Mar 17, 2004 10:28 am Post subject: |
|
|
rensi,
I am not sure whether you are:
1) Initiating ppp as root, dropping your priveleges back to a normal user then experiencing the problem or ...
2) Attempting to start ppp as a non-root user.
In the first case, ensure that the ppp-up and ppp-down scripts have the executable bit set:
Code: | chmod 755 /etc/ppp/ip-* |
In the second case, refer to this page which explains how to safely allow ppp access for non-priveleged users.
In all cases, check that resolv.conf looks sane (and has suitable permissions applied) and see if you can ping a known host by IP rather than hostname. |
|
Back to top |
|
|
rensi n00b
Joined: 12 Oct 2002 Posts: 66 Location: Salzburg, Austria
|
Posted: Wed Mar 17, 2004 12:19 pm Post subject: |
|
|
kerframil wrote: |
I am not sure whether you are:
1) Initiating ppp as root, dropping your priveleges back to a normal user then experiencing the problem or ...
2) Attempting to start ppp as a non-root user.
|
It was the first case! But changing ther permissions of /etc/resolv.conf from 600 to 644 seems to have fixed it!
Thanks
rensi |
|
Back to top |
|
|
50cc n00b
Joined: 19 Feb 2004 Posts: 49 Location: The Netherlands
|
Posted: Thu Mar 18, 2004 9:03 am Post subject: |
|
|
I can't find the pppoatm.so file. I downloaded the modified ebuild file and ran ebuild. Then i emerged ppp. But what i don't understand is this, i ran ebuild with a ppp version 2.4.2_beta3-r1 but when i emerge ppp verion 2.4.2-r1 is installed. Is the ok??
Note: I am not a Gentoo or Linux expert.
Thanks from the Netherlands |
|
Back to top |
|
|
50cc n00b
Joined: 19 Feb 2004 Posts: 49 Location: The Netherlands
|
Posted: Thu Mar 18, 2004 9:25 am Post subject: |
|
|
Ok, i just found out that the /etc/make.conf file has been modified somewhere since i installed Gentoo a few weeks ago. I added 'apm' to the USE variable. I did emerge -C ppp and emerge ppp. Now i do have a pppoatm.so in /usr/lib/ppp/2.4.2b3.
Off topic:
Any ideas what could have changed my /etc/make.conf file?
On topic:
This may be a very stupid question: I don't have speedtouch modem where i am now, and so obviously it is not connected. But because i am curious how far i would get this time i did modprobe speedtch and ran pppd, no i got this error in my /var/log/messages:
Code: |
Mar 18 10:16:43 tux drivers/usb/core/usb.c: registered new driver speedtch
Mar 18 10:17:00 tux pppd[12654]: Plugin /usr/lib/pppd/2.4.2b3/pppoatm.so loaded.
Mar 18 10:17:00 tux pppd[12654]: PPPoATM plugin_init
Mar 18 10:17:00 tux pppd[12654]: PPPoATM setdevname - remove unwanted options
Mar 18 10:17:00 tux pppd[12654]: PPPoATM setdevname_pppoatm - SUCCESS:8.48
Mar 18 10:17:00 tux pppd[12655]: pppd 2.4.2b3 started by root, uid 0
Mar 18 10:17:00 tux pppd[12655]: connect(8.48): No such device
Mar 18 10:17:00 tux pppd[12655]: Exit.
|
The line containing "connect( 8.48 ): No such device" is an error i also got on a SuSE 9.0 machine with the same modem.
Is this because the modem in not connected or is it a different problem?
Thanks (again) |
|
Back to top |
|
|
474 l33t
Joined: 19 Apr 2002 Posts: 714
|
Posted: Fri Mar 19, 2004 8:19 pm Post subject: |
|
|
50cc wrote: | Ok, i just found out that the /etc/make.conf file has been modified somewhere since i installed Gentoo a few weeks ago. I added 'apm' to the USE variable. I did emerge -C ppp and emerge ppp. Now i do have a pppoatm.so in /usr/lib/ppp/2.4.2b3. |
Are you sure it's resident in that path? That makes me fear that you are using the ebuild I created which has been superceded. Allow me to make that perfectly clear: ppp-2.4.2 in the official portage tree now fully supports PPPoATM and this is what everyone should be using. However, the atm USE flag must be active prior to compilation of ppp for this to be the case (I'm assuming you meant atm, not apm because the latter has absolutely nothing to do with this topic).
Quote: | Off topic:
Any ideas what could have changed my /etc/make.conf file? |
This cannot happen without your consent. Perhaps this is a result of injudicious use of the etc-update utility?
Quote: | On topic:
This may be a very stupid question: I don't have speedtouch modem where i am now, and so obviously it is not connected. But because i am curious how far i would get this time i did modprobe speedtch and ran pppd, no i got this error in my /var/log/messages:
[snip] Code: |
Mar 18 10:17:00 tux pppd[12655]: connect(8.48): No such device
Mar 18 10:17:00 tux pppd[12655]: Exit. |
[snip]
The line containing "connect( 8.48 ): No such device" is an error i also got on a SuSE 9.0 machine with the same modem. |
Well, you can certainly load the speedtch module without having the device in question attached. However, the modem_run binary will not execute successfully because the device does not exist. Consequently, the firmware will not be uploaded and the DSL line will not be established. When you run pppd then it is quite right for the ppoatm.so plugin to claim that no device is available. |
|
Back to top |
|
|
clampinus n00b
Joined: 22 Mar 2004 Posts: 10
|
Posted: Mon Mar 22, 2004 4:40 pm Post subject: |
|
|
It works weeeee !
IIn my case, the two big issues I had to solve were :
- getting pppoatm.so to be built and find where it was : use "atm" use flag and use path /usr/lib/pppoatm.so instead of the one provided, as the plugin seems to be installed in the wrong place currently
- adapting the VPI/VCI values to my own provider settings. I found those by using the diagnostic tool under Windows.
Thanks for this guide Kerf ! |
|
Back to top |
|
|
50cc n00b
Joined: 19 Feb 2004 Posts: 49 Location: The Netherlands
|
Posted: Mon Mar 22, 2004 7:31 pm Post subject: |
|
|
Am getting a bit closer (i think) i tested the speedtouch again, and after running pppd i got this in my /var/log/messages file:
Code: |
Mar 22 17:31:41 tux pppd[6606]: Plugin /usr/lib/pppd/2.4.2b3/pppoatm.so loaded.
Mar 22 17:31:41 tux pppd[6606]: PPPoATM plugin_init
Mar 22 17:31:41 tux pppd[6606]: PPPoATM setdevname - remove unwanted options
Mar 22 17:31:41 tux pppd[6606]: PPPoATM setdevname_pppoatm - SUCCESS:8.48
Mar 22 17:31:41 tux pppd[6608]: pppd 2.4.2b3 started by root, uid 0
Mar 22 17:31:41 tux pppd[6608]: connect(8.48): Resource temporarily unavailable
Mar 22 17:31:41 tux pppd[6608]: Exit.
|
This was with the speedtouch attached of course.
Any ideas? |
|
Back to top |
|
|
50cc n00b
Joined: 19 Feb 2004 Posts: 49 Location: The Netherlands
|
Posted: Tue Mar 23, 2004 12:02 pm Post subject: |
|
|
I was reading a different thread on this forum which was discussing a user which was using the wrong VCI/VPI values. But i noticed that he had something different in his logs:
Code: |
Dec 21 19:23:35 [pppd] pppd 2.4.2b3 started by root, uid 0
Dec 21 19:23:35 [pppd] Using interface ppp0
Dec 21 19:23:35 [pppd] Connect: ppp0 <--> 0.35
|
In the log above pppd connects to ppp0 but if i do
Code: |
bash-2.05b# ls /dev/ppp* -l
crw------- 1 root root 108, 0 Jan 1 1970 /dev/ppp
|
I don't have a ppp0 file, is this my problem maybe? |
|
Back to top |
|
|
50cc n00b
Joined: 19 Feb 2004 Posts: 49 Location: The Netherlands
|
Posted: Mon Mar 29, 2004 2:21 pm Post subject: |
|
|
I finally got it working!! Thankyou for this guide!
What i was doing wrong (i think) was not running modem_run each time.
Does anyone now howto edit the hotplug files so that modem_run, modprobe speedtouch and pppd are started after the modem is plugged in? This would be pretty cool.
Thanks again. |
|
Back to top |
|
|
Hi-Rider n00b
Joined: 01 Apr 2004 Posts: 1
|
|
Back to top |
|
|
50cc n00b
Joined: 19 Feb 2004 Posts: 49 Location: The Netherlands
|
Posted: Thu Apr 01, 2004 10:12 am Post subject: |
|
|
I think your wrong, all the drivers come from the kernel all that's used from the userland files is the modem_run utility.
I'm busy converting a SuSE 9.0 maching to a Gentoo maching at this very moment. It wil be used as a fileserver/printserver/NAT/DHCP/firewall machine.
It will be connected to the Speedtouch, i'm hopping it will be stable. (the speedtouch part that is) |
|
Back to top |
|
|
Gentii Guru
Joined: 01 Feb 2004 Posts: 306
|
Posted: Mon Apr 05, 2004 7:22 pm Post subject: |
|
|
Does anyone know what has changed with mm-sources 2.6.5 ?
I head about some hotplug fixes. But the speedtouch usb doesn't work anymore with these sources... I can start modem_run, then my modem is synchronized but modem_run doesn't stop. Even with ctrl+c it wont stop.
Is it possible to have this modem working on last mm-sources? |
|
Back to top |
|
|
OneOfOne Guru
Joined: 28 May 2003 Posts: 368
|
Posted: Thu Apr 08, 2004 6:36 pm Post subject: |
|
|
Bubsy wrote: | Quote: | I am getting this strong sensation that you are using udev on your machine ... |
You're right. I am using udev.
Quote: | Even if you are not, the problem can be solved as follows: Code: | # echo "mknod /dev/ppp c 108 0" >> /etc/conf.d/local.start |
|
That solves it!!!
Thanks again for the great guide and the effort!!! |
which kernel is that? afaik ppp sysfs patch went into main stream a while ago..
Quote: | Does anyone know what has changed with mm-sources 2.6.5 ?
I head about some hotplug fixes. But the speedtouch usb doesn't work anymore with these sources... I can start modem_run, then my modem is synchronized but modem_run doesn't stop. Even with ctrl+c it wont stop.
Is it possible to have this modem working on last mm-sources? |
it's the usb updates in it, if you dont depend on any of the major usb updates in it do this : cd /usr/src/linux-2.6.5-mm2 && wget http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.5/2.6.5-mm2/broken-out/bk-usb.patch -q -O - | patch -p1 -R and recompile.
that *should* fix modem_run problems.
peace |
|
Back to top |
|
|
Azrael3000 n00b
Joined: 01 Dec 2003 Posts: 11
|
Posted: Sat Apr 24, 2004 3:03 pm Post subject: |
|
|
i followed your tutorial and compiled the kernel. all modules were working as supposed. then I started to emerge the whole stuff but the after another reboot the pppoatm module didn't want to start
dmesg says:
Code: | pppoatm: Unknown symbol register_atm_ioctl
pppoatm: Unknown symbol deregister_atm_ioctl |
I disabled the pppoatm module in the kernel and enabled it again. While compiling I got the following message:
Code: | Warning: /lib/modules/2.6.4-rc1/kernel/net/atm/pppoatm.ko needsunknown symbol register_atm_ioctl
Warning: /lib/modules/2.6.4-rc1/kernel/net/atm/pppoatm.ko needsunknown symbol deregister_atm_ioctl |
thanks for your help |
|
Back to top |
|
|
danmilkman n00b
Joined: 14 May 2004 Posts: 2
|
Posted: Fri May 14, 2004 11:54 am Post subject: help? |
|
|
Followed the manual, but can't get it to work at all. Fails to load microcode, USBDEVFS_BULK errors?
What am I doin' wrong?
Help pleaze. |
|
Back to top |
|
|
|