Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:dpi:bras_bng:radius_integration:radius_auth_server_integration:radius_auth_coa:start [2023/12/18 10:59] – [Accounting session request for given IP address] elena.krasnobryzh | en:dpi:bras_bng:radius_integration:radius_auth_server_integration:radius_auth_coa:start [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Radius CoA ====== | ||
- | {{indexmenu_n> | ||
- | [[https:// | ||
- | |||
- | CoA-Request нотификация говорит о том, что пользователь авторизован и, опционально, | ||
- | некоторые параметры. Таким образом, | ||
- | |||
- | A CoA-Request notification tells you that the user is authorized and, optionally, has some parameters changed. Thus, CoA-Request can appear in the following cases: | ||
- | * the user went from "not authorized" | ||
- | * the authorized user's parameters have changed (enabling/ | ||
- | <note important> | ||
- | </ | ||
- | Types of СоА: | ||
- | - Simplified CoA-Request - on receipt of the CoA fastDPI consideres the user's attributes have changed and re-authorization is required. Upon receiving such a notification, | ||
- | - Full CoA-Request - the '' | ||
- | - Disconnect-Request - resets the authorization status of the user. | ||
- | |||
- | ====== Notification types ====== | ||
- | <note important> | ||
- | [[en: | ||
- | |||
- | ===== Simplified notification (request for reauthorization) ===== | ||
- | '' | ||
- | * '' | ||
- | * '' | ||
- | * one of the following attributes: '' | ||
- | * VasExperts-L2-SubsId - L2-subscriber ID. | ||
- | |||
- | The preferred user identifier in CoA is its login. When processing CoA the fastDPI searches for the subscriber by login ('' | ||
- | If the CoA contains both the login and the IP address, and the subscriber is found by its login, then the IP address is ignored: the fastDPI does not analyze whether the login and IP address are bound in the UDR database. | ||
- | |||
- | [SSG 7.5+] Starting from the VAS Experts DPI 7.5, it is possible to specify Acct-Session-Id as the subscriber ID. | ||
- | The Stingray SG searches for the subscriber IP address by '' | ||
- | '' | ||
- | |||
- | [SSG 8.3+] Instead of the '' | ||
- | < | ||
- | radius_attr_cui=1 | ||
- | </ | ||
- | <note warning> | ||
- | |||
- | ==== Response to the simplified notification ==== | ||
- | According to RFC5176, CoA-Request with Service-Type=8 (Authenticate-Only) should be responded with a CoA-NAK response containing the '' | ||
- | The fastPCRF has a '' | ||
- | * 0 (the default value) - standard behavior: to respond by CoA-NAK with Error-Cause=507 | ||
- | * 1 - non-standard behavior: to respond by CoA-ACK | ||
- | |||
- | This option can be set in the fastpcrf.conf both globally for all radius-servers and specifically for each radius-server: | ||
- | < | ||
- | # global settings | ||
- | coa_reauth_ack=0 | ||
- | |||
- | # for this server the coa_reauth_ack = 0 global option is applied | ||
- | radius_server=mysecret1@192.168.10.10%eth0 | ||
- | |||
- | # and for this one coa_reauth_ack = 1 option is explicitly specified | ||
- | radius_server=mysecret2@192.168.20.10%eth0; | ||
- | |||
- | </ | ||
- | |||
- | ===== CoA-Request full notification ===== | ||
- | Although this feature is supported by fastPCRF, it is not recommended to use because of potential implementation complexity: it should contain only changes in subscriber attributes (service list, etc.). | ||
- | \\ | ||
- | For an authorized user, CoA-Request notification contains __only changes__ to user parameters; the following attributes are supported: | ||
- | * Name (login) of the user – one of the attributes '' | ||
- | * one of the attributes '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | |||
- | ====== Disconnect-Request ====== | ||
- | |||
- | The '' | ||
- | * one of the following attributes: '' | ||
- | * Username (login) – one of following attributes: '' | ||
- | * '' | ||
- | * VasExperts-L2-SubsId - L2-subscriber ID. | ||
- | |||
- | When the Stingray SG receives the Disconnect-Request: | ||
- | - if the [[en: | ||
- | - for protocols that allow a session to be terminated by the server initiative (for example, PPPoE) - it terminates the session | ||
- | - sets the authorization state for the IP-address to the " | ||
- | |||
- | <note important> | ||
- | |||
- | <note important> | ||
- | ===== Flag to deny/allow sending acct stop ===== | ||
- | |||
- | The '' | ||
- | |||
- | * **0x0001** – '' | ||
- | * **0x0002** – '' | ||
- | * **0x0004** – '' | ||
- | * **0x0008** – respond to DHCP Request with NAK. Allows you to shorten the reauthorization time by terminating the IP address lease. | ||
- | * **0x0010** – ignore DHCP Request (wait for DHCP Discovery). | ||
- | |||
- | This option covers the following cases: | ||
- | |||
- | **'' | ||
- | |||
- | * send acct stop | ||
- | * the following DHCP request (Discover or Request) is sent to Radius | ||
- | * reset the L3 session time, which results in an L3 auth on the first non-DHCP packet from the subscriber | ||
- | \\ | ||
- | **'' | ||
- | |||
- | * **do not** send acct stop | ||
- | * the following DHCP request (Discover or Request) is sent to Radius | ||
- | * reset the L3 session time, which results in an L3 auth on the first non-DHCP packet from the subscriber | ||
- | \\ | ||
- | **'' | ||
- | |||
- | * send (2) / do not send (3) acct stop | ||
- | * the following DHCP request (Discover or Request) is sent to Radius | ||
- | \\ | ||
- | **'' | ||
- | |||
- | * send (4) / do not send (5) acct stop | ||
- | * the following DHCP request (Discover or Request) is sent to Radius | ||
- | * reset the L3-reauthorization time, which leads to L3 auth on the first non-DHCP packet from the subscriber | ||
- | \\ | ||
- | **'' | ||
- | |||
- | * send (6) / do not send (7) acct stop | ||
- | * the following DHCP request (Discover or Request) is sent to Radius | ||
- | * traffic from the subscriber is dropped | ||
- | \\ | ||
- | **'' | ||
- | |||
- | * send (8) / do not send (9) acct stop | ||
- | * reset the L3-reauthorization time, which leads to L3 auth on the first non-DHCP packet from the subscriber | ||
- | * DHCP Request – respond with NAK, DHCP Discover – send to Radius | ||
- | \\ | ||
- | **'' | ||
- | |||
- | * send (10) / do not send (11) acct stop | ||
- | * DHCP Request – respond with NAK, DHCP Discover – send to Radius | ||
- | * L3 auth disabled | ||
- | \\ | ||
- | **'' | ||
- | |||
- | * send (12) / do not send (13) acct stop | ||
- | * DHCP Request – respond with NAK, DHCP Discover – send to Radius | ||
- | * traffic from the subscriber is dropped | ||
- | * reset L3-reauthorization time, which leads to L3 auth on the first non-DHCP packet from the subscriber | ||
- | \\ | ||
- | **'' | ||
- | |||
- | * send (14) / do not send (15) acct stop | ||
- | * DHCP Request – respond with NAK, DHCP Discover – send to Radius | ||
- | * traffic from the subscriber is dropped | ||
- | * L3 auth disabled | ||
- | \\ | ||
- | **'' | ||
- | |||
- | * send (16) / do not send (17) acct stop | ||
- | * reset L3-reauthorization time, which leads to L3 auth on the first non-DHCP packet from the subscriber | ||
- | * DHCP Request is ignored (drop), DHCP Discover – send to Radius | ||
- | \\ | ||
- | **'' | ||
- | |||
- | * send (18) / do not send (19) acct stop | ||
- | * DHCP Request is ignored (drop), DHCP Discover – send to Radius | ||
- | * L3 auth disabled | ||
- | \\ | ||
- | **'' | ||
- | |||
- | * send (20) / do not send (21) acct stop | ||
- | * DHCP Request is ignored (drop), DHCP Discover – send to Radius | ||
- | * traffic from the subscriber is dropped | ||
- | * reset L3-reauthorization time, which leads to L3 auth L3 auth on the first non-DHCP packet from the subscriber | ||
- | \\ | ||
- | **'' | ||
- | |||
- | * send (22) / do not send (23) acct stop | ||
- | * DHCP Request is ignored (drop), DHCP Discover – send to Radius | ||
- | * traffic from the subscriber is dropped | ||
- | * L3 auth disabled | ||
- | |||
- | All other values of bras_dhcp_disconnect are error. | ||
- | |||
- | <note important> | ||
- | ====== Individual CoA clients ====== | ||
- | The CoA client sending the Disconnect-Request and CoA-Request CoA requests in some configurations may be a separate entity that is not a radius server. For example, it can be some utility used in scripts that can generate CoA requests. The fastpcrf supports such " | ||
- | |||
- | < | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | |||
- | Each CoA-client is described by separate '' | ||
- | Fastpcrf accepts the CoA requests only from registered (described in the configuration file) radius servers and CoA-clients. If the radius server supports CoA there is no need to describe it using the '' | ||
- | |||
- | ====== Accounting session request using CoA ====== | ||
- | |||
- | The VAS Experts DPI 8.2 adds a feature to request the state of the accounting session by a third-party system. It can be done | ||
- | This feature is implemented using CoA-Request containing the '' | ||
- | |||
- | ===== Check if session exists ===== | ||
- | The CoA-Request containing the following attributes | ||
- | <code bash> | ||
- | VasExperts-Command-Code=1 | ||
- | Acct-Session-Id=A1B2C3D4E5F6 | ||
- | </ | ||
- | will check if the specified accounting session exists. | ||
- | |||
- | If successful, CoA-ACK will be returned with IP address this session belongs to: | ||
- | <code bash> | ||
- | # CoA-ACK attributes: | ||
- | VasExperts-Command-Code=1 | ||
- | Acct-Session-Id=A1B2C3D4E5F6 | ||
- | Framed-IP-Address=192.168.10.20 | ||
- | </ | ||
- | |||
- | If the specified session does not exist (or it's inactive, for example, it is closed by idle timeout), the CoA-NAK with the following attributes will be returned: | ||
- | <code bash> | ||
- | # CoA-NAK attributes: | ||
- | VasExperts-Command-Code=1 | ||
- | Acct-Session-Id=A1B2C3D4E5F6 | ||
- | Error-Cause=503 # Session Context not found | ||
- | # The Error-Cause attribute can also take other values. | ||
- | </ | ||
- | |||
- | ===== Accounting session request for given IP address ===== | ||
- | Active accounting session identifier for given IP address can be requested from the VAS Experts DPI. | ||
- | This could be done by the following CoA-Request: | ||
- | <code bash> | ||
- | VasExperts-Command-Code=1 | ||
- | Framed-IP-Address=192.168.10.20 | ||
- | </ | ||
- | |||
- | If there is an active accounting session for the specified IP address, the VAS Experts DPI will return a CoA-ACK with the session ID: | ||
- | <code bash> | ||
- | # CoA-ACK атрибуты | ||
- | VasExperts-Command-Code=1 | ||
- | Framed-IP-Address=192.168.10.20 | ||
- | Acct-Session-Id=A1B2C3D4E5F6 | ||
- | </ | ||
- | |||
- | If there is no active session, CoA-NAK will be returned like the example below: | ||
- | <code bash> | ||
- | # CoA-NAK attributes | ||
- | VasExperts-Command-Code=1 | ||
- | Framed-IP-Address=192.168.10.20 | ||
- | Error-Cause=503 # Session Context not found | ||
- | # The Error-Cause attribute can also take other values. | ||
- | </ | ||
- | |||
- | |||
- | ===== Запрос accounting-сессии по мульти-сессии ===== | ||
- | **[СКАТ 8.3]** Можно по идентификатору мульти-сессии узнать, | ||
- | <code bash> | ||
- | # Атрибуты CoA-Request | ||
- | VasExperts-Command-Code=1 | ||
- | Acct-Multi-Session-Id=MA1B2C3D4E5F6 | ||
- | </ | ||
- | |||
- | Если данная мульти-сессия найдена, | ||
- | В случае, | ||
- | <code bash> | ||
- | # CoA-ACK атрибуты | ||
- | VasExperts-Command-Code=1 | ||
- | Framed-IP-Address=192.168.10.20 | ||
- | Acct-Session-Id=A1B2C3D4E5F6 | ||
- | Acct-Multi-Session-Id=MA1B2C3D4E5F6 | ||
- | # каким fastDPI создана сессия | ||
- | NAS-IP-Address=192.168.0.200 | ||
- | </ | ||
- | |||
- | Если нет активной сессии или же их более одной, вернется CoA-NAK с указанием IP-адреса абонента: | ||
- | <code bash> | ||
- | # CoA-NAK атрибуты | ||
- | VasExperts-Command-Code=1 | ||
- | Acct-Multi-Session-Id=MA1B2C3D4E5F6 | ||
- | Framed-IP-Address=192.168.10.20 | ||
- | Error-Cause=503 # Session Context not found | ||
- | # Атрибут Error-Cause может принимать и другие значения. | ||
- | </ | ||
- | |||
- | Можно в CoA-Request указать, | ||
- | <code bash> | ||
- | # Атрибуты CoA-Request | ||
- | VasExperts-Command-Code=1 | ||
- | Acct-Multi-Session-Id=MA1B2C3D4E5F6 | ||
- | NAS-IP-Address=192.168.0.200 | ||
- | </ | ||
- | |||
- | В этом случае СКАТ вернет IP-адрес абонента и ID сессии, | ||
- | <code bash> | ||
- | # CoA-ACK атрибуты | ||
- | VasExperts-Command-Code=1 | ||
- | Framed-IP-Address=192.168.10.20 | ||
- | Acct-Session-Id=A1B2C3D4E5F6 | ||
- | Acct-Multi-Session-Id=MA1B2C3D4E5F6 | ||
- | # каким fastDPI создана сессия | ||
- | NAS-IP-Address=192.168.0.200 | ||
- | </ | ||
- | |||
- | Если активной сессии для указанного fastDPI нет, СКАТ вернет CoA-NAK: | ||
- | <code bash> | ||
- | # CoA-NAK атрибуты | ||
- | VasExperts-Command-Code=1 | ||
- | Acct-Multi-Session-Id=MA1B2C3D4E5F6 | ||
- | NAS-IP-Address=192.168.0.200 | ||
- | Framed-IP-Address=192.168.10.20 | ||
- | Error-Cause=503 # Session Context not found | ||
- | # Атрибут Error-Cause может принимать и другие значения. | ||
- | </ | ||