cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2515
Views
0
Helpful
3
Replies

Collecting mac addresses by PPPoE Username

mikerpow1991
Level 1
Level 1

Hi, is there an way to export, or show subscriber or something that will collect the mac-address of a PPPoE session in the ASR9k? Example, if I do a "show subs session filter user test5meg det int", I get lots of data. The key data I want to collect is the username, mac address, possibly the IP address. Is there a way to pull only that data out of the subscriber database? Below is a sample output of that command.

We may want to preauthenticate our mac addresses with customers for the PPPoE to DHCP migration. That is why I am asking.

Thanks, Mike


RP/0/RSP0/CPU0:ASR9001_A#show subs sess fil user test5meg det int
Fri Aug 26 07:26:46.889 EST
Interface:                Bundle-Ether1.612.pppoe559
Circuit ID:               Unknown
Remote ID:                Unknown
Type:                     PPPoE:PTA
IPv4 State:               Up, Tue Jun  7 04:18:01 2016
IPv4 Address:             66.44.246.191, VRF: default
IPv4 Up helpers:          0x00000020 {PPP}
IPv4 Up requestors:       0x00000020 {PPP}
IPv6 State:               Down, Tue Jun  7 04:17:58 2016
Mac Address:              0001.47db.349a
Account-Session Id:       00004094
Nas-Port:                 Unknown
User name:                test5meg
Formatted User name:      unknown
Client User name:         unknown
Outer VLAN ID:            612
Subscriber Label:         0x00010311
Created:                  Tue Jun  7 04:17:58 2016
State:                    Activated
Authentication:           authenticated
Authorization:            unauthorized
Ifhandle:                 0x00103060
Session History ID:       7
Access-interface:         Bundle-Ether1.612
SRG Flags:                0x00000000
Policy Executed:

3 Replies 3

benmac
Level 1
Level 1

I realize this post is from August 2016... but for the same reason you had (converting to DHCP), I'd like to get a list and correlate usernames to MAC. I'm assuming you guys used DHCPatriot? Did you find a solution that worked? I'll likely end up using a bash script, but hate going that route.

I think better to parse radius accounting-start requests. 

wanderi
Level 1
Level 1

Hi
Don't see any answers for this, hope it might help someone who comes across the post by Mike. I use the following command which combines a standard query which gets processed through a regular expression. Where subusername is substituted for a username like test5meg

show subscriber session filter username subusername detail | util egrep "^Mac|^User"
or
show subscriber session filter username subusername detail | util egrep -i "^mac|^user"
or
show subscriber session all detail | util egrep "Interface|^Mac|^User"

Note: The order of the items in the regular expression must match what detail would provide in the subscribers information or you end up mixing the information of different subscribers especially with the last query.

You can swap out the information as you need.