[RP-PPPoE] radattr.so cant receive values from radius

Mike Tesliuk mike at ultra.net.br
Mon Sep 6 16:34:46 EDT 2010


My bandwidth now is this.


(/etc/ppp/ip-up.d/bandwidth)

#!/bin/bash
# Variables comming from pppd
# PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM

# Getting the RP-Upstream-Speed-Limit from radius (integer value)
UPLOAD=$(cat /var/run/radattr.$PPP_IFACE | grep -i
RP-Upstream-Speed-Limit | awk '{print $2}')

# Getting the RP-Downstream-Speed-Limit from radius (integer value)
DOWNLOAD=$(cat /var/run/radattr.$PPP_IFACE | grep -i
RP-Downstream-Speed-Limit | awk '{print $2}')

# Creating the queue to the interface
/sbin/tc qdisc add dev $PPP_IFACE root handle 1: htb default 30

# Defining the speed limit to upload
/sbin/tc class add dev $PPP_IFACE parent 1: classid 1:1 htb rate ${UPLOAD}kbit

# Defining the speed limit to download
/sbin/tc class add dev $PPP_IFACE parent 1: classid 1:2 htb rate ${DOWNLOAD}kbit

# Defining the speed to our destination (ip address coming from radius
or rp-pppoe)
/sbin/tc filter add dev $PPP_IFACE protocol ip parent 1:0 prio 1 u32
match ip dst $PPP_REMOTE/32 flowid 1:1

# Defining the speed to our source (ip address coming from radius or rp-pppoe)
/sbin/tc filter add dev $PPP_IFACE protocol ip parent 1:0 prio 1 u32
match ip src $PPP_REMOTE/32 flowid 1:2



Thanks .


2010/9/6 Mike Tesliuk <mike at ultra.net.br>:
> WOW!!!
>
> You are absolutely correctly , the INCLUDE options need to be without
> the '$'  (i put this because the sintax of radius server file, sorry).
>
> I need to make another change, you say to put the vendor name
> (RoaringPenguin) beside the value on dictionary, this option need to
> be Roaring-Penguin , because this is the name of vendor.
>
>
>
> So, i put the INCLUDE
> /usr/local/etc/radiusclient/dictionary.roaringpenguin on my
> /usr/local/etc/radiusclient (latest version from source)
>
> and my dictionary have this content.
>
> teste-asterisk-1:/etc/radiusclient# cat dictionary.roaringpenguin
> # -*- text -*-
> ##############################################################################
> #
> #       Roaring Penguin attributes
> #
> #       $Id: dictionary.roaringpenguin,v 1.3 2007/02/26 09:57:41 aland Exp $
> #
> ##############################################################################
>
> VENDOR          Roaring-Penguin                 10055
>
> BEGIN-VENDOR    Roaring-Penguin
>
> # Upstream speed limit in kb/s
> ATTRIBUTE       RP-Upstream-Speed-Limit                 1
> integer Roaring-Penguin
>  # Downstream speed limit in kb/s
> ATTRIBUTE       RP-Downstream-Speed-Limit               2
> integer Roaring-Penguin
>
> # Send a HURL
> ATTRIBUTE       RP-HURL                                 3       string
> Roaring-Penguin
>
> # Send a MOTM
> ATTRIBUTE       RP-MOTM                                 4       string
> Roaring-Penguin
>
> # Maximum sessions per user
> ATTRIBUTE       RP-Max-Sessions-Per-User                5
> integer Roaring-Penguin
>
> # BANDA ULTRANET
> ATTRIBUTE       RP-Up-Down-Stream                       6       string
> Roaring-Penguin
>
> END-VENDOR      Roaring-Penguin
>
>
>
>
> now when i connect i receive this values on my radattr.ppp0
>
> cat /var/run/radattr.ppp0
>
>
> Framed-Protocol PPP
> Framed-Compression Van-Jacobson-TCP-IP
> RP-Downstream-Speed-Limit 64
> RP-Upstream-Speed-Limit 64
> Framed-IP-Address 187.109.35.137
> Framed-IP-Netmask 255.255.255.0
>
>
>
>
> Thanks a lot for your help and pacience, i will make my bandwidth
> script more dyamic now and i put the final version here .
>
>
> Thank you!.
>
>
> 2010/9/6 mike <mike at willitsonline.com>:
>> Mike Tesliuk wrote:
>>>
>>> Im using the freeradius and the rp-pppoe server on the same machine.
>>>
>>> I make the change on a my /etc/radiusclient/dictionary to add the
>>> dictionary.roaringpenguin (with the suggested modification and
>>> without)
>>>
>>> $INCLUDE        dictionary.roaringpenguin
>>>
>>> ( the file is on radiusclient directory)
>>>
>>>
>>> -rw-r--r--  1 root root   843 Set  6 12:41 dictionary.roaringpenguin
>>>
>>>
>>>
>>> Without success
>>>
>>>
>>> I upgrade from pppd 2.4.4 to 2.4.5 without success
>>>
>>> i dont have more ideas.
>>>
>>>
>>
>> You need to specify the full path to the dictionary. And, I don't think
>> '$INCLUDE' is right - prepending the $ doesn't cause an error but on my
>> setup it causes the dictionary to not be read. On my working setup, it's
>> simply 'INCLUDE <path>/dictionary.roaringpenguin', so verify you have the
>> (modified) file I supplied.
>>
>> Mike-
>>
>>
>>
>>
>> _______________________________________________
>> RP-PPPoE mailing list
>> RP-PPPoE at lists.roaringpenguin.com
>> http://lists.roaringpenguin.com/cgi-bin/mailman/listinfo/rp-pppoe
>>
>
>
>
> --
> Mike Tesliuk
> Suporte Técnico Ultranet Telecom
> http://www.ultranet.com.br
> suporte at ultra.net.br
> +55 11 3544 4444
> +55 21 2460 4444
>



-- 
Mike Tesliuk
Suporte Técnico Ultranet Telecom
http://www.ultranet.com.br
suporte at ultra.net.br
+55 11 3544 4444
+55 21 2460 4444


More information about the RP-PPPoE mailing list