Hello, I would like to submit a patch to checkrad (freeradius-server-2.1.12), adding support for Juniper's E-Series BRAS (ERX, E120, E320). It adds the possibility to query the subscriber's username using SNMP. If the subscriber is found, it returns 1 "Returning 1 (double detected)", else, returns 0 "Returning 0 (login ok)". On clients.conf, the nastype should be set to juniper. --- C:/Users/brgufr1/Downloads/freeradius-server-2.1.12/freeradius-server-2.1.12/src/main/checkrad.pl.in Fri Sep 30 11:12:07 2011 +++ C:/Users/brgufr1/Desktop/checkrad Wed Jun 13 18:49:32 2012 @@ -24,6 +24,7 @@ # digitro_rusers 1.1 Author: accdias@sst.com.br # cyclades_snmp 1.0 Author: accdias@sst.com.br # usrhiper_snmp 1.0 Author: igor@ipass.net +# juniper_e_snmp 1.0 Author: guilhermefranco@gmail.com # multitech_snmp 1.0 Author: ehonzay@willmar.com # netserver_telnet 1.0 Author: mts@interplanet.es # versanet_snmp 1.0 Author: support@versanetcomm.com @@ -466,6 +467,21 @@ } # +# Check the subscriber name on a Juniper JunosE E-Series BRAS ( ERX, E120, E320 ) +# +# Author: Guilherme Franco <guilhermefranco@gmail.com> +# +sub juniper_e_snmp { + + $out=snmpwalk($ARGV[1],$cmmty_string,".1.3.6.1.4.1.4874.2.2.20.1.8.4.1.2"); + if($out=~/\"$ARGV[3]\"/){ + return 1; + }else{ + return 0; + } +} + +# # Check a MultiTech CommPlete Server ( CC9600 & CC2400 ) # # Author: Eric Honzay of Bennett Office Products <ehonzay@willmar.com> @@ -1434,6 +1450,8 @@ $ret = &cisco_snmp; } elsif ($ARGV[0] eq 'cvx') { $ret = &cvx_snmp; +} elsif ($ARGV[0] eq 'juniper') { + $ret = &juniper_e_snmp; } elsif ($ARGV[0] eq 'multitech') { $ret = &multitech_snmp; } elsif ($ARGV[0] eq 'computone') { Regards, Guilherme de Oliveira Franco guilhermefranco@gmail.com
Guilherme Franco wrote:
I would like to submit a patch to checkrad (freeradius-server-2.1.12), adding support for Juniper's E-Series BRAS (ERX, E120, E320).
It adds the possibility to query the subscriber's username using SNMP. If the subscriber is found, it returns 1 "Returning 1 (double detected)", else, returns 0 "Returning 0 (login ok)".
On clients.conf, the nastype should be set to juniper.
Added, thanks. Alan DeKok.
Hi Mr. Alan, I believe that this patch should be added as well, to complement the former: --- C:/Users/brgufr1/Downloads/freeradius-server-2.1.12/freeradius-server-2.1.12/raddb/clients.conf Fri Sep 30 11:12:07 2011 +++ C:/Users/brgufr1/Desktop/clients_new.conf Mon Jun 18 10:10:04 2012 @@ -132,6 +132,7 @@ # Permitted NAS types are: # # cisco + # juniper # computone # livingston # max40xx Thank you. Regards, Guilherme Franco On Sat, Jun 16, 2012 at 4:35 AM, Alan DeKok <aland@deployingradius.com> wrote:
Guilherme Franco wrote:
I would like to submit a patch to checkrad (freeradius-server-2.1.12), adding support for Juniper's E-Series BRAS (ERX, E120, E320).
It adds the possibility to query the subscriber's username using SNMP. If the subscriber is found, it returns 1 "Returning 1 (double detected)", else, returns 0 "Returning 0 (login ok)".
On clients.conf, the nastype should be set to juniper.
Added, thanks.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
participants (2)
-
Alan DeKok -
Guilherme Franco