# ADSL + IP configuration of an interface

## TiCpu

I've got big troubles with the damn network config script ( /etc/conf.d/net ), here is my problem, I've got eth1 and eth0, eth1 is my netowrk and has this line: 

config_eth1=( "172.20.2.1/23" )

that works fine  but eth0 is my internet and is PPPoE, I want to set an IP AND to connect PPPoE with it so I've got:

config_eth0=( "172.20.4.1/29" )

config_eth0=( "adsl" )

adsl_user_eth0="myuser@myisp.ca"

in the config script, but that only start PPPoE and forget completely about the IP part,  before that update I had /etc/init.d/rp-pppoe which started the ADSL and net.eth0 was configuring the interface but that isn't possible because the script doesn't exist anymore (why...)!

Any idea ?

----------

## TiCpu

Damn,  any gentoo developpers will ever look at this problem ?

----------

## the_mgt

rp-pppoe still exists...

```

emerge net-dialup/rp-pppoe -va

```

You can still use it, i do so too. Just configure your pppoe with adsl-setup and set the local ip normally in /etc/conf.d/net

----------

## TiCpu

From: /usr/portage/net-dialup/rp-pppoe/ChangeLog

  21 Jun 2005; Alin Nastac <mrness@gentoo.org> -files/rp-pppoe.rc,

  rp-pppoe-3.5-r11.ebuild:

  Remove the rp-pppoe init script. The new way of using rp-pppoe is through

  adsl net module of the baselayout-1.11.12-r4.

I think I'll contact that guy so he put back the init.d script which is now removed from rp-pppoe.

----------

## the_mgt

Ok, I see. I think i'll stick to the script...

I can send you a copy if you like, don't know if it would help.

----------

## knue

You cannot set two network cards within the same subnet. Linux does not like it.

do the following:

emerge rp-pppoe

start

adsl-setup

Here my /etc/conf.d/net :

iface_eth1="192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0"

config_eth0=("adsl")

I think you want to set up a software rooter. See this link:

http://www.gentoo.org/doc/en/home-router-howto.xml

I think this should work for you.

----------

## TiCpu

This is not the same subnet, eth1 is 172.20.2.0/23 or 255.255.254.0 so 172.20.2.1 - 172.20.3.254

and eth0 is 172.20.4.0/29 or 255.255.255.248  or 172.20.4.1 - 172.20.4.14

so I want that address + the PPPoE one which will certainly not be on the same subnet.

And yes,   it would be great to have that script back,  you can drop it in ftp://ticpu.no-ip.com/upload if you want or any other method will do, thanks.

----------

## JumpinS

actually this is pretty annoying.

That gentoo-router howto says I need a computer with two NICs, but that's not right. One alone will do.

For that I got used to adsl in init.d but now it's gone and the replacement is rather bad as I can EITHER config it for lan OR adsl.

I want both and on only one single NIC as it used to be (damn I hate that argument, but in this case....)

Someone please fix it.

----------

## TiCpu

Yea, it's still broken, just add the rp-pppoe script in the package and everything will be alright.

----------

## hede

i use inet.d/net.pppX-scripts (there is one default in net-dialup/ppp, my qpkg says). its very easy to handle more than one provider independently from any ethX with it. you have to do some stuff in conf.d/net.ppp0 (explained there) and a line "username provider passwd" in pap/chap-secrets.

i don't know which one to use (chap/pap) but one is required. (PASSWORD-line in conf.d/net.ppp0 is not needed, leave empty)

this way you should even be able to use more than one adsl-modem concurrently (i.e. load balancing), i havent tried because i have only one modem and one line  :Wink: 

(i never used any rp-pppoe-script in init.d nor i knew there is one and my gentoo is online via adsl for years now)

----------

## the_mgt

I uploaded my rp-pppoe script to ftp://ticpu.no-ip.com/upload, i hope. I couldn't "ls" there...

Have a look at the script, i changed some things to better fit my system configuration.

----------

## TiCpu

Ah, yes, it appeared there someday I was wondering who uploaded it, thanks the_mgt! Directory listing/reading is denied in there so those damn bots trying to upload and redownload stuff from public upload directory get an empty list and won't try further tests.

----------

## SleepyEatswell

Set up: ADSL to a fixed IP not in my assigned subnet.  My internal subnet (66.23.213.24/27) and ADSL go to eth0, internal NAT IPs on 192.168.0.0/24 go to eth1.  66.23.213.26 is the server address for my domain's mail and web server.  

Worked flawlessly using the "old" config files with rp-pppoe running as a separate demon.  It's been hell since the change.

I got it to work (initially) using the following:

```

config_eth0=(  "noop" "66.23.213.26 broadcast 66.23.213.31 netmask 255.255.255.248 mtu 1492"

               "adsl"

                   )

config_eth1=( "192.168.0.1/24 mtu 1492" )

```

... but, if the DSL drops, logs show that pppoe restarts the ADSL connection and successfully logs in, but it is apparently unable to link it to eth0 (no message) = no access to the outside.  As a result, I must go to the server and execute /etc/init.d/net.eth0 restart twice - first to kill the pppoe connection, second to restart it.  This sucks!

Rumaging around to see if I can find my old rp-pppoe script to see if I can kludge something together using that that works.

----------

## the_mgt

What do you need? Which files? I don't have the configuration problem Ticpu got, so i think i am using old configs. Should i post some of them here?

----------

## SleepyEatswell

Thanks,

Fortunately, before rebuilding, I saved my /etc files, etc.  So I was able to grab my old /etc/init.d/rp-pppoe, ./net.ppp0 and /etc/conf.d/net files.  Then ran "rc-update add rp-pppoe default", fired rp-pppoe up, restarted /etc/init.d/net.eth0, rebuilt my route table and all is back to working as planned - no more net crashes if the pppoe connection hiccups.    :Very Happy: 

----------

