⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 operation.texi

📁 gnu 的radius服务器很好用的
💻 TEXI
📖 第 1 页 / 共 2 页
字号:
@c This is part of the GNU Radius manual.@c Copyright (C) 2003 Free Software Foundation@c See file radius.texi for copying conditions.@comment *******************************************************************@node Operation, Invocation, Naming Conventions, Top@chapter How Radius Operates@cindex @sc{nas}@cindex Network Access ServerThe main purpose of GNU Radius is to centralize authentication ofusers coming from various network stations, pursuant to the @RADIUS{}specification. Its primary usage is for dial-in users, though it canbe used for any kind of network connection.  @menu* Attributes::                  Attributes.* Requests::                    @RADIUS{} requests.* Matching Rule::               Rules for request processing.* Request processing::          How GNU Radius processes incoming requests.@end menu@comment *L2****************************************************************@node Attributes@section Attributes@cindex Attribute@cindex Attribute-value pair@cindex A/V pair@cindex Additivity of an attribute@cindex Propagation of an attribute@cindex Properties of an attributeInformation carried by @RADIUS{} requests is stored as a list of@dfn{attribute-value pairs}. Each pair consists of an @dfn{attributenumber} and an @dfn{attribute value}. The @dfn{attribute number} identifiesthe type of information the pair carries, and the @dfn{attribute value}keeps the actual data.The value part of an attribute can contain data of one of thefollowing types:@table @asis@item IntegerA 32-bit unsigned integer value.@item IP-numberAn IPv4 IP-number.@item StringA character string up to 253 characters long.@end tableFor convenience, the attributes and the values of some frequently usedinteger attributes are given symbolic names. These names are assigned toattributes and values in the dictionary file (@pxref{dictionary file}).Attribute numbers range from 1 to 255. Attributes with numbersgreater than 255 are used internally by the server and cannot be sent tothe @NAS{}.The @dfn{vendor-specific} attribute number 26 is special, allowingvendors of the @NAS{} hardware or software to support their own extendedattributes. @ref{Vendor-Specific, vendor-specific attribute}.Each attribute has a set of properties associated with it. Theproperties are:@table @dfn@item Usage flagsThese flags determine the usage of the attribute in the configurationfiles @file{huntgroups}, @file{hints}, and @file{users}.@item PropagationWhen a @RADIUS{} server functions in proxy mode, it uses the @dfn{propagationflag} to determine which attributes from the reply packet should be passedback to the requesting @NAS{} (@pxref{Proxy Service}).@item additivitySome configuration rules may cause the addition of new @AVP{}s to theincoming request. Before the addition of a new pair, @radiusd{}scans the request to see if it already contains a pair with the sameattribute. If it does, the value of the @dfn{additivity} determines thefollowing additional actions:@table @asis@item NoneThe old pair is retained in the request; the new pair is not added toit.@item ReplaceThe old pair is retained in the request, but its value is replaced withthat of the new pair.@item AppendThe new pair is appended to the end of the pair list.@end table@end tableAttributes are declared in the @file{raddb/dictionary} file. For adetailed description, see @ref{ATTRIBUTE}.For information about particular attributes, see @ref{Attribute List}.@comment *L2****************************************************************@node Requests@section @RADIUS{} Requests@cindex RequestThe term @dfn{request} refers to both the authentication/accountingrequest packet from a @NAS{} to a @RADIUS{} server and the responsepacket that the server sends back to the @NAS{}.Each request contains the following fields:@table @samp@item CodeThe code field identifies the type of the request. @item IdentifierThe number in the range 0--255 used to match the request with the reply.@item LengthThe length of the request packet.@item AuthenticatorThe 16-byte hash value used to authenticate the packet.@item AttributesThe list of attribute-value pairs carrying actual information about therequest. @end table@menu* Authentication Requests::* Accounting Requests::@end menu@comment **L3***************************************************************@node Authentication Requests@subsection Authentication Requests@cindex Authentication requests@cindex Requests, authenticationA @NAS{} sends authentication requests (packets with code field set toAccess-Request) to a @RADIUS{} server when a user is trying to connectto that @NAS{}. Such requests convey information used to determinewhether a user is allowed access to the @NAS{}, and whether anyspecial services are requested for that user.An Access-Request must contain a @attr{User-Name} attribute@ref{User-Name}. This packet should contain a @attr{NAS-IP-Address}attribute, a @attr{NAS-Identifier} attribute, or both.  Italso must contain either a @attr{User-Password} attribute or a@attr{CHAP-Password} attribute. These attributes are passed afterbeing encodedusing a method based on the RSA Message Digest Algorithm MD5.The Access-Request should contain a @attr{NAS-Port} or @attr{NAS-Port-Type}attribute or both, unless the type of access being requested doesnot involve a port or the @NAS{} does not distinguish among itsports.Upon receiving an Access-Request packet for a particular user andauthenticating that user, the @RADIUS{} server replies to the @NAS{} thathas sent the packet with any one of the following packets:@itemize @bullet@item Access-Accept@item Access-Reject@item Access-Challenge@end itemizeGNU Radius replies with an Access-Accept packet when it has successfullyauthenticated the user. Such a reply packet provides theconfiguration information necessary to begin delivery of service tothe user.GNU Radius replies with an Access-Reject packet when it is unable toauthenticate the user. Such a packet may contain a descriptive textencapsulated in one or more @attr{Reply-Message} attributes.  The@NAS{} may display this text along with its response to the user.GNU Radius replies with an Access-Challenge packet when it needs toobtain more information from the user in order to determine the user'sauthenticity or to determine the kind of service to be provided to theuser.An Access-Challenge packet may include one or more@attr{Reply-Message} attributes, and it may or may not include asingle @attr{State} attribute. No other attributes are permitted in anAccess-Challenge packet.Upon receipt of an Access-Challenge, the Identifier field is matchedwith a pending Access-Request. Additionally, the ResponseAuthenticator field must contain the correct response for the pendingAccess-Request.  In the event of an invalid packet, GNU Radiusdiscards the offending packet and issues the appropriate log message.If the @NAS{} does not support challenge/response, it treats anAccess-Challenge as though it had received an Access-Reject instead.Otherwise, upon receipt of a valid Access-Challenge the @NAS{} promptsthe user for a response, possibly displaying the text message providedin the @attr{Reply-Message} attributes of the request. It then sends itsoriginal Access-Request with a new request @sc{id} and requestauthenticator, along with the @attr{User-Password} attribute replacedby the encrypted user's response, and including the @attr{State}attribute from the Access-Challenge, if any.@comment **L3***************************************************************@node Accounting Requests@subsection Accounting Requests@cindex Accounting requests@cindex Requests, accountingAccounting-Request packets are sent from a @NAS{} to a @RADIUS{}server to allow for accounting of a service provided to a user.Upon receipt of an Accounting-Request packet, the server attempts to recordit (@pxref{Accounting}), and if it succeeds in doingso, it replies with an Accounting-Response packet. Otherwise, it sendsno reply, which then causes the @NAS{} to retransmit its requestwithin a preconfigured interval of time. Such retransmits willcontinue until either the server responds with an Accounting-Responsepacket or a preconfigured number of retransmits is reached, whicheveroccurs first.Any attribute valid in an Access-Request or Access-Accept packet isalso valid in an Accounting-Request packet, except the followingattributes, which are never present in any Accounting-Request packet:@itemize @bullet@item @attr{User-Password}@item @attr{CHAP-Password}@item @attr{Reply-Message}@item @attr{State}@end itemizeEither a @attr{NAS-IP-Address} or a @attr{NAS-Identifier} must bepresent in an Accounting-Request packet.  It should contain either a@attr{NAS-Port} or a @attr{NAS-Port-Type} attribute (or both),unless the service does not involve a port or the @NAS{}does not distinguish among its ports.If the Accounting-Request packet includes a @attr{Framed-IP-Address},that attribute @emph{must} contain the actual IP of the user.There are five types of accounting packets, differentiated by thevalue of the @attr{Acct-Status-Type} attribute. These are:@table @dfn@item Session Start PacketThe session start packet is sent after the user has successfullypassed the authentication and has started to receive the requestedservice. It must contain at least following attributes:@itemize @bullet@item @attr{Acct-Status-Type = Start}@item @attr{User-Name}@item @attr{Acct-Session-Id}@item @attr{NAS-IP-Address}@item @attr{NAS-Port-Id}@end itemize@item Session Stop PacketThe session stop packet is sent after the user has disconnected. Itconveys the information about the duration of the session, number ofoctets transferred, etc. It must contain at least the followingattributes:@itemize @bullet@item @attr{Acct-Status-Type = Stop}@item @attr{User-Name}@item @attr{NAS-IP-Address}@item @attr{Acct-Session-Id}@end itemizeThe last three of them are used to find the corresponding sessionstart packet.@item Keepalive PacketThe keepalive packet is sent by the @NAS{} when it obtains some newinformation about the user's session, e.g. it has determined its IPor has changed the connection speed. The packet must contain atleast the following attributes:@itemize @bullet@item @attr{Acct-Status-Type = Alive}@item @attr{User-Name}@item @attr{NAS-IP-Address}@item @attr{Acct-Session-Id}@end itemize@item Accounting-Off PacketBy sending this packet, the @NAS{} requests that @radiusd{} mark allsessions registered from this particular @NAS{} as finished. Receivingthis packet usually means that the @NAS{} is to be shut down, or isabout to change its configuration in a way that requires all currentlyopened sessions to be closed. The packet must contain at least thefollowing attributes:@itemize @bullet@item @attr{Acct-Status-Type = Accounting-Off}@item @attr{NAS-IP-Address}@end itemize@item Accounting-On PacketBy sending this packet, the @NAS{} informs @radiusd{} that it is readyto accept the incoming connections. Usually this packet is sent afterstartup, or after a major reconfiguration of the @NAS{}. It mustcontain at least the following attributes:@itemize @bullet@item @attr{Acct-Status-Type = Accounting-On}@item @attr{NAS-IP-Address}@end itemize@end table@comment *L2****************************************************************@node Matching Rule@section Matching Rule@cindex Matching Rule@cindex Label, Matching Rule@cindex LHS, Matching Rule@cindex RHS, Matching RuleA record in the GNU Radius database describing a particular rule formatching an incoming request is called a @dfn{matching rule}. Eachsuch rule defines an action to be taken when the match occurs.The matching rule consists of three distinct parts:@table @dfn@item LabelThis is used to identify the rule. The special usernames@code{DEFAULT} and @code{BEGIN} are reserved. These will be described

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -