Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
en:dpi:bras_bng:use_cases:dpi_bestpractice_brasl2radiusproxy [2023/08/30 08:55] – elena.krasnobryzh | en:dpi:bras_bng:use_cases:dpi_bestpractice_brasl2radiusproxy [2024/09/26 15:29] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== dpi_bestpractice_brasl2radiusproxy ====== | + | ====== |
+ | {{indexmenu_n> | ||
+ | ===== Description ===== | ||
+ | {{ : | ||
+ | BRAS DHCP L2 mode means that the subscriber recieves an IP-address via DHCP Proxy and proceeds to ААА in the Billing system. Then the subscriber is terminated by Stingray Service Gateway(SSG) and transferred to border equipment. | ||
+ | |||
+ | The following elements are involved in the SSG operation scheme in BRAS L2 DHCP Radius Proxy mode: | ||
+ | - Client with Q-in-Q access type | ||
+ | - FastDPI - traffic processing and policing | ||
+ | - FastPCRF - proxying requests between fastDPI and Radius | ||
+ | - Radius server - accepts requests from fastPCRF and generates responses with specified attributes | ||
+ | - Router - is responsible for packets transmission to the Internet and the backward routing. At the moment the Static Route scenario and the scenario with [[en: | ||
+ | |||
+ | ===== Scenario ===== | ||
+ | {{ : | ||
+ | By DHCP request - In this case, when BRAS fixes DHCP requests from the subscriber network, it generates the corresponding Radius requests to obtain DHCP lease parameters that are communicated to the subscriber. In addition, in response to DHCP authentication, | ||
+ | The subscriber' | ||
+ | |||
+ | ===== FastDPI Setup ===== | ||
+ | ==== Editing the DPI Configuration File ==== | ||
+ | First, you need to uncomment (add) the following lines to the / | ||
+ | |||
+ | < | ||
+ | # enable internal database of user properties | ||
+ | udr=1 | ||
+ | # activates L2 BRAS mode | ||
+ | bras_enable=1 | ||
+ | enable_auth=1 | ||
+ | |||
+ | # DPI " | ||
+ | bras_arp_ip=192.168.1.2 | ||
+ | # " | ||
+ | bras_arp_mac=a0: | ||
+ | |||
+ | #border IP-address | ||
+ | bras_gateway_ip=192.168.1.1 | ||
+ | #MAC address of the border’s interface to which DPI is connected | ||
+ | bras_gateway_mac=c4: | ||
+ | |||
+ | # server data where FastPCRF is installed (if the same server, do not change) | ||
+ | auth_servers=127.0.0.1%lo: | ||
+ | |||
+ | # enable DHCP Radius Proxy mode | ||
+ | bras_dhcp_mode=2 | ||
+ | |||
+ | # vlan termination (this value means tag will be removed) | ||
+ | bras_vlan_terminate=1 | ||
+ | # MAC-addresses replacement | ||
+ | bras_terminate_l2=1 | ||
+ | # traffic termination only for AS, marked as " | ||
+ | bras_term_by_as=1 | ||
+ | # local traffic interconnection | ||
+ | bras_terminate_local=1 | ||
+ | |||
+ | # enable accounting | ||
+ | enable_acct=1 | ||
+ | # subscriber billing statistics | ||
+ | netflow=4 | ||
+ | # timeout for sending statistics | ||
+ | netflow_timeout=60 | ||
+ | </ | ||
+ | |||
+ | <note important> | ||
+ | * bras_arp_ip | ||
+ | * bras_arp_mac | ||
+ | * bras_gateway_ip | ||
+ | * bras_gateway_mac | ||
+ | </ | ||
+ | |||
+ | ==== AS Specification for Termination ==== | ||
+ | |||
+ | The next step is to mark the AS traffic that has to be terminated. | ||
+ | |||
+ | The AS list is prepared in text format, each entry on a new line in the format CIDR< | ||
+ | |||
+ | < | ||
+ | 192.168.2.0/ | ||
+ | </ | ||
+ | |||
+ | Then it is converted into an internal format by the as2bin utility and placed in the file /// | ||
+ | |||
+ | < | ||
+ | cat aslocal.txt | as2bin / | ||
+ | </ | ||
+ | |||
+ | The list of local AS to be terminated is prepared in a text file in the format AS_number< | ||
+ | |||
+ | < | ||
+ | 65550 local | ||
+ | 65550 term | ||
+ | </ | ||
+ | |||
+ | To convert into internal format and place into the main directory, where the DPI will pick the settings up: | ||
+ | |||
+ | < | ||
+ | cat my_as_dscp.txt | as2dscp / | ||
+ | </ | ||
+ | ===== FastPCRF Setup ===== | ||
+ | To configure FastPCRF, edit the file /// | ||
+ | |||
+ | < | ||
+ | # | ||
+ | # | ||
+ | #eth0 - the interface from which FastPCRF communicates with the Radius server | ||
+ | #1812 - the port to which FastPCRF sends authorization requests | ||
+ | # | ||
+ | radius_server=secret123@192.168.1.10%eth0: | ||
+ | </ | ||
+ | |||
+ | ===== Radius Setup ===== | ||
+ | The setup is given as **an example** on freeRADIUS 3 and may differ from the configuration of your Radius server. | ||
+ | |||
+ | ==== VasExperts Dictionary ==== | ||
+ | First you need to add a VSA dictionary | ||
+ | * Copy the dictionary / | ||
+ | * Add the following line to the main dictionary $freeRadius/ | ||
+ | |||
+ | < | ||
+ | $INCLUDE dictionary.vasexperts | ||
+ | </ | ||
+ | |||
+ | ==== Creating Radius Client ==== | ||
+ | Add the following lines to raddb/ | ||
+ | |||
+ | < | ||
+ | client fastdpi1 { | ||
+ | ipaddr = 192.168.1.5 | ||
+ | secret = secret123 | ||
+ | require_message_authenticator = yes | ||
+ | # add_cui = yes | ||
+ | virtual_server = fastdpi-vs | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ==== Creating a virtual server ==== | ||
+ | To create a virtual server configuration, | ||
+ | * set the name of the virtual server - change the ' | ||
+ | * in the ' | ||
+ | |||
+ | < | ||
+ | ipaddr = 192.168.1.10 | ||
+ | port = 1812 | ||
+ | interface = eth0 | ||
+ | </ | ||
+ | |||
+ | ==== Creating an account for authorization ==== | ||
+ | Add subscriber data to the file /// | ||
+ | |||
+ | < | ||
+ | testuser | ||
+ | Framed-IP-Address = 192.168.2.199, | ||
+ | VasExperts-DHCP-DNS = 8.8.8.8, | ||
+ | VasExperts-Enable-Service = " | ||
+ | VasExperts-Policing-Profile = " | ||
+ | VasExperts-Service-Profile = " | ||
+ | </ | ||
+ | |||
+ | Two more lines for FastPCRF should also be added to the file /// | ||
+ | |||
+ | < | ||
+ | VasExperts.FastDPI.unknownUser Cleartext-Password := " | ||
+ | DEFAULT Cleartext-Password := " | ||
+ | </ | ||
+ | |||
+ | ===== Router Setup ===== | ||
+ | On the router, add a static route to the subnet served by the SSG. | ||
+ | < | ||
+ | /ip route add dst-address=192.168.2.0/ | ||
+ | </ | ||
+ | |||
+ | ===== Connecting a Test Subscriber ===== | ||
+ | When an unknown subscriber is connected, FastPCRF sends an Access-Request with the following content: | ||
+ | |||
+ | < | ||
+ | User-Name = " | ||
+ | User-Password = " | ||
+ | Calling-Station-Id = " | ||
+ | NAS-Port-Type = 5 | ||
+ | NAS-Port = 100 | ||
+ | NAS-Identifier = " | ||
+ | Service-Type = 2 | ||
+ | VasExperts-Service-Type =1 | ||
+ | VasExperts-DHCP-Request = Discover | ||
+ | VasExperts-DHCP-RelayRemoteId = 0x3137322e31372e312e32 | ||
+ | VasExperts-DHCP-RelayCurcuitId = 0x000601360100000a | ||
+ | </ | ||
+ | |||
+ | <note tip>By default FastPCRF puts the subscriber' | ||
+ | |||
+ | When the subscriber is authorized successfully, | ||
+ | |||
+ | < | ||
+ | Session-Timeout = 84600 | ||
+ | User-Name = " | ||
+ | Framed-IP-Address = 10.0.0.10 | ||
+ | Framed-IP-Netmask = 255.255.255.0 | ||
+ | VasExperts-DHCP-Gateway = 10.0.0.1 | ||
+ | VasExperts-DHCP-DNS = 8.8.8.8 | ||
+ | VasExperts-DHCP-DNS = 8.8.4.4 | ||
+ | VasExperts-Policing-Profile = " | ||
+ | VasExperts-Service-Profile = " | ||
+ | VasExperts-Service-Enable = " | ||
+ | </ | ||
+ | |||
+ | ===== Troubleshooting ===== | ||
+ | When implementing L2 BRAS, some errors may occur, when the subscribers cannot be authorized and connected to the Internet. Below are the most common problems: | ||
+ | |||
+ | ==== There are no authorization requests ==== | ||
+ | Check if fastPCRF process is running and if the server Radius address is specified correctly. | ||
+ | |||
+ | |||
+ | ==== Authorization requests do not reach the Radius server ==== | ||
+ | Check if the Firewall' | ||
+ | |||
+ | ==== I can ping DPI, but the ping does not reach the border ==== | ||
+ | - It is necessary to set a static route towards the subscribers on the border. Since DPI is not able to announce the subscriber subnets that it serves yet, it is necessary to indicate the border where to route the traffic. | ||
+ | - In the case of using NAT for subscribers, | ||
+ | - Сheck if the parameters **bras_gateway_ip** and **bras_gateway_mac** are set correctly. | ||
+ | |||
+ | ==== Statistics for Accounting is not sent ==== | ||
+ | - Check if the port for receiving statistics is allowed in the Firewall (by default 1813) on the Radius server. | ||
+ | - Check if service 9 is activated for the subscriber. | ||
+ | - Check if accounting is enabled in DPI configuration settings. | ||
+ | - Check if the correct value is specified for the Netflow parameter. | ||
+ | |||
+ | ==== CoA does not reach BRAS ==== | ||
+ | Check if the port for receiving CoA (3799 by default) is allowed in the Firewall on the server with FastPCRF. |