Hello,
I often see some users looking for commands to obtain certain information about authenticated users (PPPoE / IPoE) on a router.
Other times, looking for a command to find which client is missing a certain Radius parameter (example).
These
are very specific situations, so you will hardly find a "ready"
command, but that doesn't mean you can't get the information you want.
And that is what we will see in this article.
The Include and Regex Parameters
The data displays in VRP have filters through "|", just add the pipe character (vertical bar) in the command output:

Our
options are: begin, count, exclude, ignore-case, include, no-more,
refresh and section, as described in the picture (The options may change
depending on the version of the VRP and the equipment).
Note that the "exclude" and "include" commands accept regular expressions, they will be the key to our search.
A
regular expression (regex) is a sequence of characters that defines a
search pattern. If you are not familiar with regular expressions, I
suggest a brief search on them.
Putting it into practice
In the examples below, we will use the filter of users connected by domain.
The command "display access-user domain DOMAIN_NAME verbose nop"
shows all the data of all users in the isp domain, the nop parameter
causes all the output to be displayed, without asking for confirmation
to continue with each user.
Through its output, we will begin to filter the data.
Let's say we need to have the username of all users, let's use the following command: display access-user domain DOMAIN_NAME verbose nop | include (User \ name)

But in addition to the username, we also need the start time: display access-user domain DOMAIN_NAME verbose nop | include (User \ name|Access\ start)

The pipe (|) inside the regex means OR. Can you already see the range of options we found?
An interesting piece of information is knowing when a user has not received bandwidth control via radius.
When a user receives the bandwidth control parameters, the verbose output looks like this:
ACL & QoS:
Inbound qos configuration : User-CAR
Inbound cir : 6144(kbps)(Radius)
Inbound pir : 0(kbps)
Inbound cbs : 1148928(bytes)
Inbound pbs : 0(bytes)
Outbound qos configuration : User-queue
Outbound cir : 52224(kbps)(Radius)
Outbound pir : 52224(kbps)
UpPriority : Unchangeable
DownPriority : Unchangeable
When parameters are not sent, we have the following:
ACL&QoS:
Link bandwidth auto adapt : Disable
UpPriority : Unchangeable
DownPriority : Unchangeable
So, to find authenticated clients without bandwidth control, we can use the following regular expression: display access-user domain DOMAIN_NAME verbose nop | include (Link\ bandwidth\ auto\ adapt(.)*Disable|User\ name)

These were some practical examples, but you can work with all the data from command outputs, always using regular expressions.
Remembering, you can list users through different ways and with other filters:
Per interface: display access-user interface (interface / subinterface name)
Authentication method: display access-user authen-method (hwtacacs | local | none | radius)
By Qos Profile: display access-user qos-profile (profile name)
By Ip Pool: display access-user ip-pool (pool name)
Etc...
I hope this article helps everyone who needs to seek specific information about customers.
See you next time


