Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:dpi:dpi_bestpractice:dpi_bestpractice_brasl2dhcprelay [2021/11/08 00:28] – kuligina | en:dpi:dpi_bestpractice:dpi_bestpractice_brasl2dhcprelay [2023/08/28 14:44] (current) – removed edrudichgmailcom | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== 9 BRAS L2 DHCP Relay Agent Example ====== | ||
- | {{indexmenu_n> | ||
- | {{ : | ||
- | BNG/BRAS DHCP L2 means that Stingray Service Gateway (SSG) acts as a DHCP Relay. The subscriber is authorized by the allocated IP-address after successful session initiation. Then the IP-address is terminated with a DPI and goes to the border. | ||
- | 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 Handling and Policy Enforcement | ||
- | - FastPCRF - proxying requests between fastDPI and Radius | ||
- | - Radius server - accepting requests from fastPCRF and generating responses with specified attributes | ||
- | - Router - is responsible for the transmission of outbound packets and the inbound route. It is necessary to specify the Static Route, because DPI does not support OSPF and BGP at the moment. | ||
- | |||
- | ===== 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 | ||
- | #enable IP authorization mode | ||
- | enable_auth=1 | ||
- | #activates L2 BRAS mode | ||
- | bras_enable=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 Relay Agent mode | ||
- | bras_dhcp_mode=1 | ||
- | |||
- | # | ||
- | #veth0 – the name of the network interface connected to the DHCP-server | ||
- | #67 – port, default value: 68 | ||
- | #arp_proxy - response lag to ARP requests of the DHCP server IP-address | ||
- | #alias_ip - DHCP server alias | ||
- | # | ||
- | bras_dhcp_server=192.168.10.2%veth0: | ||
- | |||
- | #vlan termination (this value means tag will be removed) | ||
- | bras_vlan_terminate=1 | ||
- | # | ||
- | bras_terminate_l2=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 | ||
- | </ | ||
- | |||
- | If the session is started successfully and the L3 authorization mode is enabled (enable_auth=1), | ||
- | |||
- | ===== FastPCRF Setup ===== | ||
- | FastPCRF needs to be configured. Edit the file /// | ||
- | |||
- | < | ||
- | # | ||
- | # | ||
- | #eth0 - interface, **from which** FastPCRF " | ||
- | #1812 - port to which FastPCRF sends authorization requests | ||
- | # | ||
- | radius_server=secret123@192.168.1.10%eth0: | ||
- | </ | ||
- | |||
- | ===== Radius Setup ===== | ||
- | The setting 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 // | ||
- | |||
- | < | ||
- | $INCLUDE dictionary.vasexperts | ||
- | </ | ||
- | |||
- | ==== Creating Radius Client ==== | ||
- | Add the following lines to // | ||
- | |||
- | < | ||
- | 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 the configuration of the virtual server, copy the file // | ||
- | * set the name of the virtual server - change the line " | ||
- | * in the //listen// section for auth requests (type = auth), write which IP-address and which port listens to incoming requests (note that this is the local address of the Radius server): | ||
- | |||
- | < | ||
- | ipaddr = 192.168.1.10 | ||
- | port = 1812 | ||
- | interface = eth0 | ||
- | </ | ||
- | |||
- | ==== Creating a User Account ==== | ||
- | Add subscriber data to the // | ||
- | |||
- | < | ||
- | 192.168.2.10 | ||
- | VasExperts-Policing-Profile = " | ||
- | </ | ||
- | |||
- | Also add two lines for fastPCRF in the // | ||
- | |||
- | < | ||
- | VasExperts.FastDPI.unknownUser Cleartext-Password := " | ||
- | DEFAULT Cleartext-Password := " | ||
- | </ | ||
- | |||
- | ===== Test Subscriber Connection ===== | ||
- | When an unknown subscriber is being connected, FastPCRF sends an Access-Request with the following content: | ||
- | |||
- | < | ||
- | User-Name = 192.168.2.10 | ||
- | User-Password = 0x372CC83FF66B8C8589C3BF18472DAEF6B0BB0723EC9DAEE188A08AA1EE6A050C | ||
- | Framed-IP-Address = 192.168.2.10 | ||
- | Acct-Session-Id = 0A02A8C00000000F | ||
- | Calling-Station-Id = 18: | ||
- | NAS-Identifier = VasExperts.FastDPI | ||
- | Service-Type = [2] Framed | ||
- | VasExperts-Service-Type = 0 | ||
- | Message-Authenticator = 0x46A546AE34DCB0AEB9C24A9DFF1F0A02 | ||
- | </ | ||
- | |||
- | Access-Accept example on successful authorization: | ||
- | |||
- | < | ||
- | VasExperts-Policing-Profile = 10Mbps | ||
- | VasExperts-User-Name = 192.168.2.10 | ||
- | </ | ||
- | |||
- | ===== Troubleshooting ===== | ||
- | When implementing L2 BRAS/BNG, various errors may occur, so that subscribers cannot be authorized and get access to the Internet. Below are the most common problems: | ||
- | |||
- | ==== No authorization requests. ==== | ||
- | Check if fastPCRF process is running. Check if the server Radius address is specified correctly. | ||
- | |||
- | ==== I can ping DPI, but the ping does not reach the border. ==== | ||
- | - It is necessary to specify a static route to subscribers on the border. It is necessary to specify where the border has to route the traffic, since DPI is not yet able to announce the subscriber subnets it serves. | ||
- | - In the case of using NAT, a similar route is required for the subscriber’s subnets used in NAT. | ||
- | - Check if **bras_gateway_ip** and **bras_gateway_mac** parameters are set correctly. | ||
- | |||
- | ==== Statistics are not sent for Accounting. ==== | ||
- | - Check if the port for receiving statistics is allowed in the Firewall (1813 by default) on the Radius server. | ||
- | - Check if the 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/BNG. ==== | ||
- | Check if the port for receiving CoA is allowed in the Firewall (3799 by default) on the server with FastPCRF. |