FreeRadius tricks [Документация VAS Experts]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:dpi:bras_bng:use_cases:example_freradius3:bras_freerad_tricks [2023/10/13 14:18] – removed - external edit (Unknown date) 127.0.0.1en:dpi:bras_bng:use_cases:example_freradius3:bras_freerad_tricks [2024/09/26 15:29] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== FreeRadius tricks ======
 +=== DNS load balancing ===
  
 +<code>
 +# Let's suppose we have two DNS servers: 8.8.8.8 and 8.8.8.9.
 +# Our purpose is to get the DNS load balanced for the DNS servers.
 +# Example: within the "post-auth" section add the following stuff:
 +    
 +    if ( "%{rand:2}" == "0" ) {
 +        update reply {
 +            # delete all the DNS attributes
 +            VasExperts-DHCP-DNS !* ANY
 +            
 +            VasExperts-DHCP-DNS = "8.8.8.9"
 +            VasExperts-DHCP-DNS += "8.8.8.8"
 +        }
 +    }
 +    else {
 +        update reply {
 +            # delete all the DNS attributes
 +            VasExperts-DHCP-DNS !* ANY
 +            
 +            VasExperts-DHCP-DNS = "8.8.8.8"
 +            VasExperts-DHCP-DNS += "8.8.8.9"
 +        }
 +    }
 +</code>