# connecting to internet fail over PPPoE



## SIFE (Aug 13, 2009)

Salamo Alikom
my configuration file of ppp.conf :

```
#################################################################
# PPP  Sample Configuration File
# Originally written by Toshiharu OHNO
# Simplified 5/14/1999 by wself@cdrom.com
#
# See /usr/share/examples/ppp/ for some examples
#
# $FreeBSD: src/etc/ppp/ppp.conf,v 1.10.18.1 2008/11/25 02:59:29 kensmith Exp $
#################################################################

default:
 set log Phase tun command# Chat LCP IPCP CCP tun command
 #ident user-ppp VERSION (built COMPILATIONDATE)
 #set ifaddr 10.0.0.1/0 10.0.0.2/0
 set ifaddr 192.168.1.1/0 192.168.1.2/0 
 # Ensure that "device" references the correct serial port
 # for your modem. (cuad0 = COM1, cuad1 = COM2)
 #
 #set device /dev/cuad1

 #set speed 115200
 #set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
           \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"
 #set timeout 180			# 3 minute idle timer (the default)
 #enable dns				# request DNS info (for resolv.conf)

ADSL:
 #
 # edit the next three lines and replace the items in caps with
 # the values which have been assigned by your ISP.
 #
# set phone 0xxxxxxxxx
 set device PPPoE:sis0
 set authname XXXXXX
 set authkey XXXXXXX
 set dial
 set login
 #set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
 #add default HISADDR			# Add a (sticky) default route
```
but when i type :

```
ping yahoo.com
```
there is no response .


----------



## SirDice (Aug 13, 2009)

Please supply more information, we cannot tell what's happening just by looking at a config file.

Is the interface being created?
Is the connection being made?
Do you get an IP address?

Have a look in the ppp.log.


----------



## DutchDaemon (Aug 13, 2009)

(and do you have a nameserver? does yahoo.com actually resolve?)


----------



## SIFE (Aug 18, 2009)

this is my ppp.log

```
Jan  2 00:01:28  ppp[1136]: tun0: Chat: Expect(5): OK
Jan  2 00:01:29  ppp[1468]: tun4: Phase: deflink: Connected!
Jan  2 00:01:29  ppp[1468]: tun4: Phase: deflink: opening -> dial
Jan  2 00:01:29  ppp[1468]: tun4: Phase: deflink: dial -> carrier
Jan  2 00:01:31  ppp[1204]: tun1: Chat: deflink: Redial timer expired.
Jan  2 00:01:31  ppp[1204]: tun1: Warning: deflink: Device (PPPoE) must begin with a '/', a '!' or contain at least one ':'
Jan  2 00:01:31  ppp[1204]: tun1: Warning: deflink: Device (sis0) must begin with a '/', a '!' or contain at least one ':'
Jan  2 00:01:31  ppp[1204]: tun1: Chat: Failed to open device
Jan  2 00:01:31  ppp[1204]: tun1: Phase: deflink: Enter pause (30) for redialing.
Jan  2 00:01:33  ppp[1136]: tun0: Chat: Expect timeout
Jan  2 00:01:33  ppp[1136]: tun0: Warning: Chat script failed
Jan  2 00:01:33  ppp[1136]: tun0: Phase: deflink: dial -> hangup
Jan  2 00:01:33  ppp[1136]: tun0: Phase: deflink: Disconnected!
Jan  2 00:01:33  ppp[1136]: tun0: Phase: deflink: Connect time: 10 secs: 0 octets in, 0 octets out
Jan  2 00:01:33  ppp[1136]: tun0: Phase: deflink: 0 packets in, 0 packets out
Jan  2 00:01:33  ppp[1136]: tun0: Phase:  total 0 bytes/sec, peak 0 bytes/sec on Mon Jan  2 00:01:23 2006
Jan  2 00:01:33  ppp[1136]: tun0: Phase: deflink: hangup -> opening
Jan  2 00:01:33  ppp[1136]: tun0: Phase: deflink: Enter pause (30) for redialing.
Jan  2 00:01:34  ppp[1468]: tun4: Phase: deflink: Disconnected!
Jan  2 00:01:34  ppp[1468]: tun4: Phase: deflink: carrier -> hangup
Jan  2 00:01:34  ppp[1468]: tun4: Phase: deflink: Connect time: 5 secs: 0 octets in, 0 octets out
Jan  2 00:01:34  ppp[1468]: tun4: Phase: deflink: 39 packets in, 43 packets out
Jan  2 00:01:34  ppp[1468]: tun4: Phase:  total 0 bytes/sec, peak 0 bytes/sec on Mon Jan  2 00:01:29 2006
Jan  2 00:01:34  ppp[1468]: tun4: Phase: deflink: hangup -> opening
Jan  2 00:01:34  ppp[1468]: tun4: Phase: deflink: Enter pause (30) for redialing.
Jan  2 00:01:38  ppp[1281]: tun2: Chat: deflink: Redial timer expired.
Jan  2 00:01:38  ppp[1281]: tun2: Warning: deflink: Device (PPPoE) must begin with a '/', a '!' or contain at least one ':'
Jan  2 00:01:38  ppp[1281]: tun2: Warning: deflink: Device (sis0) must begin with a '/', a '!' or contain at least one ':'
Jan  2 00:01:38  ppp[1281]: tun2: Chat: Failed to open device
Jan  2 00:01:38  ppp[1281]: tun2: Phase: deflink: Enter pause (30) for redialing.
Jan  2 00:01:42  ppp[1355]: tun3: Warning: deflink: Device (PPPoE) must begin with a '/', a '!' or contain at least one ':'
Jan  2 00:01:42  ppp[1355]: tun3: Warning: deflink: Device (sis0) must begin with a '/', a '!' or contain at least one ':'
Jan  2 00:01:42  ppp[1355]: tun3: Phase: deflink: Enter pause (30) for redialing.
Jan  2 00:02:01  ppp[1204]: tun1: Chat: deflink: Redial timer expired.
Jan  2 00:02:01  ppp[1204]: tun1: Warning: deflink: Device (PPPoE) must begin with a '/', a '!' or contain at least one ':'
Jan  2 00:02:01  ppp[1204]: tun1: Warning: deflink: Device (sis0) must begin with a '/', a '!' or contain at least one ':'
Jan  2 00:02:01  ppp[1204]: tun1: Chat: Failed to open device
Jan  2 00:02:01  ppp[1204]: tun1: Phase: deflink: Enter pause (30) for redialing.
Jan  2 00:02:03  ppp[1136]: tun0: Chat: deflink: Redial timer expired.
Jan  2 00:02:03  ppp[1136]: tun0: Phase: deflink: Connected!
Jan  2 00:02:03  ppp[1136]: tun0: Phase: deflink: opening -> dial
Jan  2 00:02:03  ppp[1136]: tun0: Chat: Phone: XXXXXXX
Jan  2 00:02:03  ppp[1136]: tun0: Chat: Send: AT^M
Jan  2 00:02:03  ppp[1136]: tun0: Chat: Expect(5): OK
Jan  2 00:02:04  ppp[1468]: tun4: Phase: deflink: Connected!
Jan  2 00:02:04  ppp[1468]: tun4: Phase: deflink: opening -> dial
Jan  2 00:02:04  ppp[1468]: tun4: Phase: deflink: dial -> carrier
Aug 14 05:09:27 localhost ppp[1731]: Phase: Using interface: tun0
Aug 14 05:09:27 localhost ppp[1731]: Phase: deflink: Created in closed state
Aug 14 05:09:27 localhost ppp[1731]: tun0: Command: default: set ifaddr 192.168.1.1/0 192.168.1.2/0
Aug 14 05:09:27 localhost ppp[1731]: tun0: Phase: PPP Started (interactive mode).
Aug 14 05:09:33 localhost ppp[1731]: tun0: Command: /dev/ttyp1: off
Aug 14 05:09:38 localhost ppp[1731]: tun0: Command: /dev/ttyp1: turn off
Aug 14 05:09:40 localhost ppp[1731]: tun0: Command: /dev/ttyp1: exit
Aug 14 05:09:43 localhost ppp[1731]: tun0: Command: /dev/ttyp1: quit
Aug 14 05:09:43 localhost ppp[1731]: tun0: Phase: PPP Terminated (normal).
Aug 14 05:09:50 localhost ppp[1743]: Phase: Using interface: tun0
Aug 14 05:09:50 localhost ppp[1743]: Phase: deflink: Created in closed state
Aug 14 05:09:50 localhost ppp[1743]: tun0: Command: default: set ifaddr 192.168.1.1/0 192.168.1.2/0
Aug 14 05:09:50 localhost ppp[1743]: tun0: Command: fawri: set device PPPoE:sis0
Aug 14 05:09:50 localhost ppp[1743]: tun0: Command: fawri: set authname XXXXXXX
Aug 14 05:09:50 localhost ppp[1743]: tun0: Command: fawri: set authkey ********
Aug 14 05:09:50 localhost ppp[1743]: tun0: Command: fawri: set dial
Aug 14 05:09:50 localhost ppp[1743]: tun0: Command: fawri: set login
Aug 14 05:09:50 localhost ppp[1743]: tun0: Phase: PPP Started (interactive mode).
Aug 14 05:09:53 localhost ppp[1743]: tun0: Phase: Caught signal 2, abort connection(s)
Aug 14 05:13:32 localhost ppp[1743]: tun0: Phase: Signal 1, terminate.
Aug 14 05:13:32 localhost ppp[1743]: tun0: Phase: PPP Terminated (normal).
Aug 16 20:18:29 localhost ppp[966]: Phase: Using interface: tun0
Aug 16 20:18:29 localhost ppp[966]: Phase: deflink: Created in closed state
Aug 16 20:18:29 localhost ppp[966]: tun0: Command: default: set ifaddr 192.168.1.1/0 192.168.1.2/0
Aug 16 20:18:29 localhost ppp[966]: tun0: Phase: PPP Started (interactive mode).
Aug 16 20:18:34 localhost ppp[966]: tun0: Command: /dev/ttyp0: exit
Aug 16 20:18:37 localhost ppp[966]: tun0: Command: /dev/ttyp0: quit
Aug 16 20:18:37 localhost ppp[966]: tun0: Phase: PPP Terminated (normal).
Aug 16 20:18:41 localhost ppp[978]: Phase: Using interface: tun0
Aug 16 20:18:41 localhost ppp[978]: Phase: deflink: Created in closed state
Aug 16 20:18:41 localhost ppp[978]: tun0: Command: default: set ifaddr 192.168.1.1/0 192.168.1.2/0
Aug 16 20:18:41 localhost ppp[978]: tun0: Command: fawri: set device PPPoE:sis0
Aug 16 20:18:41 localhost ppp[978]: tun0: Command: fawri: set authname XXXXXXX
Aug 16 20:18:41 localhost ppp[978]: tun0: Command: fawri: set authkey ********
Aug 16 20:18:41 localhost ppp[978]: tun0: Command: fawri: set dial
Aug 16 20:18:41 localhost ppp[978]: tun0: Command: fawri: set login
Aug 16 20:18:41 localhost ppp[978]: tun0: Phase: PPP Started (interactive mode).
Aug 16 20:18:47 localhost ppp[978]: tun0: Command: /dev/ttyp0: exit
Aug 16 20:18:49 localhost ppp[978]: tun0: Command: /dev/ttyp0: quit
Aug 16 20:18:49 localhost ppp[978]: tun0: Phase: PPP Terminated (normal).
Aug 16 20:39:26 localhost ppp[1043]: Phase: Using interface: tun0
Aug 16 20:39:26 localhost ppp[1043]: Phase: deflink: Created in closed state
Aug 16 20:39:26 localhost ppp[1043]: tun0: Command: default: set ifaddr 192.168.1.1/0 192.168.1.2/0
Aug 16 20:39:26 localhost ppp[1043]: tun0: Command: fawri: set device PPPoE:sis0
Aug 16 20:39:26 localhost ppp[1043]: tun0: Command: fawri: set authname XXXXXXX
Aug 16 20:39:26 localhost ppp[1043]: tun0: Command: fawri: set authkey ********
Aug 16 20:39:26 localhost ppp[1043]: tun0: Command: fawri: set dial
Aug 16 20:39:26 localhost ppp[1043]: tun0: Command: fawri: set login
Aug 16 20:39:26 localhost ppp[1043]: tun0: Phase: PPP Started (interactive mode).
Aug 16 20:39:28 localhost ppp[1043]: tun0: Phase: Caught signal 2, abort connection(s)
Aug 16 20:39:59 localhost ppp[1047]: Phase: Using interface: tun1
Aug 16 20:39:59 localhost ppp[1047]: Phase: deflink: Created in closed state
Aug 16 20:39:59 localhost ppp[1047]: tun1: Command: default: set ifaddr 192.168.1.1/0 192.168.1.2/0
Aug 16 20:39:59 localhost ppp[1047]: tun1: Command: fawri: set device PPPoE:sis0
Aug 16 20:39:59 localhost ppp[1047]: tun1: Command: fawri: set authname XXXXXXX
Aug 16 20:39:59 localhost ppp[1047]: tun1: Command: fawri: set authkey ********
Aug 16 20:39:59 localhost ppp[1047]: tun1: Command: fawri: set dial
Aug 16 20:39:59 localhost ppp[1047]: tun1: Command: fawri: set login
Aug 16 20:39:59 localhost ppp[1047]: tun1: Phase: PPP Started (interactive mode).
Aug 16 20:39:59 localhost ppp[1047]: tun1: Phase: Caught signal 2, abort connection(s)
```


----------



## SIFE (Aug 19, 2009)

this my new log and configuration for ppp :
ppp.conf

```
default:
 set log Phase tun command# Chat LCP IPCP CCP tun command
 set ifaddr 10.0.0.1/0 10.0.0.2/0
 set timeout 180			# 3 minute idle timer (the default)

fawri:
 set device PPPoE:sis0
 set authname XXXXXXXXX
 set authkey  XXXXXXXXX
 set dial
 set login
 add default HISADDR
```
ppp.log

```
Aug 17 17:09:51 localhost ppp[999]: Phase: Using interface: tun0
Aug 17 17:09:51 localhost ppp[999]: Phase: deflink: Created in closed state
Aug 17 17:09:51 localhost ppp[999]: tun0: Command: default: set ifaddr 10.0.0.1/0 10.0.0.2/0
Aug 17 17:09:51 localhost ppp[999]: tun0: Command: default: set timeout 180
Aug 17 17:09:51 localhost ppp[999]: tun0: Command: fawri: set device PPPoE:sis0
Aug 17 17:09:51 localhost ppp[999]: tun0: Command: fawri: set authname XXXXXXXXX
Aug 17 17:09:51 localhost ppp[999]: tun0: Command: fawri: set authkey ********
Aug 17 17:09:51 localhost ppp[999]: tun0: Command: fawri: set dial
Aug 17 17:09:51 localhost ppp[999]: tun0: Command: fawri: set login
Aug 17 17:09:51 localhost ppp[999]: tun0: Command: fawri: add default HISADDR
Aug 17 17:09:51 localhost ppp[1001]: tun0: Phase: PPP Started (ddial mode).
Aug 17 17:09:51 localhost ppp[1001]: tun0: Phase: bundle: Establish
Aug 17 17:09:51 localhost ppp[1001]: tun0: Phase: deflink: closed -> opening
Aug 17 17:09:52 localhost ppp[1001]: tun0: Phase: deflink: Connected!
Aug 17 17:09:52 localhost ppp[1001]: tun0: Phase: deflink: opening -> dial
Aug 17 17:09:52 localhost ppp[1001]: tun0: Phase: deflink: dial -> carrier
Aug 17 17:09:54 localhost ppp[1001]: tun0: Phase: Received NGM_PPPOE_ACNAME (hook "DJE")
Aug 17 17:09:54 localhost ppp[1001]: tun0: Phase: Received NGM_PPPOE_SESSIONID
Aug 17 17:09:54 localhost ppp[1001]: tun0: Phase: Received NGM_PPPOE_SUCCESS
Aug 17 17:09:54 localhost ppp[1001]: tun0: Phase: deflink: carrier -> login
Aug 17 17:09:54 localhost ppp[1001]: tun0: Phase: deflink: login -> lcp
Aug 17 17:09:54 localhost ppp[1001]: tun0: Warning: deflink: Reducing configured MRU from 1500 to 1492
Aug 17 17:09:54 localhost ppp[1001]: tun0: Phase: bundle: Authenticate
Aug 17 17:09:54 localhost ppp[1001]: tun0: Phase: deflink: his = CHAP 0x05, mine = none
Aug 17 17:09:54 localhost ppp[1001]: tun0: Phase: Chap Input: CHALLENGE (16 bytes)
Aug 17 17:09:54 localhost ppp[1001]: tun0: Phase: Chap Output: RESPONSE (XXXXXXXXX)
Aug 17 17:09:54 localhost ppp[1001]: tun0: Phase: Chap Input: SUCCESS (Authentication success,Welcome!)
Aug 17 17:09:54 localhost ppp[1001]: tun0: Phase: deflink: lcp -> open
Aug 17 17:09:54 localhost ppp[1001]: tun0: Phase: bundle: Network
Aug 17 17:09:54 localhost ppp[1001]: tun0: Warning: 0.0.0.0/0: Change route failed: errno: No such process
Aug 17 17:09:54 localhost ppp[1001]: tun0: Warning: ff02:4::/32: Change route failed: errno: Network is unreachable
```
when ping to yahoo.com ,a message appear say : can't resolve host name .


----------



## aragon (Aug 19, 2009)

Edit these lines in:


```
set log Phase tun command LCP IPCP CCP
 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
```

And repost the resulting ppp.log.


----------



## SIFE (Aug 21, 2009)

accroding to this lines i think the problem is in my interface configuration ,my router is 192.168.1.1 .

```
Aug 18 17:03:37 localhost ppp[1190]: tun0: Warning: 0.0.0.0/0: Change route failed: errno: No such process
Aug 18 17:03:37 localhost ppp[1190]: tun0: Warning: ff02:4::/32: Change route failed: errno: Network is unreachable
```
ifconfig -a :

```
sis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8<VLAN_MTU>
	ether 00:15:58:64:67:88
	inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255
	media: Ethernet autoselect (100baseTX <full-duplex>)
	status: active
plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 
	inet6 ::1 prefixlen 128 
	inet 127.0.0.1 netmask 0xff000000
```
resolv.conf :

```
nameserver 192.168.1.1
```
hosts :

```
::1			localhost localhost.my.domain localhost
127.0.0.1		localhost localhost.my.domain localhost
```
my gnome is too slow .


----------



## aragon (Aug 21, 2009)

Please post a more complete ppp.log.  I'd also like to see ifconfig -a after your run ppp.  netstat -rn might be useful too.


----------



## SIFE (Aug 21, 2009)

the complete log file is attached with the above post .


----------



## aragon (Aug 21, 2009)

And what does ifconfig show after connecting?  And netstat -rn?

Have you tried adding the default route manually?


----------



## SIFE (Aug 22, 2009)

when i set connection PPPoE and fail i switch to automatic mode via modem
,the problem is i have to restart my box to get a normal connection .
how can i turn off PPPoE if fail to switch to automatic mode with out rebooting my box .


----------

