Forum Discussion

computer_41235's avatar
computer_41235
Icon for Nimbostratus rankNimbostratus
Aug 01, 2013

F5 outside flow Bandwidth control

Hi experts,

 

 

I have one question on the link environment deployment.

 

 

1. Environment Description

 

F5 works as the link access device in the edge of the data center. There are totally three links connected to F5 (ISP1 - 1Gbps, ISP2 - 1Gbps, ISP3 - 1Gbps). All the traffic OUTSIDE from data center would go through the F5 box. And F5 would determine the best way to go out based on the destination IP address.

 

 

2. Customer Requirement

 

Sometimes when the link of ISP1 already reached around 100% (1Gbps) there are still not too much traffic in other ISP links.

 

Customer's requirement is: When the traffic in one of the links reaches about 90% (900Mbps), all the new connections towards to this ISP would be routed through the other 2 links.

 

And when the load for the high traffic link down to about 70% (700Mbps), all the new connections would be routed based on the original policy (IP address).

 

 

I am not sure if you guys have some script to resolve this problem.

 

Thanks.

 

4 Replies

  • It's been a while but from what I remember, all this is feasible with Link Controller. Are you running just the LTM module? If so, you will have some flexibility but you will be limited. You really need a Link Controller or GTM license to do what you want. Whatv version and hardware are you on?

     

     

    Browse through the manual called "Link Controller Implementations" and look at the chapter on "Implementing Bandwidth Load Balancing". After that, come back with follow-up questions.
  • I only have F5 BIG-IP LTM VIPRION 2400

     

    The use of the software version is V11.4

     

    Link Controller can only do control for inside traffic, but do not control for OUTSIDE traffic

     

    I now is LTM only OUTSIDE flow control

     

  • I may be misunderstanding the question a bit, but LC/GTM combo can assist with inboud or oubound traffic. Did you check out the manual? I haven't done much LC in a few years now because I just don't get the calls anymore but please review the manual and let me know if I misunderstood. As you know, with any product, you have what is really called Traffic Shaping when it comes to traffic leaving for the internet. (Let me not get sidetracked here.) Having said that, if you have LTM only, I think this it is possible but it will probably take some work. The real problem is going to be, "How to monitor/check the bandwidth?" I don't believe there is a built in tool/command for that. You may have to have your mgmt station or some device poll via snmp the stats for the interface to know when bandwidth is an issue. From there you could use iControl or a script to log on to the box and issue the appropriate tmsh commands.

     

     

     

  • The following equipment is used in test A10 script link switch code, I would like to ask that we do OUTSIDE traffic switching F5 how to write such a script , LC OR GTM only do INBOUND traffic

     

    But I want to achieve OUTSIDE traffic link switching

     

     
    check-gzct2      30       3        30       1            EXTERNAL   1        
    External script checkvlan used by monitor check-gzct2
    !!! Content Begin !!!
    !/bin/sh      
     axAPI()      
    {      
    groupname=$1                 
    linkIP=$2                 
    action=$3                 
    toweight=$4                 
    priority=$5 
    mysession=`curl -s -d "method=authenticate&username=axapi&password=a10axapi" http://127.0.0.1/services/rest/V1/ | awk -F \> '{print $4}' | awk -F \< '{print $1} '` 
    case $action in      
     "1") a=`curl -s -d "session_id=$mysession&method=slb.server.update&address=$linkIP&weight=$toweight" http://127.0.0.1/services/rest/V1/`;;                 
     "2") a=`curl -s -d "session_id=$mysession&method=slb.service-group.update&name=$1&member-list=member1&member1=address%03$linkIP%02port%030%02priority%03$priority" http://127.0.0.1/services/rest/V1/`;;   
    esac      
    c=`curl -s "http://127.0.0.1/services/rest/V1/?method=session.close&session_id=$mysession"`      
    }    
    toasc() { 
    i=1 
    server=$1 
    printf ${server} 
    printf "." 
    while (( i <= ${server} )) 
    do 
       char=$(expr substr "$server" $i 1) 
       printf "%d" \'"$char" 
       (( i += 1 )) 
      if [ $i -le ${server} ]; then 
       printf "." 
      fi 
    done 
    } 
    total=`expr $3 / 10 `
    threshold=`expr $4 / 10 `
    count=1
    if [ -f $2_count ];  then      
    count=`cat $2_count | awk ' { print \$1 } '`
    fi     
                                             
    if test $count -le 1 ; then 
    oid=".1.3.6.1.4.1.22610.2.4.3.2.2.2.1.6."    
    server="$(toasc "$2")"           
    portusage=`snmpget -v 2c -c a10snmp 127.0.0.1 $oid$server | awk ' { print $4} '`     
    t=`date`    
    echo "$t: Jian Test $2: usage is $portusage "  
    oldpu=$portusage
     if [ -f $2_pu ];  then  
     oldpu=`cat $2_pu | awk ' { print \$1 } '`
     fi  
    echo $portusage >$2_pu
    realpu=`expr $portusage - $oldpu `
    used=`expr $realpu \* 8 / 10000000 / 120 `
    weight=`expr $total - $used`
    echo "$t: Jian Test $2: real weight is $weight"
     if test $weight -lt 1 ; then         
     weight=1         
     fi     
     if test $used -ge $threshold; then 
     weight=1
     fi 
    echo "$t: Jian Test $2: weight is $weight"
    axAPI link $2 1 $weight   
    fi    
      
    if test $count -ge 4 ; then 
    count=0
    fi                             
    countupdate=`expr $count + 1 `
    echo $countupdate > $2_count
    Test_IP=("222.68.185.229" "211.95.72.229" "58.248.42.181" "211.94.128.24" "219.141.157.30" "220.181.6.175" "61.135.169.105" "58.242.1.187" "202.102.194.50" "202.103.124.34" )     
    i=0     
    while  [ $i -le 9 ]     
    do     
    route del -host ${Test_IP[$i]} gw $2      
    route add -host ${Test_IP[$i]} gw $2      
    ret=$?     
    if test $ret -gt  0; then     
    exit 1     
    fi     
    curl --max-time 1 --interface $1 ${Test_IP[$i]} > /dev/null 2>&1     
    ret=$?     
    route del -host ${Test_IP[$i]} gw $2     
    t=`date`              
    if test $ret == 0 ; then                   
      echo "$t Testing $2-$i: ${Test_IP[$i]}  OK"              
      echo "$t $2 Passed"    
    exit 0     
    else     
    echo "$t Testing $2-$i: ${Test_IP[$i]}  Fail"    
    fi            
    i=`expr $i + 1`     
    done     
    echo "$t $2 Failed"
    exit 1
    !!! Content End !!!