Интеграция с Cisco asr 1000 (PPPoE)

Skip to end of metadata
Go to start of metadata
Вы просматриваете старую версию данной страницы. Смотрите текущую версию. Сравнить с текущим  |   просмотр истории страницы

Настройка оборудования

policy-map policy_in512kb
class class-default
police cir 528000 bc 96000 be 192000
conform-action transmit
exceed-action drop


policy-map policy_out512kb
class class-default
shape average 528000 5000 5000


policy-map policy_in1024kb
class class-default
police cir 1096000
conform-action transmit
exceed-action drop


policy-map policy_out1024kb
class class-default
shape average 1096000 10000 10000


policy-map policy_out2m
class class-default
shape average 2560000 20000 20000


policy-map policy_in2ml
class class-default
police cir 2096000 bc 393000 be 786000
conform-action transmit
exceed-action drop

policy-map policy_out2ml
class class-default
shape average 2096000 20000 20000

policy-map policy_in2m
class class-default
police cir 2560000
conform-action transmit
exceed-action drop

policy-map policy_in5m
class class-default
police cir 5120000
conform-action transmit
exceed-action drop

policy-map policy_in1024kb
class class-default
police cir 1096000
conform-action transmit
exceed-action drop

policy-map policy_in25m
class class-default
police cir 25600000
conform-action transmit
exceed-action drop

policy-map policy_out1024kb
class class-default
shape average 1096000 10000 10000

policy-map policy_in15m
class class-default
police cir 15360000
conform-action transmit
exceed-action drop

policy-map policy_in50M
class class-default
police cir 50000000
conform-action transmit
exceed-action drop

policy-map policy_out50M
class class-default
shape average 50000000 200000 200000

policy-map policy_out15m
class class-default
shape average 15360000 150000 150000

policy-map policy_in100M
class class-default
police cir 102400000
conform-action transmit
exceed-action drop

policy-map policy_in10m
class class-default
police cir 10240000
conform-action transmit
exceed-action drop

policy-map policy_out10m
class class-default
shape average 10240000 100000 100000

policy-map policy_out5m
class class-default
shape average 5120000 50000 50000

policy-map policy_out512kb
class class-default
shape average 528000 5000 5000

policy-map policy_out100M
class class-default
shape average 102500000 500000 500000

policy-map policy_out25m
class class-default
shape average 25600000 200000 200000

policy-map policy_in512kb
class class-default
police cir 528000 bc 96000 be 192000
conform-action transmit
exceed-action drop

Настройка АСР (event_inc.sh)

#radius пример
selfkiller -30:TERM -50:KILL & disown -a

LOG_LEVEL=ALL

SENDER=$1; shift
EVENT=$1; shift
DATA=$@

for VAR in $DATA; do
      [[ "$VAR" = *"="* ]] && eval ${VAR%%=*}=\'${VAR#*=}\'
done
      
LOG INFO "$SENDER $EVENT $DATA"
case "$EVENT" in
    "balance_negative")
    if [ "$nas_ip" != "0.0.0.0" ]; then
      echo "User-Name=\"$login\",Cisco-Account-Info=\"S$ip\",Cisco-AVPair=\"subscriber:command=account-logoff\"" | radclient -x $nas_ip:1700 coa 322223
    fi
    true
    ;;
    "balance_positive")
    true
    ;;
    "login")
    true
    ;;
    "logout")
    if [ "$nas_ip" != "0.0.0.0" ]; then
      echo "User-Name=\"$login\",Cisco-Account-Info=\"S$ip\",Cisco-AVPair=\"subscriber:command=account-logoff\"" | radclient -x $nas_ip:1700 coa 322223
    fi
    true
    ;;
    "try_double_login")
    if [ "$nas_ip" != "0.0.0.0" ]; then
      echo "User-Name=\"$login\",Cisco-Account-Info=\"S$ip\",Cisco-AVPair=\"subscriber:command=account-logoff\"" | radclient -x $nas_ip:1700 coa 322223
    fi
    true
    ;;
    "user_data_changed_before")
    if [ "$nas_ip" != "0.0.0.0" ]; then
      usleep 200
      echo "User-Name=\"$login\",Cisco-Account-Info=\"S$ip\",Cisco-AVPair=\"subscriber:command=account-logoff\"" | radclient -x $nas_ip:1700 coa 322223
    fi
    true
    ;;
    "period_closed")
    true
    ;;
    "user_data_changed")
    true
    ;;
    "rate_set")
    if [ "$nas_ip" != "0.0.0.0" -a "$ceil_in" != "-1" -a "$ceil_out" != "-1" ]; then
      echo "User-Name=\"$login\",Cisco-Account-Info=\"S$ip\",Cisco-AVPair+=\"ip:sub-qos-policy-in=policy_in${ceil_in}kb\",Cisco-AVPair+=\"ip:sub-qos-policy-out=policy_out${ceil_out}kb\"" | radclient -x $nas_ip:1700 coa 322223
    fi
    true    
    ;;
    *)
    :
    ;;
esac

Настройка тарифов

#TODO

Введите метки, чтобы добавить к этой странице:
Please wait 
Ищите метку? просто начните печатать.