Check out new solution for ISP:
Splynx Isp Framework solution for ISP with Radius and Mikrotik API support


Vyatta PPPOE config on Ubiquiti

  1. 4 years ago

    admin

    Jul 2013 Administrator
    Edited 4 years ago by admin

    In vyatta add to : /etc/radiusclient-ng/dictionary

    ATTRIBUTE       PPPD-Upstream-Speed-Limit       230     integer
    ATTRIBUTE       PPPD-Downstream-Speed-Limit     231     integer

    In MikroBill server:
    /usr/share/freeradius/dictionary

    ATTRIBUTE       PPPD-Upstream-Speed-Limit       230     integer
    ATTRIBUTE       PPPD-Downstream-Speed-Limit     231     integer

    In vyatta to file /etc/ppp/ip-pre-up.d/0006rename-pppoe-server add

    export NEW_IFNAME
    DOWNSPEED=0
    UPSPEED=0
    AWK="/usr/bin/awk"
    logger $IFNAME
    
    
    if [ -f /var/run/radattr.$IFNAME ]
    then
      DOWNSPEED=`$AWK  '/PPPD-Downstream-Speed-Limit/ {print $2}'  /var/run/radattr.$IFNAME`
      UPSPEED=`$AWK  '/PPPD-Upstream-Speed-Limit/ {print $2}'  /var/run/radattr.$IFNAME`
    
    # Not logical / 1000
    DOWNSPEED=$(($DOWNSPEED/1000))
    UPSPEED=$(($UPSPEED/1000))
    
    # Logical * 1.024
    #DOWNSPEED=$(($DOWNSPEED*1.024))
    #UPSPEED=$(($UPSPEED*1.024))
    
    
    logger $DOWNSPEED
    logger $UPSPEED
    
    fi
    
    TC="/sbin/tc"
    
    IFNAME=$NEW_IFNAME
    logger $IFNAME
    
    $TC qdisc del dev $IFNAME root &>/dev/null
    $TC qdisc del dev $IFNAME ingress &>/dev/null
    
    if [ "$UPSPEED" != "0" ] ;
    then
      $TC qdisc add dev $IFNAME root tbf rate ${UPSPEED}bit burst 1540 limit 20kb
    fi
    
    if [ "$DOWNSPEED" != "0" ] ;
    then
      $TC qdisc add dev $IFNAME handle ffff: ingress
      $TC filter add dev $IFNAME parent ffff: protocol ip prio 1 u32 match u32 0 0 police rate ${DOWNSPEED}bit burst 96k drop flowid 1:
    fi

    In MikroBill radius config set:
    Custom radius attributes: YES

    PPPD-Upstream-Speed-Limit = "{tx_rate_limit}"
    PPPD-Downstream-Speed-Limit = "{rx_rate_limit}"

    -image-
    -image-

  2. 3 years ago
    Edited 3 years ago by webmaster

    UPdate de Edgemax ubiquiti.

    the Router need firmware 1.3.0.beta1 o better.

    Whitout need do any modifications to the freeradius or Edgemax.

    Just do need modifications of the custom attributes on the mikrobill like you see on the image.

    use radius setup Services/PPPoE Server in the edgemax. Router

    thank you to Alex and Ruslan for the great Support for this implementations.

    have a nice time and fast Routing.

    -image-

  3. good job!
    so now we can manage users which are connected to ERL from MikroBill :)
    Any chance for short video showing how it works with example customer ? pls ;)

  4. Hi, when we use Edgerouter, how to configure the user (API) and password (API) in the router settings page in Mikrobill??

    Always i see in the log tab, the same error "Connection error".

  5. Mikrobill_Alex

    Jan 2014 Administrator

    API is used in Mikrotik routers only, EdgeRouter is managed via Radius protocol

  6. Ok, so, how to setup in mikrobill a Edge Router Lite from 0 step by step?, can someone post the screenshoot??? many thanks!!

  7. HI comercial.

    IF need consulting please send a private messenger...

or to reply!