Re: pppoed problem with reconnections

2009-01-18 Thread Eugene Perevyazko
On Sat, Jan 17, 2009 at 08:08:30PM +, Paul Thornton wrote:
 - The PPPoE connection is then not disconnected cleanly (say network 
 cable pulled out, or machine reboots, etc)
 - Back on the termination box, there is still a ppp process running 
 using that address.
 - When you try and reconnect as the original user, it fails because the 
 address cannot be assigned (already in use).  Things then stay like this 
 for ever until I kill the ppp process that was connected with the pppoed 
 running on that VLAN.

You have to look at keep-alive settings to terminate dead connections.
And why don't you try an mpd (/usr/ports/net/mpd) that is perfectly suited
to manage hundreds and thousands of simultaneous ppp (and PPPoE in particular)
connections? It's fast, flexible and easy to setup both as server and client.

Eugene Perevyazko

___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org


Re: pppoed problem with reconnections

2009-01-18 Thread Luiz Otavio O Souza

Hi folks,

I am currently doing some lab testing with 6.3-release and a pppoe setup 
where each user has their own VLAN.  On the termination box have an em 
interface with about 200 VLANs configured on it, and have a ppp.conf 
looking like this:


default:
 set log Chat Command Phase
 enable pap
 enable chap
 allow mode direct
 set mru 1462
 set mtu 1462
 set timeout 0
 enable lqr
 accept dns
 set dns 192.168.1.1 192.168.1.2
 set radius /etc/ppp/radius.conf
 set ifaddr 192.168.254.254/32


Change the enable lqr to:

enable lqr echo
set echoperiod 5

The ppp will check the remote peer at echoperiod  and after five consecutive 
fails the ppp link will be closed.


Luiz 


___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org


Re: pppoed problem with reconnections

2009-01-18 Thread Paul Thornton

Hi Luiz,

Luiz Otavio O Souza wrote:


Change the enable lqr to:

enable lqr echo
set echoperiod 5

The ppp will check the remote peer at echoperiod  and after five 
consecutive fails the ppp link will be closed.


That does exactly what I want, thank you.

Paul.
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org


Re: pppoed problem with reconnections

2009-01-18 Thread Paul Thornton

Hi,

Eugene Perevyazko wrote:

You have to look at keep-alive settings to terminate dead connections.
And why don't you try an mpd (/usr/ports/net/mpd) that is perfectly suited
to manage hundreds and thousands of simultaneous ppp (and PPPoE in particular)
connections? It's fast, flexible and easy to setup both as server and client.


As Luiz suggested, I've changed the config to:

enable lqr echo
set echoperiod 5

which sorts my problem out just fine.

I did look into using mpd - mainly to compare which works best for our 
situation.  However, I was having trouble making any PPPoE connections 
come up when using mpd; I suspect that this is me not fully 
understanding what I'm doing - and although I've done quite a bit of 
looking, I can't find any good example configurations for a PPPoE server 
using mpd (I'm sure they exist!).  Do you have any pointers for this?


Regards,

Paul.
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org


pppoed problem with reconnections

2009-01-17 Thread Paul Thornton

Hi folks,

I am currently doing some lab testing with 6.3-release and a pppoe setup 
where each user has their own VLAN.  On the termination box have an em 
interface with about 200 VLANs configured on it, and have a ppp.conf 
looking like this:


default:
 set log Chat Command Phase
 enable pap
 enable chap
 allow mode direct
 set mru 1462
 set mtu 1462
 set timeout 0
 enable lqr
 accept dns
 set dns 192.168.1.1 192.168.1.2
 set radius /etc/ppp/radius.conf
 set ifaddr 192.168.254.254/32

cv1001e:
 set device PPPoE:vlan1001:cv1001

cv1002e:
 set device PPPoE:vlan1002:cv1002

cv1003e:
 set device PPPoE:vlan1003:cv1003

cv1004e:
 set device PPPoE:vlan1004:cv1004

(and so on for several pages)


There are multiple pppoed processes running, one for each VLAN (this 
might seem wasteful but there are other reasons for doing it this way).


All user authentication and IP address assignment is handled by the 
radius server, and each user ID has a static IP address.


The problem I'm seeing is as follows:
- PPPoE connection comes in, is authenticated, and a ppp process is 
exec()ed by pppoed.

- This connection has the user's IP address, say 192.168.254.1.
- Everything works as expected.  This is a Good Thing.
- The PPPoE connection is then not disconnected cleanly (say network 
cable pulled out, or machine reboots, etc)
- Back on the termination box, there is still a ppp process running 
using that address.
- When you try and reconnect as the original user, it fails because the 
address cannot be assigned (already in use).  Things then stay like this 
for ever until I kill the ppp process that was connected with the pppoed 
running on that VLAN.


I don't want to set a timeout as I want these sessions to be always on. 
 Is there any way to configure pppoed to kill the old ppp process 
before trying to launch the new one, so the IP address is released?


I guess I'm asking the reverse of the age old how do I deny multiple 
logins question - how do I allow it, but have the new one boot the old 
one off?


Thanks,

Paul.

___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org