annotate doc/rt_default.conf.sample @ 1197:823829bf1037

Couple of typos in the comments
author Sebastien Decugis <sdecugis@freediameter.net>
date Tue, 11 Jun 2013 17:53:35 +0800
parents 42b7d6614678
children cec0812038bb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
167
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1 # This file contains the configuration for the rt_default extension of freeDiameter.
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2 #
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3 # This extension provides configurable routing properties for freeDiameter.
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
4
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
5 # Lines starting with a # are comments and ignored.
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
6
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
7 ##############################################################################
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
8 # The freeDiameter daemon will not allow forwarding a message to a peer that:
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
9 # - already forwarded the message (appear as Route-Record inside the message)
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
10 # - connection is not in STATE_OPEN state.
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
11 # We call here "eligible peer" a peer that is not screened out by one of these criteria.
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
12 #
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
13 # Even if a peer is specified as route for a message here, the daemon may
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
14 # choose to send a message to another peer, or return a UNABLE_TO_DELIVER error, if that peer is not eligible
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
15 # at the time where the message is to be forwarded.
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
16 #
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
17 # Note also that defining a peer here will not result in the daemon trying to establish
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
18 # a connection to this peer. For this purpose, the peer must be defined in the main
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
19 # configuration (ConnectPeer), or connection established through other means (e.g. dynamic peer
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
20 # discovery extension).
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
21 #
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
22 # The default forwarding behavior of freeDiameter is:
1197
823829bf1037 Couple of typos in the comments
Sebastien Decugis <sdecugis@freediameter.net>
parents: 724
diff changeset
23 # - if the message contains a Destination-Host AVP, and the designated peer is an eligible candidate, send to this peer.
167
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
24 # - if a peer does not support the message application or Relay application, give it a penalty for this message
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
25 # (it means that unless overwritten by an extension, the message will not be sent to that peer)
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
26 # - if one of the eligible peer advertised a realm matching the message's Destination-Realm, send to this peer.
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
27 #
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
28 # The mechanism is as follow:
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
29 # - the daemon builds a list of eligible peers, then attributes a score to these peers (see enum fd_rt_out_score in freeDiameter.h)
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
30 # - any number of extensions can register a callback and modify the score
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
31 # - after all callbacks have been called, the message is sent to the peer with the higher score. If an error is received, it is retried to the next peer in the list, and so on,
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
32 # until the list is empty. In such situation, an error UNABLE_TO_DELIVER is generated.
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
33 #
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
34 # This extension allows to modify the score of some peers based on some criteria of the message.
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
35 #
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
36 # Finally, please note that the freeDiameter daemon does not support REDIRECT indications natively.
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
37 # You have to load the rt_redir extension to add this support.
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
38 ##############################################################################
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
39
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
40 # This file contains a list of RULE elements.
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
41 # Each RULE is made of three components:
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
42 # - a CRITERIA, which specifies which messages the RULE apply to.
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
43 # - a TARGET string, that specifies which peer(s) in the eligible list the rule is applied to
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
44 # - and a SCORE, that is added to the matching peer's current score.
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
45 #
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
46 # In the following definitions, "STR/REG" stands for:
168
6db078b955e3 Completed rt_default extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 167
diff changeset
47 # - a quoted string "some.peer" that will match exactly this string (case-insensitive), or
6db078b955e3 Completed rt_default extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 167
diff changeset
48 # - a bracket-quoted string ["some regex"] that will be interpreted as a POSIX extended regular expression (case-sensitive), and attempt to match the string.
167
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
49 #
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
50 # The RULE is specified as:
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
51 # CRITERIA : TARGET += SCORE ;
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
52 #
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
53 # The CRITERIA can be:
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
54 # * -> matches any message.
168
6db078b955e3 Completed rt_default extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 167
diff changeset
55 # oh="STR/REG" -> selects the message if the string or regular expression matches the message's Origin-Host AVP content
167
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
56 # or="STR/REG" -> idem with Origin-Realm
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
57 # dh="STR/REG" -> idem with Destination-Host
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
58 # dr="STR/REG" -> idem with Destination-Realm
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
59 # un="STR/REG" -> idem with User-Name
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
60 # si="STR/REG" -> idem with Session-Id
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
61 #
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
62 # The TARGET is also of a similar form:
168
6db078b955e3 Completed rt_default extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 167
diff changeset
63 # "STR/REG" -> Will apply the score to this peer if its Diameter-Id is matched by the string or regular expression.
6db078b955e3 Completed rt_default extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 167
diff changeset
64 # rlm="STR/REG" -> Idem with the peer's advertized Diameter-Realm.
167
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
65 #
724
42b7d6614678 Cosmetics
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 168
diff changeset
66 # The SCORE is either numeric (positive or negative), or one of the following constants (see values in libfdcore.h):
167
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
67 # NO_DELIVERY
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
68 # DEFAULT
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
69 # DEFAULT_REALM
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
70 # REALM
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
71 # REDIR_HOST
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
72 # REDIR_APP
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
73 # REDIR_REALM
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
74 # REDIR_REALM_APP
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
75 # REDIR_USER
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
76 # REDIR_SESSION
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
77 # FINALDEST
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
78 #
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
79 #
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
80 # Here are some examples:
168
6db078b955e3 Completed rt_default extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 167
diff changeset
81 # 1) Rule to add a default next-hop peer to all messages:
6db078b955e3 Completed rt_default extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 167
diff changeset
82 # * : "proxy.testbed.aaa" += DEFAULT ;
167
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
83 #
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
84 # 2) Rule to route messages for a given realm (realmA) through another realm (realmB):
168
6db078b955e3 Completed rt_default extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 167
diff changeset
85 # dr="realmA" : rlm="realmB" += DEFAULT_REALM ;
167
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
86 #
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
87 # 3) Avoid sending messages with decorated NAI to the proxy A:
168
6db078b955e3 Completed rt_default extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 167
diff changeset
88 # un=[".+!.+@.+"] : "proxy.A" += NO_DELIVERY ;
167
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
89
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
90
967e579beb64 Backup work in progress on rt_default
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
91
"Welcome to our mercurial repository"