# [Solved] Modular networking

## Luc484

Hi! I'm very sorry to post this question as I see there are already many posts, but it's been a week and I still can't make this work. I think it is related to the new baselayout 2, and maybe I made some mistakes during the migration even if I already followed the guide. The problem is related to the ADSL connection using pppoe, this is what I get:

```
host conf.d # /etc/init.d/net.ppp0 restart

 * Caching service dependencies ...                                                        [ ok ]

 * Bringing down interface ppp0

 *   Stopping pppd on ppp0                                                                 [ ok ]

 *   Removing addresses

ppp0: error fetching interface information: Device not found

ppp0: error fetching interface information: Device not found

 * Bringing up interface ppp0

 *   Starting pppd in ppp0 ...                                                             [ ok ]

 *   Backgrounding ...

 * WARNING: net.ppp0 has started, but is inactive
```

The connection doesn't work. I can connect without problems with the old pppoe-start, but I know it would be good to migrate to the new modular networking.

This is my conf in /etc/init.d/net:

```
link_ppp0="eth0"

plugins_ppp0="pppoe"

username_ppp0='user'

password_ppp0='password'

pppd_ppp0="

   noauth

   defaultroute

   usepeerdns

   default-asyncmap

   ipcp-accept-remote

   ipcp-accept-local

   lcp-echo-interval 15

   lcp-echo-failure 3

   persist

   holdoff 2

   mru 1492

   mtu 1492

   debug

   lock

"
```

I read I have to put this in my router conf, but I already had it:

```
iptables -I FORWARD 1 -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
```

Even if I set the debug option I have nothing in my /var/log/messages (syslog-ng is running).

Is there anyone who can tell me if I made something wrong? The other interface is working correctly.

Thank you very much guys! Bye!Last edited by Luc484 on Mon Jul 07, 2008 4:24 pm; edited 1 time in total

----------

## SeaTiger

If this is what I think it is(I didn't use ppp for a long time), it should go in /etc/conf.d/net

```
link_ppp0="eth0"

plugins_ppp0="pppoe"

username_ppp0='user'

password_ppp0='password'

pppd_ppp0="

   noauth

   defaultroute

   usepeerdns

   default-asyncmap

   ipcp-accept-remote

   ipcp-accept-local

   lcp-echo-interval 15

   lcp-echo-failure 3

   persist

   holdoff 2

   mru 1492

   mtu 1492

   debug

   lock

"
```

You should have /etc/init.d/net.lo, which is a symbolic link to /lib/rc/sh/net.sh

for your ppp0, add /etc/init.d/net.ppp0 -> /lib/rc/sh/net.sh

```
ln -s /lib/rc/sh/net.sh /etc/init.d/net.ppp0
```

I don't have /etc/init.d/net anymore.

----------

## Luc484

Yes, sorry, made a mistake reporting the location of the net file. It is in /etc/conf.d. Then I have this:

```
lrwxrwxrwx 1 root root     6 2006-04-09 16:27 net.eth1 -> net.lo

lrwxrwxrwx 1 root root    18 2008-04-17 15:25 net.lo -> //lib/rc/sh/net.sh

lrwxrwxrwx 1 root root     6 2008-04-28 02:34 net.ppp0 -> net.lo
```

So it seems to be correct, doesn't it?

----------

## tadeboro

I'm having the same problem after upgrade to OpenRC and still trying to resolve this.

In the mean time, you could add line or two to your /etc/conf.d/net file:

```
config_eth0="null"  *

config_ppp0="ppp"   *

link_ppp0="eth0"

plugins_ppp0="pppoe"

username_ppp0='user'

password_ppp0='pass'

...
```

Hope it helps you.

----------

## tadeboro

Hello again.

I did some research on the subject and found some kind of solution (the network now works, but I still get some warnings on the console).

I erased my "password_ppp0" line from the configuration file and wrote that information in pap-secrets file. Here are my config files.

/etc/conf.d/net

```
config_eth0="null"

config_ppp0="ppp"

link_ppp0="eth0"

plugins_ppp0="pppoe"

username_ppp0='my_user'

#password_ppp0='my_password'   <= this line is commented!!

pppd_ppp0="

   noauth

   defaultroute

   usepeerdns

   "

```

/etc/ppp/pap-secrets

```
# Secrets for authentication using PAP

# client   server   secret         IP addresses

"my_user" * "my_password"

```

I hope you can get your net working.

----------

## Luc484

Strange... no effect here.

----------

## cyrillic

 *Luc484 wrote:*   

> 
> 
> ```
> lrwxrwxrwx 1 root root     6 2006-04-09 16:27 net.eth1 -> net.lo
> 
> ...

 

It looks like your net.eth0 symlink is missing.

Does it start working if you link net.eth0 -> net.lo ?

----------

## Inodoro_Pereyra

 *cyrillic wrote:*   

>  *Luc484 wrote:*   
> 
> ```
> lrwxrwxrwx 1 root root     6 2006-04-09 16:27 net.eth1 -> net.lo
> 
> ...

 

Exactly... The same issue here after upgrading to baselayout 2. In some strage way, open rc managed to delete my net.eth0 symlink without even asking... Resolved after the symlink was generated again.

Regards.

----------

## Luc484

Nope. Not working with net.eth0 as well. No effect. I already read about this lack of net.eth0, but same error messages even with:

```
lrwxrwxrwx 1 root root     6 2008-05-01 05:40 net.eth0 -> net.lo

lrwxrwxrwx 1 root root     6 2006-04-09 16:27 net.eth1 -> net.lo

lrwxrwxrwx 1 root root    18 2008-04-30 23:38 net.lo -> //lib/rc/sh/net.sh

lrwxrwxrwx 1 root root     6 2008-04-28 02:34 net.ppp0 -> net.lo
```

I noticed something strange: when I stop pppoe with pppoe-stop and start net.ppp0 the ADSL is somehow working, but very very badly (errors I already reported remain). I tried to give a look at the mtu but seems ok to me. Any other idea?

Thanks for your help guys!

EDIT: I have a doubt: do I have to start net.eth0 before starting net.ppp0? If I try to do it, I see it tries to use DHCP by default as it says there is no setting for eth0 in my /etc/conf.d/net. eth0 is my interface to the Internet. Do I have to start it?

----------

## Martux

I am having the same issues as Luc484 with this in my /etc/conf.d/net

```

config_eth0=( "null" )

config_ppp0=( "ppp" )

link_ppp0="eth0"

plugins_ppp0=( "pppoe" )

username_ppp0='username'

password_ppp0='passwd'

pppd_ppp0=(

    "noauth"

    "defaultroute"

    "usepeerdns"

    "default-asyncmap"

    "ipcp-accept-remote"

    "ipcp-accept-local"

    "lcp-echo-interval 15"

    "lcp-echo-failure 3"

    "mru 1492"

    "mtu 1492"

    "debug"

)

depend_ppp0() {

        need net.eth0

}

```

and this in my /etc/init.d directory:

```

net.eth0 -> net.lo

net.lo -> //lib64/rc/sh/net.sh

net.ppp0 -> /etc/init.d/net.lo

```

----------

## Luc484

I see none has a solution to this issue, so I think I'll have to use pppoe-start to connect. Is it the case to file a bugreport or is it likely to be a mistake in the configuration? The problem is that I don't know if this situation is reproducible anywhere and I see no useful message in my /var/log/messages.

----------

## Martux

I could swear i saw a bug about this, but cannot find it anymore. 

Did you use that same configuration with baselayout1 (and it worked)? I decided to switch to modular networking instead of the old rp-pppoe way when switching to baselayout2. In the meantime i switched back to get auto-connect again.   :Crying or Very sad: 

----------

## Luc484

Well, the problem started when I tried upgrading from version 1 to version 2. I tried the migration but I got these errors. Then, I removed my old config file and wrote a new one.

----------

## Martux

Hmm, i used this wiki-article, maybe you can doublecheck against your config:

http://gentoo-wiki.com/HOWTO_Connect_using_PPPoE

----------

## Luc484

Yes, that is exactly the same I used, using the new syntax for the config file which comes with baselayout 2. Tried many times but I see always the same errors.

EDIT: The problem is that with pppoe-start I can't even use ddclient for instance, as it waits for net.ppp0 to start. Starting both net.ppp0 and the pppoe script is the only way to make it work. Very annoying.

----------

## Martux

@Luc484:

Maybe it' s not necessary to revive this thread, but i' ve got it finally working with the exact settings from my first post. 

Kernel is gentoo-sources-2.6.25-r6

ppp-2.4.4-r17

openrc-0.2.5

The only thing which confuses me is this in my /var/log/messages:

```

Plugin rp-pppoe.so loaded.

RP-PPPoE plugin version 3.3 compiled against pppd 2.4.4

```

I unmerged rp-pppoe and even deleted /etc/ppp/ before remerging ppp, but still this message.

The plugin must be built in with ppp.

Hope this helps you or anyone, otherwise just ignore   :Wink: 

----------

## mrness

 *Martux wrote:*   

> 
> 
> The only thing which confuses me is this in my /var/log/messages:
> 
> ```
> ...

 

Yes, the plugin is part of net-dialup/ppp and is necessary for PPPoE links.

----------

## Martux

Ok, thanks for the info. I'm glad modular networking works for me now.   :Very Happy: 

----------

## Luc484

 *Martux wrote:*   

> @Luc484:
> 
> Maybe it' s not necessary to revive this thread, but i' ve got it finally working with the exact settings from my first post. 
> 
> Kernel is gentoo-sources-2.6.25-r6
> ...

 

I gave up some time ago. Today I tried again. Seems some problems have gone away, and I can connect through net.ppp0 with rp-pppoe, but ppp is still not working. This is what I get:

```
cluca luca # /etc/init.d/net.ppp0 restart

 * Caching service dependencies ...                                                        [ ok ]

 * Stopping sshd ...                                                                       [ ok ]

 * samba -> stop: smbd ...                                                                 [ ok ]

 * samba -> stop: nmbd ...                                                                 [ ok ]

 * Stopping dhcpd ...                                                                      [ ok ]

 * Stopping ddclient ...                                                                   [ ok ]

 * Stopping cvsd ...                                                                       [ ok ]

 * Bringing down interface ppp0

 * Bringing up interface ppp0

 *   Starting pppd in ppp0 ...                                                             [ ok ]

 *   Backgrounding ...

 * WARNING: net.ppp0 has started, but is inactive

 * WARNING: ddclient is scheduled to started when net.ppp0 has started

 * WARNING: cvsd is scheduled to started when net.ppp0 has started

 * WARNING: sshd is scheduled to started when net.ppp0 has started

 * WARNING: samba is scheduled to started when net.ppp0 has started

 * WARNING: dhcpd is scheduled to started when net.ppp0 has started
```

Now the error I had time ago disappeared but the warning is a problem. No service can be started. The only difference from your conf is that I use gentoo-sources-2.6.25.

----------

## Martux

Luc484, i' ve got similar errors with ntpd but as i see it all services depending on net.ppp0 are started once it' s up.

----------

## Luc484

Well, here status indicates me those services are in the stopped state after I get those messages.

----------

## mrness

That means net.ppp0 still is in inactive state. Add "debug"  to pppd_ppp0 and post here the relevant log lines.

Edit: And make sure you log everything. When you specify debug, pppd will log additional info using the debug log level (duh).

Edit2: Your services shouldn't depend on net.ppp0 in the first place. Care to explain why you choose not to set RC_NET_STRICT_CHECKING parameter to "no" or "lo"?

----------

## Luc484

I didn't know about the existance of this variable RC_NET_STRICT_CHECKING and it was not present in my /etc/rc.conf. Now I set it to no as you said and everything seems to be working correctly (where for 'working correctly' I mean that services are successfully started even if that warning still appears). In the guide I followed this variable was not reported I suppose. Thanks for your help!

----------

