# Problem setting up ADSL modem using PPPoE HOWTO

## Laird

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:

```
* 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:

```
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

----------

## didymos

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.

----------

## Laird

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.

----------

## Laird

Nice work on the HOWTO by the way.  It reads clearly.

----------

## Laird

Hmm, I've just noticed in the /etc/init.d/net.lo file the following lines:

```
# 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?

----------

## didymos

 *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.

----------

## didymos

OK, wait: which version of baselayout is this?

----------

## Laird

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

```
*  sys-apps/baselayout

      Latest version available: 1.12.9-r2

      Latest version installed: 1.11.14-r5
```

----------

## didymos

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.

----------

## Laird

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:

```
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):

```
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):

```
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...?...

----------

## Laird

More information:

```
# /etc/init.d/net.eth0 start

 * Starting eth0

 *   Bringing up eth0                                                                                   [ ok ]

# pppoe -I eth0 -A

pppoe: Timeout waiting for PADO packets
```

----------

## didymos

What does the following show:

```

ip route

```

----------

## Laird

I don't have the ip command - which package do I need to emerge to gain it?

----------

## didymos

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.

----------

## Laird

OK, thanks.  route gives:

```
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 (!).

----------

## didymos

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.

----------

## Laird

```
# /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.  :Razz: 

----------

## didymos

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.

----------

## Laird

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).

----------

## Laird

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...

----------

## didymos

So, did it work?  Out of curiosity, what was the card you thought might be the problem?

----------

## Laird

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):

```
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?

----------

## didymos

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.

----------

## Laird

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:

```
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

----------

## didymos

 *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:
> 
> ```
> ...

 

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

```

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:

```

ifconfig eth0 192.168.0.2

```

or with the ip command:

```

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.

----------

## didymos

 *Laird wrote:*   

> 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.
> 
> 

 

OK, finally got around to that.  I can't really do anything about the lack-of-manual situation, though.  I have to recommend using the manual because there's just no consistency from modem to modem.  I tried to point out the sort of thing to look for, but I'm dead certain there's some weird-ass modem out there that calls it something completely counter-intuitive and/or plain inaccurate. It might be a good idea to add a section under troubleshooting and tell people to post the config details for particular modems.  Other pages use that approach.

Oh, by the way, the RFC 1483 thing?  Netgear's downloadable manual is apparently out of date.  RFC 2684 replaced RFC 1483.  So the firmware is current, but the manual is at least a couple years old, I'd say.

----------

## Laird

 *Quote:*   

> Laird: Finally, I'd like to suggest that you add to the HOWTO a small disclaimer [...]
> 
> didymos: OK, finally got around to that.  I can't really do anything about the lack-of-manual situation, though.  I have to recommend using the manual because there's just no consistency from modem to modem.

 

What you've added reads well to me.  So long as people realise that there might be extra steps required but are without a manual then they can call their ISP's technical support line to find out the required steps/configuration.  A couple of syntax errors struck me - two uncalled-for apostrophes in "each modem has it's own requirements" and "your modem is likely set to use it's PPPoE client".

 *didymos wrote:*   

> It might be a good idea to add a section under troubleshooting and tell people to post the config details for particular modems.

 

Yes, that would be useful.

As an aside: my motherboard's decided that it no longer has a builtin network card (nor a mouse serial port) so, after all of that and on the very day that I sort all of my problems out: the juicy goodness of broadband is no longer mine!  Time to upgrade my hardware...

----------

## didymos

 *Laird wrote:*   

> 
> 
> A couple of syntax errors struck me - two uncalled-for apostrophes in "each modem has it's own requirements" and "your modem is likely set to use it's PPPoE client".
> 
> 

 

Those weren't the only ones.  I found more.  Usually I double-check, because I always do that.  It's because the possessive rule is usually "add 's", but so is the contraction rule for is and has. I think this must cause some sort of cross-wiring in the language centers of the brain where they connect to the parts that handle writing, because tons of people who know better make the same error all the time. Stupid English.

 *Quote:*   

> s an aside: my motherboard's decided that it no longer has a builtin network card (nor a mouse serial port) so, after all of that and on the very day that I sort all of my problems out: the juicy goodness of broadband is no longer mine! Time to upgrade my hardware...

 

So, instead of buying a network card you can't afford, you get to buy a motherboard you can't afford.  Nice.

----------

