More explanation of round-robin and load balancing
[freeradius.git] / raddb / proxy.conf
1 #
2 # proxy.conf - proxy radius and realm configuration directives
3 #
4 # This file is included by default.  To disable it, you will need
5 # to modify the PROXY CONFIGURATION section of "radiusd.conf".
6 #
7 #######################################################################
8 #
9 #  Proxy server configuration
10 #
11 #  This entry controls the servers behaviour towards ALL other servers
12 #  to which it sends proxy requests.
13 #
14 proxy server {
15
16 #
17 #  If the NAS re-sends the request to us, we can immediately re-send
18 #  the proxy request to the end server.  To do so, use 'yes' here.
19 #
20 #  If this is set to 'no', then we send the retries on our own schedule,
21 #  and ignore any duplicate NAS requests.
22 #
23 #  If you want to have the server send proxy retries ONLY when the NAS
24 #  sends it's retries to the server, then set this to 'yes', and
25 #  set the other proxy configuration parameters to 0 (zero).
26 #
27         synchronous = no
28
29 #
30 #  The time (in seconds) to wait for a response from the proxy, before
31 #  re-sending the proxied request.
32 #
33 #  If this time is set too high, then the NAS may re-send the request,
34 #  or it may give up entirely, and reject the user.
35 #
36 #  If it is set too low, then the RADIUS server which receives the proxy
37 #  request will get kicked unnecessarily.
38 #
39         retry_delay = 5
40
41 #
42 #  The number of retries to send before giving up, and sending a reject
43 #  message to the NAS.
44 #
45         retry_count = 3
46
47 #
48 #  If the home server does not respond to any of the multiple retries,
49 #  then FreeRADIUS will stop sending it proxy requests, and mark it 'dead'.
50 #
51 #  If there are multiple entries configured for this realm, then the
52 #  server will fail-over to the next one listed.  If no more are listed,
53 #  then no requests will be proxied to that realm.
54 #
55 #
56 #  After a configurable 'dead_time', in seconds, FreeRADIUS will
57 #  speculatively mark the home server active, and start sending requests
58 #  to it again.
59 #
60 #  If this dead time is set too low, then you will lose requests,
61 #  as FreeRADIUS will quickly switch back to the home server, even if
62 #  it isn't up again.
63 #
64 #  If this dead time is set too high, then FreeRADIUS may take too long
65 #  to switch back to the primary home server.
66 #
67 #  Realistic values for this number are in the range of minutes to hours.
68 #  (60 to 3600)
69 #
70         dead_time = 120
71
72 #  If you choose to list a realm more then once for fall-through or
73 #  round-robin, then specify the total number of alternates
74 #  here. Specify a load balancing 'ldflag' attribute for all realms to
75 #  be included in a round-robin setup. Currently (0 or fail_over) and
76 #  (1 or round_robin) are the supported values for ldflag. Fail-Over
77 #  is the default setup.
78 #
79         servers_per_realm = 15
80
81 #
82 #  If all exact matching realms did not respond, we can try the
83 #  DEFAULT realm, too.  This is what the server normally does.
84 #
85 #  This behaviour may be undesired for some cases.  e.g. You are proxying
86 #  for two different ISP's, and then act as a general dial-up for Gric.
87 #  If one of the first two ISP's has their RADIUS server go down, you do
88 #  NOT want to proxy those requests to GRIC.  Instead, you probably want
89 #  to just drop the requests on the floor.  In that case, set this value
90 #  to 'no'.
91 #
92 #  allowed values: {yes, no}
93 #
94         default_fallback = yes
95 }
96
97 #######################################################################
98 #
99 #  Configuration for the proxy realms.
100 #
101 #  The information given here is used in conjunction with the 'realms'
102 #  file.  This format is preferred, as it is more flexible.  The realms
103 #  listed here take priority over those listed in the 'realms' file.
104 #
105 #realm isp2.com {
106 #       type        = radius
107 #       authhost    = radius.isp2.com:1645
108 #       accthost    = radius.isp2.com:1646
109 #       secret      = TheirKey
110 #       nostrip
111 #}
112
113 #
114 #  a fail-over realm for isp2.com
115 #
116 #realm isp2.com {
117 #       type        = radius
118 #       authhost    = radius2.isp2.com:1645
119 #       accthost    = radius2.isp2.com:1646
120 #       secret      = TheirKey2
121 #       nostrip
122 #}
123
124 #
125 #  1st node serv.com...set up for round-robin.
126 #
127 #  The load balancing 'ldflag' attribute can be used to perform
128 #  load balancing.  Allowed values are 'fail_over' and 'round_robin'.
129 #
130 #  If there is no ldflag attribute, or it is set to 'fail_over', then
131 #  the realms are treated as "fail-over".  That is, the first matching
132 #  realm is used, unless it is down, in which case the realm "fails
133 #  over" to the second matching realm.  The process continues until an
134 #  active matching realm is found, OR the DEFAULT realm is returned.
135 #
136 #  If the ldflag attribute is set to 'round_robin', then all active
137 #  realms of the same name are put into a pool internally in the
138 #  server, and the proxied requests are evenly divided among the
139 #  realms in the pool.  For this to work, all realms of the same name
140 #  MUST have the same value of their 'ldflag' attributes.  Mixing up
141 #  different types of load balancing schemes for the same realm will
142 #  cause problems.
143 #
144 #  The round_robin load balancing method guarantees that once a
145 #  particular realm is sent a request, then it will NOT be sent
146 #  another request until all other realms of the same name have been
147 #  sent a request.
148 #
149 #realm serv.com {
150 #       type        = radius
151 #       authhost    = radius.serv.com:1645
152 #       accthost    = radius.serv.com:1646
153 #       secret      = TheirKey
154 #       ldflag      = round_robin
155 #       nostrip
156 #}
157
158 #
159 #  Another node for serv.com
160 #
161 #realm serv.com {
162 #       type        = radius
163 #       authhost    = radius2.serv.com:1645
164 #       accthost    = radius2.serv.com:1646
165 #       secret      = TheirKey2
166 #       ldflag      = round_robin
167 #       nostrip
168 #}
169
170 #
171 #  A third round-robin node realm for serv.com
172 #
173 #realm serv.com {
174 #       type        = radius
175 #       authhost    = radius3.serv.com:1645
176 #       accthost    = radius3.serv.com:1646
177 #       secret      = TheirKey2
178 #       ldflag      = round_robin
179 #       nostrip
180 #}
181 #
182 #
183
184 #realm company.com {
185 #       type            = radius
186 #       authhost        = radius.company.com:1600
187 #       accthost        = radius.company.com:1601
188 #       secret          = testing123
189 #}
190
191 #
192 #  This is a local realm.  The requests are NOT proxied,
193 #  but instead are authenticated by the RADIUS server itself.
194 #
195 #  You don't need a secret if BOTH 'authhost' and 'accthost' are
196 #  set to LOCAL.
197 #
198 #realm bla.com {
199 #       type            = radius
200 #       authhost        = LOCAL
201 #       accthost        = LOCAL
202 #}
203
204 #
205 #  This realm is for requests which don't have an explicit realm
206 #  prefix or suffix.  User names like "bob" will match this one.
207 #
208 #realm NULL {
209 #       type            = radius
210 #       authhost        = radius.company.com:1600
211 #       accthost        = radius.company.com:1601
212 #       secret          = testing123
213 #}
214
215 #
216 #  This realm is for ALL OTHER requests.
217 #
218 #realm DEFAULT {
219 #       type            = radius
220 #       authhost        = radius.company.com:1600
221 #       accthost        = radius.company.com:1601
222 #       secret          = testing123
223 #}
224
225 #realm myfakerealm {
226 #      type            = radius
227 #      authhost        = radius.company.com:1600
228 #      accthost        = radius.company.com:1601
229 #      secret          = testing123
230 #      notrealm
231 #}