# PPPoE on FreeBSD 7.1



## valoel (Nov 10, 2009)

im trying to make loadbalancing between two adsl with freebsd 7.1 release, i have recompile the kernel and add some option like below.

```
options NETGRAPH
options NETGRAPH_ETHER
options NETGRAPH_PPPOE
options NETGRAPH_SOCKET
```
sysctl enable

```
net.inet.ip.forwarding=1
net.graph.nonstandart_pppoe=1
```
modem with dlink 520B Bridge mode vci 0 vpi 35
im trying to dial the first pppoe

```
ppp.conf 
default:
set log Phase Chat LCP IPCP CCP tun command
set redial 15 0
set reconnect 15 10000
pppoe0:
set device PPPoE:bfe0
disable acfcomp protocomp
deny acfcomp
set mtu max 1492
set mru max 1492
set crtscts off
set speed sync
enable lqr
set lqrperiod 5
set cd 5
set dial
set login
set timeout 0
set authname [email]xxxxxxxxxxxx@telkom.net[/email]
set authkey xxxxxxxxxxxxxxx
add! default HISADDR
enable dns
enable mssfixup
```

but the PPP Log is like this... 

```
Dec 30 08:45:37 ppp[1170]: tun0: Chat: deflink: Redial timer expired.
Dec 30 08:45:37 ppp[1170]: tun0: Phase: deflink: Connected!
Dec 30 08:45:37 ppp[1170]: tun0: Phase: deflink: opening -> dial
Dec 30 08:45:37 ppp[1170]: tun0: Phase: deflink: dial -> carrier
Dec 30 08:45:42 ppp[1170]: tun0: Phase: deflink: Disconnected!
Dec 30 08:45:42 ppp[1170]: tun0: Phase: deflink: carrier -> hangup
Dec 30 08:45:42 ppp[1170]: tun0: Phase: deflink: Connect time: 5 secs: 0 octets in, 0 octets out
Dec 30 08:45:42 ppp[1170]: tun0: Phase: deflink: 0 packets in, 0 packets out
Dec 30 08:45:42 ppp[1170]: tun0: Phase: total 0 bytes/sec, peak 0 bytes/sec on Tue Dec 30 08:45:37 2008
Dec 30 08:45:42 ppp[1170]: tun0: Phase: deflink: hangup -> opening
Dec 30 08:45:42 ppp[1170]: tun0: Phase: deflink: Enter pause (15) for redialing.
Dec 30 08:45:57 ppp[1170]: tun0: Chat: deflink: Redial timer expired.
Dec 30 08:45:57 ppp[1170]: tun0: Phase: deflink: Connected!
Dec 30 08:45:57 ppp[1170]: tun0: Phase: deflink: opening -> dial
Dec 30 08:45:57 ppp[1170]: tun0: Phase: deflink: dial -> carrier
Dec 30 08:46:02 ppp[1170]: tun0: Phase: deflink: Disconnected!
Dec 30 08:46:02 ppp[1170]: tun0: Phase: deflink: carrier -> hangup
Dec 30 08:46:02 ppp[1170]: tun0: Phase: deflink: Connect time: 5 secs: 0 octets in, 0 octets out
Dec 30 08:46:02 ppp[1170]: tun0: Phase: deflink: 0 packets in, 0 packets out
Dec 30 08:46:02 ppp[1170]: tun0: Phase: total 0 bytes/sec, peak 0 bytes/sec on Tue Dec 30 08:45:57 2008
Dec 30 08:46:02 ppp[1170]: tun0: Phase: deflink: hangup -> opening
Dec 30 08:46:02 ppp[1170]: tun0: Phase: deflink: Enter pause (15) for redialing.
```
what is the diference if we set device "!/usr/sbin/pppoe -i bfe0" with PPPoE:bfe0
is i set the configuration "!/usr/sbin/pppoe -i bfe0" the result is "Cannot exec "/usr/sbin/pppoe -i bfe0": No such file or directory"

what should i do ??
thanks :f newbie


----------



## SirDice (Nov 10, 2009)

valoel said:
			
		

> what is the diference if we set device "!/usr/sbin/pppoe -i bfe0" with PPPoE:bfe0
> is i set the configuration "!/usr/sbin/pppoe -i bfe0" the result is "Cannot exec "/usr/sbin/pppoe -i bfe0": No such file or directory"


That's because the command is /usr/sbin/ppp not /usr/sbin/pppoe

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/pppoe.html

I would suggest just making 2 connections. One on tun0, the other on tun1. Then do the load balancing with PF or similar.


----------



## valoel (Nov 10, 2009)

yes, i have try it sometime before to change set device "!/usr/sbin/pppoe -i bfe0" to !/usr/sbin/ppp -i bfe0"
, but still doesn't resolve the problem, still "No such file or directory" and the ppp logging is like above, still doesnt connect to the ppp server.
what else should i do ??


----------



## SirDice (Nov 10, 2009)

As I said, just make 1 connection with tun0. And make another with tun1.

Follow the example in the handbook.


----------



## DutchDaemon (Nov 10, 2009)

fwiw, this looks like a very nonstandard way of writing nonstandard, but I don't know.


```
net.graph.nonstandart_pppoe=1
```


----------



## Ruler2112 (Nov 10, 2009)

You might want to check out the mpd port.  It allows you to shotgun multiple links to the internet together into one virtual interface.  It also handles the PPPoE connection/authentication stuff as well.  Plus, no kernel compiling is needed.


----------



## valoel (Nov 13, 2009)

still doesnt resolv the problem 
here is the ppp log

```
Jan  1 04:36:18  ppp[2015]: tun0: LCP: deflink: LayerFinish
Jan  1 04:36:18  ppp[2015]: tun0: LCP: deflink: State change Starting --> Initial
Jan  1 04:36:18  ppp[2015]: tun0: Phase: deflink: Disconnected!
Jan  1 04:36:18  ppp[2015]: tun0: Phase: deflink: lcp -> logout
Jan  1 04:36:18  ppp[2015]: tun0: Phase: deflink: Disconnected!
Jan  1 04:36:18  ppp[2015]: tun0: Phase: deflink: logout -> hangup
Jan  1 04:36:18  ppp[2015]: tun0: Phase: deflink: Connect time: 1 secs: 247 octets in, 26 octets out
Jan  1 04:36:18  ppp[2015]: tun0: Phase: deflink: 10 packets in, 4 packets out
Jan  1 04:36:18  ppp[2015]: tun0: Phase:  total 273 bytes/sec, peak 123 bytes/sec on Thu Jan  1 04:36:18 2009
Jan  1 04:36:18  ppp[2015]: tun0: Phase: deflink: HUPing 2029
Jan  1 04:36:18  ppp[2015]: tun0: Phase: deflink: hangup -> opening
Jan  1 04:36:18  ppp[2015]: tun0: Phase: deflink: Enter pause (15) for redialing.
Jan  1 04:36:18  ppp[2015]: tun0: Chat: deflink: Reconnect try 5 of 10000
Jan  1 04:36:36  ppp[2015]: tun0: Chat: deflink: Redial timer expired.
Jan  1 04:36:36  ppp[2015]: tun0: Warning: Carrier settings ignored
Jan  1 04:36:36  ppp[2015]: tun0: Phase: deflink: Connected!
Jan  1 04:36:36  ppp[2015]: tun0: Phase: deflink: opening -> dial
Jan  1 04:36:36  ppp[2015]: tun0: Phase: deflink: dial -> carrier
Jan  1 04:36:36  ppp[2015]: tun0: Phase: deflink: carrier -> login
Jan  1 04:36:36  ppp[2015]: tun0: Phase: deflink: login -> lcp
Jan  1 04:36:36  ppp[2015]: tun0: LCP: FSM: Using "deflink" as a transport
Jan  1 04:36:36  ppp[2015]: tun0: LCP: deflink: State change Initial --> Closed
Jan  1 04:36:36  ppp[2015]: tun0: LCP: deflink: State change Closed --> Stopped
Jan  1 04:36:37  ppp[2015]: tun0: LCP: deflink: LayerStart
Jan  1 04:36:37  ppp[2015]: tun0: Warning: deflink: Reducing configured MRU from 1500 to 1492
Jan  1 04:36:37  ppp[2015]: tun0: LCP: deflink: SendConfigReq(1) state = Stopped
Jan  1 04:36:37  ppp[2015]: tun0: LCP:  MRU[4] 1492
Jan  1 04:36:37  ppp[2015]: tun0: LCP:  MAGICNUM[6] 0xbfbb0c50
Jan  1 04:36:37  ppp[2015]: tun0: LCP:  QUALPROTO[8] proto c025, interval 5000ms
Jan  1 04:36:37  ppp[2015]: tun0: LCP: deflink: State change Stopped --> Req-Sent
Jan  1 04:36:37  ppp[2015]: tun0: Phase: deflink: read (0): Connection reset by peer
Jan  1 04:36:37  ppp[2015]: tun0: LCP: deflink: State change Req-Sent --> Starting
Jan  1 04:36:37  ppp[2015]: tun0: LCP: deflink: LayerFinish
Jan  1 04:36:37  ppp[2015]: tun0: LCP: deflink: State change Starting --> Initial
Jan  1 04:36:37  ppp[2015]: tun0: Phase: deflink: Disconnected!
Jan  1 04:36:37  ppp[2015]: tun0: Phase: deflink: lcp -> logout
Jan  1 04:36:37  ppp[2015]: tun0: Phase: deflink: Disconnected!
Jan  1 04:36:37  ppp[2015]: tun0: Phase: deflink: logout -> hangup
Jan  1 04:36:37  ppp[2015]: tun0: Phase: deflink: Connect time: 1 secs: 247 octets in, 26 octets out
Jan  1 04:36:37  ppp[2015]: tun0: Phase: deflink: 12 packets in, 5 packets out
Jan  1 04:36:37  ppp[2015]: tun0: Phase:  total 273 bytes/sec, peak 123 bytes/sec on Thu Jan  1 04:36:37 2009
Jan  1 04:36:37  ppp[2015]: tun0: Phase: deflink: HUPing 2031
Jan  1 04:36:37  ppp[2015]: tun0: Phase: deflink: hangup -> opening
Jan  1 04:36:37  ppp[2015]: tun0: Phase: deflink: Enter pause (15) for redialing.
Jan  1 04:36:37  ppp[2015]: tun0: Chat: deflink: Reconnect try 6 of 10000
```


----------



## valoel (Nov 13, 2009)

yes, i get the problem now, i have to set vci and vpi at the modem 8 and 81, before i change it, i just set the modem to mode bridge and vci cpi is 0 and 35, but now i set to 8 and 81, thanks for the help guys =)

```
Jan  1 05:17:40  ppp[2400]: tun0: LCP: deflink: RecvEchoRequest(0) state = Opened
Jan  1 05:17:40  ppp[2400]: tun0: LCP: deflink: SendEchoReply(0) state = Opened
Jan  1 05:18:40  ppp[2400]: tun0: LCP: deflink: RecvEchoRequest(1) state = Opened
Jan  1 05:18:40  ppp[2400]: tun0: LCP: deflink: SendEchoReply(1) state = Opened
Jan  1 05:19:40  ppp[2400]: tun0: LCP: deflink: RecvEchoRequest(2) state = Opened
Jan  1 05:19:40  ppp[2400]: tun0: LCP: deflink: SendEchoReply(2) state = Opened
```


----------



## DutchDaemon (Nov 13, 2009)

You might want to take a look at your date/time settings .. oh, and use 

```
tags[/url] in your posts.
```


----------

