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

Mike Tesliuk mike at ultra.net.br
Mon Sep 6 13:17:37 EDT 2010


this is my script to set the bandwidth

#!/bin/bash
#PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM

UPB="64kbit"
DOB="64kbit"

/sbin/tc qdisc add dev $PPP_IFACE root handle 1: htb default 30
/sbin/tc class add dev $PPP_IFACE parent 1: classid 1:1 htb rate $UPB
/sbin/tc class add dev $PPP_IFACE parent 1: classid 1:2 htb rate $DOB
/sbin/tc filter add dev $PPP_IFACE protocol ip parent 1:0 prio 1 u32
match ip dst $PPP_REMOTE/32 flowid 1:1
/sbin/tc filter add dev $PPP_IFACE protocol ip parent 1:0 prio 1 u32
match ip src $PPP_REMOTE/32 flowid 1:2


look on this file, i have a UPB e DOB variable, this is static for
now, i want to get the value of the radattr file to get this function
dynamic.


when i do a freeradius -X i get this


rlm_sql (sql): Reserving sql socket id: 2
rlm_sql (sql): Released sql socket id: 2
++[sql] returns ok
++[exec] returns noop
Sending Access-Accept of id 55 to 127.0.0.1 port 44560
        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
Finished request 13.
Going to the next request
Waking up in 4.9 seconds.



on the tcpdump i receive this.

        Access Accept (2), id: 0x4f, Authenticator:
5e73ab60745587970ee22eee96aeb604
          Framed Protocol Attribute (7), length: 6, Value: PPP
            0x0000:  0000 0001
          Framed Compression Attribute (13), length: 6, Value: VJ TCP/IP
            0x0000:  0000 0001
          Vendor Specific Attribute (26), length: 12, Value: Vendor:
Unknown (10055)
            Vendor Attribute: 2, Length: 4, Value: ...@
            0x0000:  0000 2747 0206 0000 0040
          Vendor Specific Attribute (26), length: 12, Value: Vendor:
Unknown (10055)
            Vendor Attribute: 1, Length: 4, Value: ...@
            0x0000:  0000 2747 0106 0000 0040
          Framed IP Address Attribute (8), length: 6, Value: 187.109.35.137
            0x0000:  bb6d 2389
          Framed IP Network Attribute (9), length: 6, Value: 255.255.255.0
            0x0000:  ffff ff00




2010/9/6 Insane Laughing Clown <mike-rppppoe at tiedyenetworks.com>:
> Mike Tesliuk wrote:
>>
>> I read this thread before and i have the script to do the shapping on
>> ppp interface, but the question is that i dont receive the parameter
>> on radattr.ppp0
>>
>
> Mike - I would try to verify that your radius server is in fact returing the
> attributes. Yes you can expect the radattr.so plugin to put everything it
> gets into the file as you noted, but since it's not there, the explanation
> is more than likely that your radius server is simply not returning those
> attributes at all in the first place.
>
> If using freeradius, you can verify this simply by running 'freeradius -X'
> and watching the debug output. Although voluminous, its not too hard to pick
> out what it's doing and what it's sending back. Another way if you have it,
> use a (more recent) tcpdump to capture the output from your radius server;
>
> tcpdump -lni ethXX -s1500 -vvv host <radiusserver> and port 1812
>
> where 'XX' is on the path to your radius. You outta see the access-request
> and the access-accept response here.
>
> By the way.. I am still looking for a decent script to establish
> per-user-session bandwidth controls. TC has always been so confusing to me I
> never get it right.
>
> 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


More information about the RP-PPPoE mailing list