Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem setting up ADSL modem using PPPoE HOWTO
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Laird
n00b
n00b


Joined: 06 Aug 2007
Posts: 15

PostPosted: Mon Aug 06, 2007 11:05 am    Post subject: Problem setting up ADSL modem using PPPoE HOWTO Reply with quote

Hi all, this is my first post.

I'm trying to get an ADSL connection up and running. I've received the ethernet ADSL modem and my ISP has confirmed that my line is set up for ADSL and that they use PPPoE. I've physically connected the modem and all the lights are green. Now I'm trying to configure Linux to recognise the connection by following the document, HOWTO Connect using PPPoE.

I've followed all of the steps carefully except that I've substituted ppp1 for ppp0 because I already have a dial-up modem using ppp0.

When I get to /etc/init.d/net.ppp1 start though, I don't get the output that the HOWTO describes. Instead, I get this:
Code:
* Starting ppp1
 *   Bringing up ppp1
 *     ppp
 *     No loaded modules provide "ppp" (ppp_start)


Does anyone know what I need to do to fix this so that I get the right output, but more importantly so that I have a connection at all? I'm open to any means of enabling this darn modem. I've already tried:
* emerging net-dialup/rp-pppoe and using the pppoe-start command after running pppoe-setup. This times out although the middle modem light flashes a few times during the process.
* editing /etc/conf.d/net so that it contains the lines:
Code:
config_eth0=( "adsl" )
adsl_user_eth0="my-username"

This likewise timed out when I ran /etc/init.d/net.eth0 start although again the modem light blinked a few times during the process.

Additional information: I have a dynamic IP address and the server supplies DNS addresses.

Any and all advice and suggestions appreciated.

Cheers,
Laird
Back to top
View user's profile Send private message
didymos
Advocate
Advocate


Joined: 10 Oct 2005
Posts: 4798
Location: California

PostPosted: Mon Aug 06, 2007 11:14 am    Post subject: Reply with quote

Yeah, I wrote that actually. You missed this bit:
Quote:

Speaking of said daemon, this brings us to the second piece. If you haven't already done so, then: emerge ppp


I should probably mark that bit out better.

[edit] OK, made some changes. Should be harder to miss now.
_________________
Thomas S. Howard


Last edited by didymos on Mon Aug 06, 2007 11:38 am; edited 1 time in total
Back to top
View user's profile Send private message
Laird
n00b
n00b


Joined: 06 Aug 2007
Posts: 15

PostPosted: Mon Aug 06, 2007 11:17 am    Post subject: Reply with quote

I didn't miss that although I did re-emerge it because I saw that there was a later version available. I now have version 2.4.4-r9 installed.
Back to top
View user's profile Send private message
Laird
n00b
n00b


Joined: 06 Aug 2007
Posts: 15

PostPosted: Mon Aug 06, 2007 11:19 am    Post subject: Reply with quote

Nice work on the HOWTO by the way. It reads clearly.
Back to top
View user's profile Send private message
Laird
n00b
n00b


Joined: 06 Aug 2007
Posts: 15

PostPosted: Mon Aug 06, 2007 11:46 am    Post subject: Reply with quote

Hmm, I've just noticed in the /etc/init.d/net.lo file the following lines:
Code:
# Define where our modules are
MODULES_DIR=/lib/rcscripts/net.modules.d


Doing an ls in that directory I find that the ppp file is missing. Doing an equery files ppp I find that it does not provide such a file either.

Is this the problem? In other words, should there be a /lib/rcscripts/net.modules.d/ppp file? And if so, which package should provide it?
Back to top
View user's profile Send private message
didymos
Advocate
Advocate


Joined: 10 Oct 2005
Posts: 4798
Location: California

PostPosted: Mon Aug 06, 2007 11:52 am    Post subject: Reply with quote

Laird wrote:
Nice work on the HOWTO by the way. It reads clearly.


Thank you. Anyway, I just assumed ppp was missing based on the error message you were getting. For some reason, it's not finding pppd. Since ppp is installed, then something's up with baselayout. Does the file /lib/rcscripts/net/pppd.sh exist?

[edit]

Damn it, you beat me to it.
_________________
Thomas S. Howard
Back to top
View user's profile Send private message
didymos
Advocate
Advocate


Joined: 10 Oct 2005
Posts: 4798
Location: California

PostPosted: Mon Aug 06, 2007 11:54 am    Post subject: Reply with quote

OK, wait: which version of baselayout is this?
_________________
Thomas S. Howard
Back to top
View user's profile Send private message
Laird
n00b
n00b


Joined: 06 Aug 2007
Posts: 15

PostPosted: Mon Aug 06, 2007 11:56 am    Post subject: Reply with quote

I think we're thinking the same thing... I'm in the process of emerging the latest version:

Code:
*  sys-apps/baselayout
      Latest version available: 1.12.9-r2
      Latest version installed: 1.11.14-r5
Back to top
View user's profile Send private message
didymos
Advocate
Advocate


Joined: 10 Oct 2005
Posts: 4798
Location: California

PostPosted: Mon Aug 06, 2007 12:12 pm    Post subject: Reply with quote

Yeah, that should fix it. I'm going to have to change the wiki page. I didn't realize things had changed like that since the 1.11.* versions.
_________________
Thomas S. Howard
Back to top
View user's profile Send private message
Laird
n00b
n00b


Joined: 06 Aug 2007
Posts: 15

PostPosted: Mon Aug 06, 2007 1:19 pm    Post subject: Reply with quote

Yes, that fixed it. I reckon that it would be a good idea to add that to the wiki page.

I still have a problem though: my connection still does not come up. For example, ifconfig does not show ppp1, it only shows ppp0 (my dial-up connection). Checking in /var/log/syslog, I find the following entries that appear to correspond to my invocation of /etc/init.d/net.ppp1 start:
Code:
Aug  6 22:44:14 gentocrat pppd[17273]: Plugin passwordfd.so loaded.
Aug  6 22:44:14 gentocrat pppd[17273]: Plugin rp-pppoe.so loaded.
Aug  6 22:44:14 gentocrat pppd[17273]: RP-PPPoE plugin version 3.3 compiled against pppd 2.4.4
Aug  6 22:44:14 gentocrat pppd[17277]: pppd 2.4.4 started by root, uid 0
Aug  6 22:44:49 gentocrat pppd[17277]: Timeout waiting for PADO packets
Aug  6 22:44:49 gentocrat pppd[17277]: Unable to complete PPPoE Discovery
Aug  6 22:45:54 gentocrat pppd[17277]: Timeout waiting for PADO packets
Aug  6 22:45:54 gentocrat pppd[17277]: Unable to complete PPPoE Discovery


This seems to be what's happening when I run pppoe-start directly. In that case I get (in /var/log/syslog):
Code:
Aug  6 22:50:30 gentocrat pppd[17881]: Plugin rp-pppoe.so loaded.
Aug  6 22:50:30 gentocrat pppd[17881]: RP-PPPoE plugin version 3.3 compiled against pppd 2.4.4
Aug  6 22:50:30 gentocrat pppd[17881]: pppd 2.4.4 started by root, uid 0
Aug  6 22:51:05 gentocrat pppd[17881]: Timeout waiting for PADO packets
Aug  6 22:51:05 gentocrat pppd[17881]: Unable to complete PPPoE Discovery
Aug  6 22:51:05 gentocrat pppd[17881]: Exit.


And when I modify my /etc/conf.d/net file to contain config_eth0=( "adsl" ), then I get (in /var/log/syslog):
Code:
Aug  6 22:53:34 gentocrat pppd[18565]: Plugin rp-pppoe.so loaded.
Aug  6 22:53:34 gentocrat pppd[18565]: RP-PPPoE plugin version 3.3 compiled against pppd 2.4.4
Aug  6 22:53:34 gentocrat pppd[18565]: pppd 2.4.4 started by root, uid 0
Aug  6 22:54:07 gentocrat pppd[18565]: recv (receivePacket)


In each of the second two cases a timeout message is displayed and ifconfig shows no relevant connection (in the first case I have to run /etc/init.d/net.ppp1 stop, because /etc/init.d/net.ppp1 status shows "inactive"). Anyone know what's going wrong and/or how to get a connection up? I've done a bit of Googling on the "Timeout waiting for PADO packets" error message and it looks pretty bleak... perhaps I need to try to replace my network card...?...
Back to top
View user's profile Send private message
Laird
n00b
n00b


Joined: 06 Aug 2007
Posts: 15

PostPosted: Mon Aug 06, 2007 2:09 pm    Post subject: Reply with quote

More information:
Code:
# /etc/init.d/net.eth0 start
 * Starting eth0
 *   Bringing up eth0                                                                                   [ ok ]
# pppoe -I eth0 -A
pppoe: Timeout waiting for PADO packets
Back to top
View user's profile Send private message
didymos
Advocate
Advocate


Joined: 10 Oct 2005
Posts: 4798
Location: California

PostPosted: Mon Aug 06, 2007 2:16 pm    Post subject: Reply with quote

What does the following show:
Code:

ip route

_________________
Thomas S. Howard
Back to top
View user's profile Send private message
Laird
n00b
n00b


Joined: 06 Aug 2007
Posts: 15

PostPosted: Mon Aug 06, 2007 2:21 pm    Post subject: Reply with quote

I don't have the ip command - which package do I need to emerge to gain it?
Back to top
View user's profile Send private message
didymos
Advocate
Advocate


Joined: 10 Oct 2005
Posts: 4798
Location: California

PostPosted: Mon Aug 06, 2007 2:28 pm    Post subject: Reply with quote

It's in iproute2. I thought it was one those packages that was always emerged as part of system. Guess not. It's good to have it around, but you can also just use the "route" command. It's the same information, just formatted a bit differently.
_________________
Thomas S. Howard
Back to top
View user's profile Send private message
Laird
n00b
n00b


Joined: 06 Aug 2007
Posts: 15

PostPosted: Mon Aug 06, 2007 2:35 pm    Post subject: Reply with quote

OK, thanks. route gives:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
144.130.106.49  *               255.255.255.255 UH    0      0        0 ppp0
loopback        gentocrat.      255.0.0.0       UG    0      0        0 lo
default         144.130.106.49  0.0.0.0         UG    0      0        0 ppp0

where ppp0 is, as I mentioned before, my dial-up connection, which I'm using to communicate with you now.

I couldn't emerge iproute2 due to a compile error (!).
Back to top
View user's profile Send private message
didymos
Advocate
Advocate


Joined: 10 Oct 2005
Posts: 4798
Location: California

PostPosted: Mon Aug 06, 2007 2:50 pm    Post subject: Reply with quote

I take it the DSL will replace the dial-up connection, so try using the "defaultroute" option with ppp1. Stop ppp0 then start ppp1 and see if the connection will finally come up. You can always start ppp0 back up.
_________________
Thomas S. Howard
Back to top
View user's profile Send private message
Laird
n00b
n00b


Joined: 06 Aug 2007
Posts: 15

PostPosted: Mon Aug 06, 2007 3:02 pm    Post subject: Reply with quote

Code:
# /etc/init.d/net.ppp1 stop
 * Caching service dependencies ...                                                                     [ ok ]
 * Stopping ppp1
 *   Bringing down ppp1
 *     Stopping pppd on ppp1                                                                            [ ok ]
# poff
# /etc/init.d/net.ppp1 start
 * Starting ppp1
 *   Bringing up ppp1
 *     ppp
 *       Running pppd ...
 *       Backgrounding ...
# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:E0:18:48:FA:F3
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3 errors:0 dropped:0 overruns:0 frame:0
          TX packets:311 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:180 (180.0 b)  TX bytes:9928 (9.6 Kb)
          Interrupt:9

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:5178 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5178 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:175372 (171.2 Kb)  TX bytes:175372 (171.2 Kb)

# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
loopback        gentocrat.      255.0.0.0       UG    0      0        0 lo


I hope that you're good for the 20 cents that poff cost me. :-P
Back to top
View user's profile Send private message
didymos
Advocate
Advocate


Joined: 10 Oct 2005
Posts: 4798
Location: California

PostPosted: Mon Aug 06, 2007 3:15 pm    Post subject: Reply with quote

You take personal checks? I'll also need a self-addressed, stamped envelope, at which point the check will be in the mail.

Anyway, I'm out of ideas right now. The only thing that comes to mind is the cable to the DSL modem. Maybe it's just not quite seated in one or both jacks. I have to take off anyway, but I'll try and come up with something less desperate than "loose cable". Unless it works, in which case it wasn't some random idea but the product of razor-sharp intuition.
_________________
Thomas S. Howard
Back to top
View user's profile Send private message
Laird
n00b
n00b


Joined: 06 Aug 2007
Posts: 15

PostPosted: Mon Aug 06, 2007 3:24 pm    Post subject: Reply with quote

No worries, thanks for your help so far Thomas. I think that sometime after the shops open this morning I'm going to purchase a new network card that I can't really afford, just because I saw in a thread elsewhere that it seemed to solve someone else's similar problem (one of the Intel cards apparently wouldn't work with PPPoE / DHCP... I know, I know - sounds pretty wild but hey, I'm desperate here myself).
Back to top
View user's profile Send private message
Laird
n00b
n00b


Joined: 06 Aug 2007
Posts: 15

PostPosted: Mon Aug 06, 2007 3:31 pm    Post subject: Reply with quote

Oh, and, by the way, I had tried the loose cable trick already. I hadn't tried it on the phone jack yet though and there was a pleasing inwards movement leading to a temporary feeling of "This is it, baby!" which quickly dissipated when reality kicked in and the same error ensued...
Back to top
View user's profile Send private message
didymos
Advocate
Advocate


Joined: 10 Oct 2005
Posts: 4798
Location: California

PostPosted: Tue Aug 07, 2007 1:08 am    Post subject: Reply with quote

So, did it work? Out of curiosity, what was the card you thought might be the problem?
_________________
Thomas S. Howard
Back to top
View user's profile Send private message
Laird
n00b
n00b


Joined: 06 Aug 2007
Posts: 15

PostPosted: Tue Aug 07, 2007 4:28 am    Post subject: Reply with quote

The problem is almost completely solved with no need to buy a new network card. I hope that you'll forgive me for not answering your question as to which network card I have but it would take some digging around and it seems irrelevant now - it's an onboard chip and I seem to recall that it's an Intel variant. Tell me if you'd still like to know and I'll try to find out more specifically.

It seems that I misunderstood the workings of the ADSL modem. It's a Netgear DM111P modem and to get it working I had to:
* set up eth0 as a dhcp client - the modem then assigned me address 192.168.0.2
* browse to 192.168.0.1 to set up the modem
* enter my username and password in the appropriate place and reboot the modem - it then handles the PPPoE connection itself
* leave eth0 set up as a dhcp client - now that the modem has username/password and connects, the address assigned is no longer 192.168.0.2, but is rather the ISP-assigned address for the ADSL connection. If I want to configure the modem again I guess I have to leave the phone connection unplugged so that I get assigned 192.168.0.2 again and can again access 192.168.0.1.

I'm a little confused about exactly how it's relaying traffic because I have a strong firewall set up but when I run an external portscan it finds most ports "closed" rather than "hidden" and it even finds two open ports. I'm guessing that those ports are on some interface that the modem itself is exposing, rather than on my ethernet card. But that would mean that it's not forwarding incoming connections and I would be unable to run e.g. a web server - I'll have to investigate this.

The main problem that I have now though is that even though eth0 becomes the default gateway when I bring eth0 up, eth0 is no longer the default gateway when the lease is renewed - and the DHCP lease is set to 300. So every few minutes I have to manually type in route add default eth0, which is silly - there has to be a way to configure things better. My /etc/conf.d/net file currently looks like this (minus comments):
Code:
config_eth0=( "dhcp" )
routes_eth0=( "default" )
gateway="eth0"


Any suggestions on what I can do to maintain eth0 as the default gateway when the DHCP lease renews?
Back to top
View user's profile Send private message
didymos
Advocate
Advocate


Joined: 10 Oct 2005
Posts: 4798
Location: California

PostPosted: Tue Aug 07, 2007 5:29 am    Post subject: Reply with quote

This is why I prefer not to let the DSL modem handle PPPoE. But first, for the routing, try not setting it yourself and let DHCP do it. The ISP's server ought to pass along routing info, which the DHCP client can set whenever a lease is taken. As to using the modem without the built-in PPPoE client, from the manual it appears you can choose to have it use "RFC 1483 Bridged or Routed Ethernet", which would allow you to use pppd to connect and the modem will just act as an Ethernet-ATM bridge. This also takes care of the forwarding and firewall issues, by giving full control over traffic and ports to the Linux box. If that's the case, then eth0 can be statically assigned 192.168.0.2 and you can access the modem whenever you want.
_________________
Thomas S. Howard
Back to top
View user's profile Send private message
Laird
n00b
n00b


Joined: 06 Aug 2007
Posts: 15

PostPosted: Tue Aug 07, 2007 7:04 am    Post subject: Reply with quote

Wonderful - it's all working now using pppd. Turns out that the menu option was RFC 2684 rather than RFC 1483 but I can forgive them their mispromotion - it works.

Thanks so much for your help! The juicy goodness of broadband is mine!!! Yeeeeeeha!

Three things remain.

Firstly, I was wrong about the ports being left open by a modem interface - turns out that my firewall rules covered only ppp0 and not ppp1, so it was my fault that ports were visible, and not the modem's. Apologies to Netgear for any malignment that they suffered.

Secondly, I'm not sure how I would statically assign 192.168.0.2 to eth0 given that in the net config that you provide, config_eth0 is set to "null". I tried, after pulling ppp1 up, running ifconfig eth0 address 192.168.0.2 and I received this error message:
Code:
address: Unknown host
ifconfig: `--help' gives usage information.


Finally, I'd like to suggest that you add to the HOWTO a small disclaimer indicating that an ADSL modem might need to be configured before it will act as a PPPoE bridge, and that it might by default do what mine did. It might save newbies like myself who receive a modem with no manual and only a Win setup CD several hours of frustrated confusion! Perhaps a mention that they might have access to a web interface would be useful too. I know that you're trying to keep it to the point but a little bit of context doesn't go astray.

Cheers mate,
Laird
Back to top
View user's profile Send private message
didymos
Advocate
Advocate


Joined: 10 Oct 2005
Posts: 4798
Location: California

PostPosted: Tue Aug 07, 2007 8:31 am    Post subject: Reply with quote

Laird wrote:
Wonderful - it's all working now using pppd.

Secondly, I'm not sure how I would statically assign 192.168.0.2 to eth0 given that in the net config that you provide, config_eth0 is set to "null". I tried, after pulling ppp1 up, running ifconfig eth0 address 192.168.0.2 and I received this error message:
Code:
address: Unknown host
ifconfig: `--help' gives usage information.


Well, the easiest way is to just have this in /etc/conf.d/net:
Code:

config_eth0=( "192.168.0.2/24" )


I put that in one of alternate setup sections. But to do it manually, the command would be:
Code:

ifconfig eth0 192.168.0.2


or with the ip command:
Code:

ip addr add 192.168.0.2 dev eth0


It was the 'address' bit that threw it off.

Quote:

Finally, I'd like to suggest that you add to the HOWTO a small disclaimer indicating that an ADSL modem might need to be configured before it will act as a PPPoE bridge, and that it might by default do what mine did. It might save newbies like myself who receive a modem with no manual and only a Win setup CD several hours of frustrated confusion! Perhaps a mention that they might have access to a web interface would be useful too. I know that you're trying to keep it to the point but a little bit of context doesn't go astray.


Actually I did, but it's tucked away in one of the alternate setup sections, which you probably wouldn't read unless you were thinking about using that setup in the first place. I'll move the information to the basic setup section, which is probably where it belonged in the first place.
_________________
Thomas S. Howard
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum