Re: Freeradius-Users Digest, Vol 85, Issue 14 - Use case Radclient
Hello everybody, I have one problem with an options of raclient tool's: I have create a little script: (I have one file named "file1") and in this file, I have 3 columns (IP, MSISDN,Acct-Session-Id): IP MSISDN Acct-Session-Id 1.1.1.1 3368894XXXX 500A02B2382F3D8E 2.2.2.2 3368739XXXX 500A02B5383F27D9 ###### BEGIN ###### old_IFS=$IFS IFS=$'\n' for i in `cat file1` do echo $i | gawk '{print "Acct-Session-Id="$3"\n""NAS-IP-Address="$1}' | radclient *-p 100* -r 2 -x 3.3.3.3:3799 disconnect ''secret'' done IFS=$old_IFS ###### END ###### But in this script the parameter *-p *is not used!!!! root@ulrich-Pod1:/etc/freeradius# old_IFS=$IFS root@ulrich-Pod1:/etc/freeradius# IFS=$'\n' root@ulrich-Pod1:/etc/freeradius# root@ulrich-Pod1:/etc/freeradius# for i in `cat file1`
do echo $i | gawk '{print "Acct-Session-Id="$3"\n""NAS-IP-Address="$1}' | radclient -p 100 -r 2 -x 3.3.3.3:3799 disconnect ''secret'' done Sending Disconnect-Request of id 127 to 3.3.3.3 port 3799 Acct-Session-Id = "500A02B2382F3D8E" NAS-IP-Address = 1.1.1.1 Sending Disconnect-Request of id 127 to 3.3.3.3 port 3799 Acct-Session-Id = "500A02B2382F3D8E" NAS-IP-Address = 1.1.1.1 Sending Disconnect-Request of id 127 to 3.3.3.3 port 3799 Acct-Session-Id = "500A02B2382F3D8E" NAS-IP-Address = 1.1.1.1 radclient: no response from server for ID 127 socket 3 Sending Disconnect-Request of id 206 to 3.3.3.3 port 3799 Acct-Session-Id = "500A02B5383F27D9" NAS-IP-Address = 2.2.2.2 Sending Disconnect-Request of id 206 to 3.3.3.3 port 3799 Acct-Session-Id = "500A02B5383F27D9" NAS-IP-Address = 2.2.2.2 Sending Disconnect-Request of id 206 to 3.3.3.3 port 3799 Acct-Session-Id = "500A02B5383F27D9" NAS-IP-Address = 2.2.2.2 radclient: no response from server for ID 206 socket 3 root@ulrich-Pod1:/etc/freeradius# root@ulrich-Pod1:/etc/freeradius# IFS=$old_IFS
The problem "radclient: no response from server" it's normal because it's just a test and the "disconnect server" it's not configure!! But the problem is that I specify in the script that we can send up to 100 requests in parallel but I see that the script sends only one request at a time, and if there is no answer two other requests is sent In the man of radclient i have this: -p num_requests_in_parallel Send num_requests_in_parallel, without waiting for a response for each one. By default, radclient sends the first request it has read, waits for the response, and once the response is received, sends the second request in its list. This option allows you to send many requests at simultaneously. Once num_requests_in_parallel are sent, radclient waits for all of the responses to arrive (or for the requests to time out), before sending any more packets. This option permits you to discover the maximum load accepted by a RADIUS server. I thins it's the same problem with option -n! It's a Bug!!!!!!!???? Best Regards Ulrich 2012/5/7 <freeradius-users-request@lists.freeradius.org>
Send Freeradius-Users mailing list submissions to freeradius-users@lists.freeradius.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.freeradius.org/mailman/listinfo/freeradius-users or, via email, send a message with subject or body 'help' to freeradius-users-request@lists.freeradius.org
You can reach the person managing the list at freeradius-users-owner@lists.freeradius.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of Freeradius-Users digest..."
Today's Topics:
1. radclient (ulrich ramassamy) 2. Re: multiple ldap servers::solved:: (jeff donovan) 3. Sync ldap-group with sql profiles (Mohsen Saeedi) 4. NAS Client (Shawky Skaff)
----------------------------------------------------------------------
Message: 1 Date: Sun, 6 May 2012 19:46:06 +0200 From: ulrich ramassamy <ramassamy.ulrich@gmail.com> To: freeradius-users@lists.freeradius.org Subject: radclient Message-ID: <CAKYkJTp9Fi6kZAwSptUBZZXCq3To1B6jSrkTWvw5SRP=ZW_STw@mail.gmail.com
Content-Type: text/plain; charset="iso-8859-1"
Hello,
I am writing you because I need your help on using the tool "radclient". I need to send Packet Of Disconnect (POD). I have one file (for example name "file1") and in this file, I have 3 columns (IP, MSISDN, Acct-Session-Id):
IP MSISDN Acct-Session-Id 1.1.1.1 3368894XXXX 500A02B2382F3D8E 2.2.2.2 3368739XXXX 500A02B5383F27D9
I read on this site: "http://wiki.freeradius.org/Disconnect-Messages" and the proposed solution tells us to insert in a file "packet.txt" the attributes that we wish send. In this method we have to create one file for one POD. :(
Now I want to use the file "file1" by selecting the attibutes to send POD one to one in one command (linux command) like this :
Sending Disconnect-Request of id 214 to 1.1.1.1 port 3799 Framed-IP-Address=1.1.1.1 Acct-Session-ID=500A02B2382F3D8E rad_recv: Disconnect-ACK packet from host 1.1.1.1 port 3799, id= 214, length=20
Sending Disconnect-Request of id 215 to 2.2.2.2 port 3799 Framed-IP-Address=2.2.2.2 Acct-Session-ID=500A02B5383F27D9 rad_recv: Disconnect-ACK packet from host 2.2.2.2 port 3799, id=215, length=20
I need to know if It's possible to do this (I think by using a loop "for"!!!)? Can you please help me?
Thanks for your help.
Best regards,
Ulrich RAMASSAMY T?l: +33671783501
PS: Sorry for my english^^
ulrich ramassamy wrote:
I have one problem with an options of raclient tool's:
Please start a new thread, and use a good subject line. It's awkward to respond to a message labeled "Digest". And edit the message. There's no reason to have hundreds of lines of off-topic content.
But in this script the parameter *-p *is not used!!!!
Possibly. Or, the system is reading data from stdin very slowly. So it doesn't have the opportunity to send packets in parallel.
It's a Bug!!!!!!!????
Possibly. As always, patches are welcome. Alan DeKok.
participants (2)
-
Alan DeKok -
ulrich ramassamy