Community discussions

MikroTik App
 
jhbarrantes
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 51
Joined: Wed Aug 21, 2019 2:56 pm

Error trying to read on-up context for PPPoE profile in v7.4.1

Sat Aug 27, 2022 7:36 pm

Hi,

I'm having problems when trying to read PPPoE profile context in v7.4.1. As per documentation, it seems the following items are exposed as context for this script: https://help.mikrotik.com/docs/display/ ... erProfiles
  • user
  • local-address
  • remote-address
  • caller-id
  • called-id
  • interface

I would like to read interface value, but when printing this in logs, this is what I get (which is not the interface name, what I think is the expected)
interface.png

On-up script, inside PPPoE custom profile (copy from default)
/log warning $interface

Could someone test the same in v6 and check if that is printing the correct interface name there? Just to confirm if it is a bug or not. And please tell me if you think I'm doing something wrong, script couldn't be easier. For reference, I was able to read properly "local-address" field, printing the current public IP for this interface.

Thanks!
You do not have the required permissions to view the files attached to this post.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Error trying to read on-up context for PPPoE profile in v7.4.1  [SOLVED]

Sun Aug 28, 2022 4:52 am

Work exactly as expected.
Also on v6 you obtain the id of the interface.
For get the interface name you must request the name...
/log warning [/interface get $interface name]
 
jhbarrantes
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 51
Joined: Wed Aug 21, 2019 2:56 pm

Re: Error trying to read on-up context for PPPoE profile in v7.4.1

Sun Aug 28, 2022 11:28 am

Amazing, thanks rextended!

Who is online

Users browsing this forum: ko00000000001, mbezuidenhout and 18 guests