# speedtouch & bridged ethernet

## Tuinslak

Hi,

Since a week i've got an ADSL modem (speedtouch 510) and adsl connection.

Now, i'd like my gentoo server to "route" my lan (dns, proxy, ...).

So I've set my modem to Bridged Ethernet, but from there on, I have no idea what to actually do.

I installed ppp0 (edited /etc/conf.d/net.ppp0 -- but have no idea what to fill in in MODEMPORT="/dev/ttyS1"; as it is ethernet (on eth1)).

Are there any howto's around for pppoe? I haven't found any useful (or haven't searched long enough  :Wink: )

----------

## PaulBredbury

It would be great if you could test my new speedtouch ebuild.

----------

## Tuinslak

# ebuild speedtouch-3.0.12.ebuild digest

!!! aux_get(): ebuild path for '/speedtouch-3.0.12' not specified: None

!!! aux_get(): ebuild path for '/speedtouch-3.0.12' not specified: None

aux_get() error reading /speedtouch-3.0.12; aborting.

And mainwhile, what can I do? I'd like to have it fixed asap  :Wink: 

----------

## PaulBredbury

You should have:  /usr/local/portage/net-dialup/speedtouch/speedtouch-3.0.12.ebuild

Then the rest of the files go into /usr/local/portage/net-dialup/speedtouch/files/

----------

## PaulBredbury

Here's a simple installation script:

```
echo 'PORTDIR_OVERLAY="/usr/local/portage"' >> /etc/make.conf 

mkdir -p /usr/local/portage/net-dialup/speedtouch/files

cd /usr/local/portage/net-dialup/speedtouch

wget -q -O speedtouch-3.0.12.ebuild http://bugs.gentoo.org/attachment.cgi?id=71602

cd files

wget -q -O README http://bugs.gentoo.org/attachment.cgi?id=71603

wget -q -O adsl.sample-pppoatm http://bugs.gentoo.org/attachment.cgi?id=71604

wget -q -O adsl.sample-pppoe http://bugs.gentoo.org/attachment.cgi?id=71605

wget -q -O speedtch-hotplug-3 http://bugs.gentoo.org/attachment.cgi?id=71606

wget -q -O speedtch.usermap http://bugs.gentoo.org/attachment.cgi?id=71607

wget -q -O speedtouch.confd-3 http://bugs.gentoo.org/attachment.cgi?id=71608

wget -q -O speedtouch.rc-pppoatm http://bugs.gentoo.org/attachment.cgi?id=71609

wget -q -O speedtouch.rc-pppoe http://bugs.gentoo.org/attachment.cgi?id=71610

cd ..

ebuild speedtouch-3.0.12.ebuild digest

echo "net-dialup/speedtouch ~x86" >> /etc/portage/package.keywords

emerge speedtouch
```

Then, to read the docs (which is essential, to complete the setup):

```
zless /usr/share/doc/speedtouch-3.0.12/README.gz
```

----------

## Tuinslak

I use a speedtouch 510 with NO usb, but only ethernet... Will it work too? (because I see all kind of USB things rolling down my screen)

----------

## PaulBredbury

It should. It's pulling in the "br2684ctl" ebuild to support PPP Over Ethernet, as mentioned in the other docs. The problem is, my modem is USB, so I haven't been able to physically test PPPoE - but it's set up as best as I can, from reading the docs by other people.

You will need to set up /etc/init.d/net.nas0 - the docs in /usr/share/doc/br2684ctl... should give some hints on that, I think.

----------

## Tuinslak

All right, all seems up; just need to create/add nas0.

br2684ctl -b -c 0 -a 8.35

interface "nas0" could not be created, reason: No such device

Communicating over atm 0.8.35, encapsulation: LLC

fatal: failed to connect on socket

----------

## PaulBredbury

Does "emerge --config speedtouch" show any warnings? Especially ones saying "Recompile the kernel with ...".

----------

## PaulBredbury

Also, beware of kernel modules having to be explicitly loaded if not compiled into the kernel. i.e.:

```
modprobe ppp_generic

modprobe pppoatm

modprobe br2684
```

----------

## Tuinslak

 *PaulBredbury wrote:*   

> Does "emerge --config speedtouch" show any warnings? Especially ones saying "Recompile the kernel with ...".

 

USB Device Filesystem (USB_DEVICEFS) is not enabled in the kernel

Failed to detect attached Speedtouch device (it's ethernet...)

defaulted to version 4 (modern silver modem)

although my config.gz says CONFIG_USB_DEVICEFS=y

----------

## Tuinslak

 *PaulBredbury wrote:*   

> Also, beware of kernel modules having to be explicitly loaded if not compiled into the kernel. i.e.:
> 
> ```
> modprobe ppp_generic
> 
> ...

 

all 3 are loaded now, and interface has been created.

What now? 

and do I need to auto load them? & do I need to run br2684ctl -b -c 0 -a 8.35 everytime at boot?

edit: /etc/init.d/speedtouch start gives:

net.nas0

*error: some services needed are missing. Run "./speedtouch broken' for a list of those services. "speedtouch" was not started"

----------

## PaulBredbury

So br2684ctl worked? Cool, now run:

```
/etc/init.d/speedtouch start
```

Then, you should have a working Internet connection.

The br2684ctl stuff should be put in a script in /etc/init.d/net.nas0, for normal autoloading at startup.

----------

## PaulBredbury

You can temporarily remove "net.nas0" from depend() in /etc/init.d/speedtouch, seeing as you have not yet created that script.

Edit: After changing the dependencies like so, I think you need to run /etc/init.d/depscan.sh for the dependencies to be recalculated.

----------

## Tuinslak

$ /etc/init.d/depscan.sh

* caching service dependencies ...

/var/lib/init.d/depcache: line 1737: .linux-usb.org/SpeedTouch/gentoo/index.html: no such files or directory

/var/lib/init.d/depcache: line 1738: from: command not found

* can't find service "net.nas0' needed by 'speedtouch'; continuing... [ok]

$ /etc/init.d/speedtouch start

net.nas0

* error: some services needed are missing. Run './speedtouch broken' for a list of those services. "speedtouch" was not started.

$ cat /etc/init.d/net.nas0

br2684ctl -b -c 0 -a 8.35

editing /etc/init.d/speedtouch, like this:

depend() { 

# need localmount modules net.nas0

before ntp-client ntpd

and removing wrapped lines (.linux-usb.org/Speedblabla and from cmd not found problem)

removes all problems from ./etc/init.d/depscan.sh

now starting speedtouch:

gives: "twice," command not found, edited it in /etc/init.d/speedtouch (also wrapped)

starting it again:

Starting SpeedTouch ADSL modem ...

*long time nothing*

Timeout waiting for firmware loading

----------

## PaulBredbury

OK, the script has some bugs for me to fix. Try this:

```
modprobe pppoe

pppd call adsl
```

Then, you should be online. If not, "tail /var/log/messages" for some interesting error messages.

----------

## Tuinslak

I receive no errors (pppd started by root) but I can't ping anything. Even ifconfig doesn't show any devices..? What did I do wrong?   :Embarassed: 

----------

## PaulBredbury

There must be some error messages in /var/log/messages?

Un-comment the "debug" line in /etc/ppp/peers/adsl

If "ifconfig" doesn't show nas0, then the br2684ctl command can't have succeeded.

----------

## Tuinslak

ifconfig nas0 works, but doesn't show any ip.

debug uncommented;

log:

pppd: plugin rp-pppoe.so loaded.

pppd: rp-pppoe plugin version 3.3 compiled against pppd 2.4.2

pppd 2.4.2 started by root, uid 0

----------

## Tuinslak

I use adsl-start now, works fine. But is there a way to auto start it at boot?

----------

## PaulBredbury

Ah, I see you've got it working with adsl-start. Apologies for my non-working ebuild, I'll make it USB-only.

----------

## Tuinslak

No problem.

Meanwhile the pc doesn't want to boot anymore... all kind of swap/hotplug/random errors... Believe one of my disks is corrupted...  :Sad: 

I'll check the with a maxtor tool... seems like i will be able to reinstall everything anyway

----------

