Community discussions

MikroTik App
 
wifiryan
just joined
Topic Author
Posts: 21
Joined: Sat Sep 17, 2011 7:31 pm

How to detect PPPOE, Dynamic, Static?

Thu May 12, 2022 10:52 pm

I need a device (Mikrotik) between the ISP and the customers router that can transparently auto detect the ISP connection type then perform an action based on the result.

If it detects PPPOE then do something
If it detects Dynamic then do something
If it detects Static then do something

This needs to be Layer 2 detection, it needs it to be transparent, it will be between the ISP equipment and the customer router.

ISP Connection --------> Transparent Mikrotik Layer 2 Bridge that can detect connection type ----------> Customer router that will handle the WAN (PPPOE, Dynamic, or Static)

I would also like this device, connected to the customers LAN for easy management/Internet access. Attached is a diagram of how it should all be connected.

Any ideas how I can achieve this?
You do not have the required permissions to view the files attached to this post.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: How to detect PPPOE, Dynamic, Static?

Fri May 13, 2022 12:39 am

You can detect PPPoE Session if that rule generate logs:
/interface bridge filter
add action=log chain=input log=yes log-prefix="MAC PPPoE Session" mac-protocol=pppoe

You can detect Dynamic (you mean DHCP??? is layer 3, not 2) if that rule generate logs:
/ip firewall raw
add action=log chain=prerouting dst-address=255.255.255.255 dst-port=67 log=yes log-prefix="DHCP Request" \
    protocol=udp src-address=0.0.0.0 src-port=68

But about Static (you mean fixed IP??? is layer 3, not 2), is more complex, just see if DHCP Client on LAN can ping...
 
User avatar
chechito
Forum Guru
Forum Guru
Posts: 2990
Joined: Sun Aug 24, 2014 3:14 am
Location: Bogota Colombia
Contact:

Re: How to detect PPPOE, Dynamic, Static?

Fri May 13, 2022 4:19 am

/interface pppoe-client scan
you can scan por available PPPoE servers on interface

/ip dhcp-server alert
you can detect dhcp activity on interface
 
User avatar
nichky
Forum Guru
Forum Guru
Posts: 1275
Joined: Tue Jun 23, 2015 2:35 pm

Re: How to detect PPPOE, Dynamic, Static?

Fri May 13, 2022 8:25 am

or better use PPPoE scan, not sure why but the rule from @rextended does not
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: How to detect PPPOE, Dynamic, Static?

Fri May 13, 2022 10:40 am

or better use PPPoE scan
why you do not read correctly the post?
PPPoE scan do not work on script but only manually, the OP want the router that do it automatically.

, not sure why but the rule from @rextended does not
Probably because you didn't create the bridge first, and it also depends on everything else in the configuration.
 
User avatar
nichky
Forum Guru
Forum Guru
Posts: 1275
Joined: Tue Jun 23, 2015 2:35 pm

Re: How to detect PPPOE, Dynamic, Static?

Sat May 14, 2022 11:47 pm

You can detect PPPoE Session if that rule generate logs:
/interface bridge filter
add action=log chain=input log=yes log-prefix="MAC PPPoE Session" mac-protocol=pppoe

however, i got pppoe,and this rule doesn't work
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: How to detect PPPOE, Dynamic, Static?

Sun May 15, 2022 8:17 am

How did you configure the device?
It is not enough to copy and paste the rule,
the bridge must be created and the interface on which the pppoe-server is located
and a pppoe-client authenticates itself on the bridge.
 
User avatar
nichky
Forum Guru
Forum Guru
Posts: 1275
Joined: Tue Jun 23, 2015 2:35 pm

Re: How to detect PPPOE, Dynamic, Static?

Sun May 15, 2022 10:06 am

sorry @rextended, my misunderstood.
Thanks a lot

Who is online

Users browsing this forum: BatsirayiM, Bing [Bot], stefanau and 88 guests