# pppoe-start working, net.ppp0 not [SOLVED]

## alex.blackbit

i have to use pppoe to connect to my isp.

of course i would like to use /etc/init.d/net.ppp0 for that.

unfortunately i cannot get that to work.

pppoe-start works like a charm.

the thing is: i get my ip with /etc/init.d/net.ppp0, but i cannot reach the internet.

surely i am overlooking something.

any ideas? i am thankful for everything.

grep -Ev "^(#|$)" /etc/ppp/pppoe.conf

```
ETH=eth0

USER=myuser

DEMAND=no

DNSTYPE=NOCHANGE

PEERDNS=yes

DNS1=

DNS2=

DEFAULTROUTE=yes

CONNECT_TIMEOUT=30

CONNECT_POLL=2

ACNAME=

SERVICENAME=

PING="."

PIDFILE="/var/run/rp-pppoe.pid"

SYNCHRONOUS=no

CLAMPMSS=1412

LCP_INTERVAL=20

LCP_FAILURE=3

PPPOE_TIMEOUT=80

FIREWALL=NONE

LINUX_PLUGIN=

PPPOE_EXTRA=""

PPPD_EXTRA=""
```

pppoe-start log

```
Oct 06 01:01:06 [pppd] pppd 2.4.4 started by root, uid 0

Oct 06 01:01:06 [pppd] Using interface ppp0

Oct 06 01:01:06 [pppd] Connect: ppp0 <--> /dev/pts/1

Oct 06 01:01:06 [pppoe] PPP session is 6682 (0x1a1a)

Oct 06 01:01:06 [pppd] Remote message: Authorization successful

Oct 06 01:01:06 [pppd] PAP authentication succeeded

Oct 06 01:01:09 [pppd] local  IP address 1.2.3.4

Oct 06 01:01:09 [pppd] remote IP address 213.229.45.125

Oct 06 01:01:09 [pppd] primary   DNS address 195.34.133.21

Oct 06 01:01:09 [pppd] secondary DNS address 212.186.211.21
```

pppoe-stop log

```
Oct 06 01:02:39 [pppoe-stop] Killing pppd

Oct 06 01:02:39 [pppd] Terminating on signal 15

Oct 06 01:02:39 [pppd] Connect time 1.5 minutes.

Oct 06 01:02:39 [pppd] Sent 203 bytes, received 2318 bytes.

Oct 06 01:02:39 [pppoe-stop] Killing pppoe-connect

Oct 06 01:02:39 [pppoe] read (asyncReadFromPPP): Session 6682: Input/output error

Oct 06 01:02:39 [pppoe] Sent PADT
```

routing table after pppoe-start:

```
Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

213.229.45.125  0.0.0.0         255.255.255.255 UH    0      0        0 ppp0

10.0.0.138      10.58.0.1       255.255.255.254 UG    2      0        0 eth0

192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1

10.58.0.0       0.0.0.0         255.255.0.0     U     2      0        0 eth0

127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo

0.0.0.0         213.229.45.125  0.0.0.0         UG    0      0        0 ppp0

0.0.0.0         10.58.0.1       0.0.0.0         UG    2      0        0 eth0
```

ifconfig ppp0 after pppoe-start

```
ppp0      Link encap:Point-to-Point Protocol  

          inet addr:1.2.3.4  P-t-P:213.229.45.125  Mask:255.255.255.255

          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1

          RX packets:7 errors:0 dropped:0 overruns:0 frame:0

          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:3 

          RX bytes:457 (457.0 B)  TX bytes:93 (93.0 B)
```

relevant part of /etc/conf.d/net:

```
config_ppp0=( "ppp" )

link_ppp0=( "eth0" )

plugins_ppp0=( "pppoe" )

username_ppp0=( "myusername" )

password_ppp0=( "mypass" )

pppd_ppp0=(

        "noauth"

        "defaultroute"

        "default-asyncmap"

        "ipcp-accept-remote"

        "ipcp-accept-local"

        "lcp-echo-interval 15"

        "lcp-echo-failure 3"

        "mru 1492"

        "mtu 1492"

        "debug"

        )
```

/etc/init.d/net.ppp0 start log

```
Oct 06 00:57:24 [pppd] Plugin passwordfd.so loaded.

Oct 06 00:57:24 [pppd] Plugin rp-pppoe.so loaded.

Oct 06 00:57:24 [pppd] RP-PPPoE plugin version 3.3 compiled against pppd 2.4.4

Oct 06 00:57:24 [pppd] pppd 2.4.4 started by root, uid 0

Oct 06 00:57:24 [/etc/init.d/net.ppp0] WARNING: net.ppp0 has started, but is inactive

Oct 06 00:57:24 [pppd] PPP session is 49335

Oct 06 00:57:24 [pppd] Using interface ppp0

Oct 06 00:57:24 [pppd] Connect: ppp0 <--> eth0

Oct 06 00:57:24 [pppd] Remote message: Authorization successful

Oct 06 00:57:24 [pppd] PAP authentication succeeded

Oct 06 00:57:24 [pppd] peer from calling number 00:30:48:2A:90:10 authorized

Oct 06 00:57:27 [pppd] local  IP address 1.2.3.4

Oct 06 00:57:27 [pppd] remote IP address 213.229.45.125
```

/etc/init.d/net.ppp0 stop log

```
Oct 06 01:00:12 [pppd] Terminating on signal 15

Oct 06 01:00:12 [pppd] Connect time 2.8 minutes.

Oct 06 01:00:12 [pppd] Sent 0 bytes, received 3999 bytes.

Oct 06 01:00:12 [pppd] Connection terminated.

Oct 06 01:00:12 [pppd] Exit.
```

routing table after /etc/init.d/net.ppp0 start

```
Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

213.229.45.125  0.0.0.0         255.255.255.255 UH    0      0        0 ppp0

10.0.0.138      10.58.0.1       255.255.255.254 UG    2      0        0 eth0

192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1

10.58.0.0       0.0.0.0         255.255.0.0     U     2      0        0 eth0

127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo

0.0.0.0         10.58.0.1       0.0.0.0         UG    2      0        0 eth0

0.0.0.0         213.229.45.125  0.0.0.0         UG    4013   0        0 ppp0
```

ifconfig ppp0 after /etc/init.d/net.ppp0 start

```
ppp0      Link encap:Point-to-Point Protocol  

          inet addr:1.2.3.4  P-t-P:213.229.45.125  Mask:255.255.255.255

          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1

          RX packets:9 errors:0 dropped:0 overruns:0 frame:0

          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:3 

          RX bytes:621 (621.0 B)  TX bytes:50 (50.0 B)
```

real external ip address, username and password substituted.Last edited by alex.blackbit on Tue Oct 06, 2009 11:47 pm; edited 1 time in total

----------

## alex.blackbit

i just solved it myself.

there were 2 default routes in the /etc/init.d/net.ppp0 case.

one via 10.x.x.x with a lower metric that the real inet connection.

that route comes from the dhcp client on eth0.

i now configured dhcpcd to not set a default route.

does anybody know why /etc/init.d/net.ppp0 sets the metric to the nice number 4014 ?

----------

