# Help on PPPoE, cant seem to get any signal..

## N1ne

I need some help setting up PPPoE in gentoo, I´ll get right down to buisness   :Very Happy: 

I have emerged ppp and rp-ppp, I ran adsl-setup and specified my username/password and so on.

When I try to connect I get the error msg:

```
Couldn't set tty to PPP discipline: Invalid argument

pppoe: read (asyncReadFromPPP): Session 43332: Input/output error

```

This is the output from #DEBUG=1 adsl-start

```
---------------------------------------------

* The following section contains information about your system

Mon Oct 31 17:25:18 CET 2005

Output of uname -a

Linux panther 2.6.12-gentoo-r10 #16 SMP Mon Oct 31 15:49:34 CET 2005 i686 Intel(R) Pentium(R) 4 CPU 3.20GHz GenuineIntel GNU/Linux

---------------------------------------------

* The following section contains information about your network

* interfaces.  The one you chose for PPPoE should contain the words:

* 'UP' and 'RUNNING'.  If it does not, you probably have an Ethernet

* driver problem.

Output of ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:30:1B:32:01:73  

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000 

          RX bytes:18081 (17.6 Kb)  TX bytes:36992 (36.1 Kb)

          Interrupt:22 Base address:0xa800 

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:8 errors:0 dropped:0 overruns:0 frame:0

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

          collisions:0 txqueuelen:0 

          RX bytes:480 (480.0 b)  TX bytes:480 (480.0 b)

---------------------------------------------

* The following section contains information about kernel modules

* If the module for your Ethernet card is 'tulip', you might

* want to look for an updated version at http://www.scyld.com

Output of lsmod

Module                  Size  Used by

---------------------------------------------

* The following section lists your routing table.

* If you have an entry which starts with '0.0.0.0', you probably

* have defined a default route and gateway, and pppd will

* not create a default route using your ISP.  Try getting

* rid of this route.

Output of netstat -n -r

Kernel IP routing table

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface

127.0.0.0       127.0.0.1       255.0.0.0       UG        0 0          0 lo

---------------------------------------------

Contents of /etc/resolv.conf

* The following section lists DNS setup.

* If you can browse by IP address, but not name, suspect

* a DNS problem.

---------------------------------------------

* The following section lists /etc/ppp/options.

* You should have NOTHING in that file.

Contents of /etc/ppp/options

---------------------------------------------

* The following section identifies your Ethernet interface

* and user name.  Some ISP's need 'username'; others

* need 'username@isp.com'.  Try both

ETH=eth0; USER=MY USERNAME TADDDAA TA DAAA!!!

---------------------------------------------

* The following section shows the pppd command we will invoke

pppd invocation

/usr/bin/setsid /usr/sbin/pppd pty '/usr/sbin/pppoe -p /var/run/-adsl.pid.pppoe -I eth0 -T 80 -U  -m 1412   '  noipdefault noauth default-asyncmap defaultroute hide-password nodetach usepeerdns mtu 1492 mru 1492 noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp user MY USERNAME TADDDAA TA DAAA!!! lcp-echo-interval 20 lcp-echo-failure 3   debug

---------------------------------------------

Couldn't set tty to PPP discipline: Invalid argument

Waiting for 1 child processes...

  script /usr/sbin/pppoe -p /var/run/-adsl.pid.pppoe -I eth0 -T 80 -U  -m 1412    -D /tmp/pppoe-debug-9314/pppoe-debug.txt-0, pid 9375

pppoe: read (asyncReadFromPPP): Session 43271: Input/output error

Script /usr/sbin/pppoe -p /var/run/-adsl.pid.pppoe -I eth0 -T 80 -U  -m 1412    -D /tmp/pppoe-debug-9314/pppoe-debug.txt-0 finished (pid 9375), status = 0x1

---------------------------------------------

* The following section is an extract from your log.

* Look for error messages from pppd, such as

* a lack of kernel support for PPP, authentication failure

* etc.

Can't find messages file (looked for /var/{log,adm}/messages

Mon Oct 31 17:25:18 CET 2005

---------------------------------------------

* The following section is a dump of the packets

* sent and received by rp-pppoe.  If you don't see

* any output, it's an Ethernet driver problem.  If you only

* see three PADI packets and nothing else, check your cables

* and modem.  Make sure the modem lights flash when you try

* to connect.  Check that your Ethernet card is in

* half-duplex, 10Mb/s mode.  If all else fails,

* try using pppoe-sniff.

rp-pppoe debugging dump

rp-pppoe-3.5

17:25:18.591 SENT PPPoE Discovery (8863) PADI sess-id 0 length 12

SourceAddr 00:30:1b:32:01:73 DestAddr ff:ff:ff:ff:ff:ff

01 01 00 00 01 03 00 04 9f 24 00 00               .........$..

17:25:18.623 RCVD PPPoE Discovery (8863) PADO sess-id 0 length 43

SourceAddr 00:02:3b:02:3b:0c DestAddr 00:30:1b:32:01:73

01 01 00 00 01 03 00 04 9f 24 00 00 01 02 00 17   .........$......

39 30 30 36 38 30 36 30 32 30 30 31 39 33 2d 74   90068060200193-t

62 31 6f 31 31 31 34 01 01 00 00                  b1o1114....

17:25:18.623 SENT PPPoE Discovery (8863) PADR sess-id 0 length 12

SourceAddr 00:30:1b:32:01:73 DestAddr 00:02:3b:02:3b:0c

01 01 00 00 01 03 00 04 9f 24 00 00               .........$..

17:25:18.656 RCVD PPPoE Discovery (8863) PADS sess-id 43271 length 39

SourceAddr 00:02:3b:02:3b:0c DestAddr 00:30:1b:32:01:73

01 01 00 00 01 03 00 04 9f 24 00 00 01 02 00 17   .........$......

39 30 30 36 38 30 36 30 32 30 30 31 39 33 2d 74   90068060200193-t

62 31 6f 31 31 31 34                              b1o1114

17:25:18.658 SENT PPPoE Discovery (8863) PADT sess-id 43271 length 59

SourceAddr 00:30:1b:32:01:73 DestAddr 00:02:3b:02:3b:0c

01 03 00 04 9f 24 00 00 02 03 00 2f 52 50 2d 50   .....$...../RP-P

50 50 6f 45 3a 20 53 79 73 74 65 6d 20 63 61 6c   PPoE: System cal

6c 20 65 72 72 6f 72 3a 20 49 6e 70 75 74 2f 6f   l error: Input/o

75 74 70 75 74 20 65 72 72 6f 72                  utput error

```

I have only compile PPPoE into the kernel, should be sufficient...

My net setup: Computer connected to a switch and from there to the modem via ethernet.

Any ideas? 

Cheers

----------

## linear

Hmmmmm....

Well, that output there shows another error that might be hindering your (and our) quick 

resolution to this problem:

 *N1ne wrote:*   

> ---------------------------------------------
> 
> * The following section is an extract from your log.
> 
> * Look for error messages from pppd, such as
> ...

 

Where is your 'messages' logfile?  Have you emerged syslog-ng on this system?  

Also, I notice you aren't loading any modules for your ethernet card.  Does this mean you've 

built the drivers into the kernel?

Let us know.   :Smile: 

/bk

----------

## N1ne

Yea, I all drivers are built into the kernel, I rarly build any modules almost everything I included in the kernel I use all the time so is there any reason 

for building is as modules? faster? more stable?

And I have not emerged syslog, I use metalog instead. Seems strange that a log file would be the reason that I cant get a connection...?

Thanks for your answer! =)

Maybe I should mention that the ethernet interface works perfect!, but not with ppp =)

----------

## N1ne

*bump*

Info add...

I dont use /etc/conf.d/net OR /etc/conf.d/net.ppp0 for this connection I reccon It would work without since those are gentoo specific

the same with the start up script /etc/init.d/net ... 

Correct me if I am wrong on this bit..

----------

## n0rad

I have the same problem.

I can't provide DEBUG info because i'm on another computer atm.

I'm just wondering what that error means "couldn't set tty to PPP disciple".

Can anyone explain?

tia

----------

## linear

 *N1ne wrote:*   

> And I have not emerged syslog, I use metalog instead. Seems strange that a log file would be the reason that I cant get a connection...?
> 
> ...
> 
> Maybe I should mention that the ethernet interface works perfect!, but not with ppp =)

 

Actually, I was referring to what might have been put in the messages file from that one section of the output.

One thing I was wondering about was why it says:

```
---------------------------------------------

* The following section shows the pppd command we will invoke

pppd invocation

/usr/bin/setsid /usr/sbin/pppd pty '/usr/sbin/pppoe -p /var/run/-adsl.pid.pppoe -I eth0 -T 80 -U  -m 1412   '  noipdefault noauth default-asyncmap defaultroute hide-password nodetach usepeerdns mtu 1492 mru 1492 noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp user MY USERNAME TADDDAA TA DAAA!!! lcp-echo-interval 20 lcp-echo-failure 3   debug

---------------------------------------------
```

The 'pty' is the device the pppd daemon is trying to use for the pppoe connection.  I believe that should be set to 'eth0' in this case.  Try that and let us know how it goes.

/bk

----------

## linear

 *N1ne wrote:*   

> Yea, I all drivers are built into the kernel, I rarly build any modules almost everything I included in the kernel I use all the time so is there any reason for building is as modules? faster? more stable?

 

Well, things run faster when all drivers are built into the kernel, but when doing testing, it's often 

easier to build it as a module, and then you can insert and remove the module for your tests instead 

of having to constantly rebuild the kernel and reboot the machine to test a new config.  Just a thought.   :Cool: 

 *N1ne wrote:*   

> And I have not emerged syslog, I use metalog instead. Seems strange that a log file would be the reason that I cant get a connection...?

 

No problem... Of course, not having that logfile won't kill the ability to make a connection.  It just cut 

part of your resources for solving the problem quickly.  It still seems odd that there is no 

/var/log/messages file.  If your current metalog config file is based off of the example that comes 

with it, I might recommend that you make a link like:

```
ln -s /var/log/important /var/log/messages
```

Many applications in linux expect to see a /var/log/messages file for at least critical errors, as we just 

saw in that debug output with 'adsl-start' above.  So, point them in the right direction...

Hope that helps.

/bk

----------

## linear

 *n0rad wrote:*   

> I'm just wondering what that error means "couldn't set tty to PPP disciple".
> 
> Can anyone explain?

 

The application is telling you that the device you are trying to set PPP up on cannot handle 

PPP.  Take a look at what I wrote about the 'pty' error above.

HTH.

/bk

----------

## N1ne

linear, a big thank you for all your answers. Away form my home box at the moment but I will give your ideas a go.

----------

