Community discussions

 
extrabit
just joined
Topic Author
Posts: 1
Joined: Thu Nov 08, 2018 3:29 pm

PPPOE reconnect problem

Thu Nov 08, 2018 4:17 pm

Hi,

I'm working for a WISP, and they have a PPPOE problem long ago.
They have pppoe servers on Mikrotik routers authenticating from a radius server. The pppoe clients running on Mikrotik and Ubiquiti devices. The pppoe sessions resets every night by a script (removing all items from ppp active connections).
Mikrotik devices reconnets immediately, but Ubiquiti devices about 40 seconds.

The problem begins from RouterOS version 6, Ubi devices reconnets immediately to RouterOS 5 pppoe servers.

I tested it, debugging pppd on Ubiquiti, that shows pppd does not notice the Mikrotik pppoe disconnetion, ubi is waiting for echo reply, and after the timeout (20-30sec), reconnect.

From the logs, Mikrotik sends a PADT packet:
12:11:16 pppoe,debug,packet bridge1: sent PADT to 78:8A:20:E6:EC:AB

But ubi is waiting for echo reply for a timeout:
Nov 8 12:11:21 pppd[4256]: No response to 5 echo-requests
Nov 8 12:11:31 pppd[4256]: sent [LCP ConfReq id=0x13 <mru 1492> <magic 0xbb281bd0>]

With RouterOS 5 version, Mikrotik sends LCP TermReq BEFORE PADT:
12:59:22 pppoe,ppp,debug,packet <0005>: sent LCP TermReq id=0x2
12:59:22 pppoe,ppp,debug,packet <0005>: rcvd LCP TermAck id=0x2
12:59:22 pppoe,debug,packet bridge1: sent PADT to 78:8A:20:E6:EC:AB

And ubi detects the request, and start a new connect immediatelly:
Nov 8 12:58:51 pppd[4717]: rcvd [LCP TermReq id=0x2 "administrator request\000"]
Nov 8 12:58:51 pppd[4717]: LCP terminated by peer (administrator request^@)
Nov 8 12:58:54 pppd[4717]: sent [LCP ConfReq id=0x13 <mru 1492> <magic 0x22b24716>]

Wireshark shows the same, see atatched txt log.

Can anybody help me to solve this problem?
Why does not sends ROS6 TermReq packet, OR why required it for Ubiquity and not for Mikrotik clients? :)

Thanks!
You do not have the required permissions to view the files attached to this post.
 
tdw
just joined
Posts: 22
Joined: Sat May 05, 2018 11:55 am

Re: PPPOE reconnect problem

Fri Nov 09, 2018 9:02 pm

RFC2516 says "When a PADT is received, no further PPP traffic is allowed to be sent using that session. Even normal PPP termination packets MUST NOT be sent after sending or receiving a PADT. A PPP peer SHOULD use the PPP protocol itself to bring down a PPPoE session, but the PADT MAY be used when PPP can not be used."

So, ROS6.x implementation is incorrect in that it should send an LCP Termination Request as ROS5.x does, however the Ubiquiti implementation is wrong as it doesn't terminate the PPP session when the PADT is received (oddly it doesn't actually transmit the LCP Echo Requests once the PADT has been received, but appears to wait for Echo Replies)

Who is online

Users browsing this forum: Frostbyte, Kindis, TurboCow and 36 guests