Community discussions

 
extrabit
just joined
Topic Author
Posts: 4
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: 23
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)
 
cardoso
just joined
Posts: 2
Joined: Wed Nov 28, 2018 2:18 pm

Re: PPPOE reconnect problem

Thu Nov 29, 2018 2:49 pm

I have tested here your theory about the Ubiquiti ignore the PADT packet, and using a basestation APC 5A-90 (Intelbras) and Nano Station LOCOM5 as CPE, I send it a PADT packet (to do that you just need to disconnect the pppoe session from the mikrotik) and after doing that, the Nano Station disconnected from the ppp session and started all the negotiation (PADA,PADI) again.

Can you give us your cenario (including the products that you are using) for us?

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

Re: PPPOE reconnect problem

Sat Dec 01, 2018 12:41 am

Thanks for reply tdw, cardoso!

Our hardware setup for example (but we have any other model of UBNT AP and CPE devices):
Mikrotik RB750Gr3 (6.43.4) -> UBNT LitaAP AC ( v8.5.8 ) -> UBNT Nano 5ac Loco ( v8.5.8 )

The CPE Loco device is in router mode, on wlan interface is the pppoe client.

Mikrotik pppoe config:
/radius
add address=10.2.0.2 secret=xxxxxxxx service=ppp,login,wireless,dhcp src-address=10.0.42.2 timeout=1s
/ppp profile
add change-tcp-mss=no dns-server=10.10.10.1 local-address=10.0.42.2 name=pppoe only-one=no use-compression=no use-encryption=no
/interface pppoe-server server
add authentication=pap,chap default-profile=pppoe disabled=no interface=bridge1 max-mru=1492 max-mtu=1492 service-name=pppoe

Disconnect pppoe session by simply remove users from /ppp active connections. After that, the pppoe client will reconnect in 40 seconds.

If you have any ideas, we can test it in other UBNT models too.

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

Re: PPPOE reconnect problem

Mon Dec 03, 2018 1:23 pm

Hi,

UBNT settings attached, maybe contains extra info :)
This is the pppoe client on wlan interface.
You do not have the required permissions to view the files attached to this post.
 
cardoso
just joined
Posts: 2
Joined: Wed Nov 28, 2018 2:18 pm

Re: PPPOE reconnect problem

Thu Dec 06, 2018 3:47 am

Thank you so much for post all your setup with us!

About the point that you say that when you click at the active ppp users, you actually send a PADT frame to the device, so if the UBNT is disconnecting after that, they are doing as was suppose to do. But, just for me understand, in your setup, when you disconnect the device, the UBNT NANO is disconnected?

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

Re: PPPOE reconnect problem

Thu Dec 06, 2018 9:21 am

No, unfortunately ubnt not disconnected. Ubnt ignore the PADT packet. Waiting for echo reply, and after the timeout, logs: "No response to 5 echo-requests" and terminate the connection, and after that start a new connection. Echo timeout is around 30-40 seconds.

The older, version 5 RouterOS in this case, send a LCP TermReq packet before PADT, as a result ubnt reminate te session immediately, and start a new one.

The problem is the 40 seconds reconnection time. We have scheduled disconnect on Mikrotik side for ip pool rotation. So, the client lose the connection for 40 secs.

Who is online

Users browsing this forum: No registered users and 40 guests