Table of Contents

Description and Configuration

FastRADIUS (RADIUS Event Monitor) is designed to create an IP-LOGIN binding in DPI in networks with dynamic IP address assignment based on RADIUS Accounting (Mapping IP-LOGIN).
FastRADIUS supports the following commands in FastDPI:

  1. Support for subscribers with single IPv4 address and IPv6 subnet
    Binding IP address to LOGIN:
    fdpi_ctrl load --bind --user user_name:ip_address

    Removing IP ↔ login binding:

    fdpi_ctrl del --bind --login user_name
  2. Support for subscribers with multiple IP
    Binding IP address or IP block to LOGIN:
    fdpi_ctrl load --bind_multi --user user_name:ip_address_or_block

    Removing one of IPs bound to LOGIN:

    fdpi_ctrl del --bind_multi --ip ip_address

It is also possible to assign CG-NAT (service 11) based on specified parameters.

Operation Schemes

RADIUS Accounting is delivered to FastRADIUS on a standard Linux interface specified in the configuration file (in_dev) by mirroring existing RADIUS traffic or using a RADIUS proxy (e.g., FreeRADIUS). In this case, FastRADIUS only receives the mirror and does not respond to the RADIUS server. Interaction with standard Linux interfaces is handled via libpcap.

Minimum FastRADIUS Configuration

Settings are located in the file /etc/dpi/fdpi_radius.conf.

To apply the configuration, restart the service:

systemctl restart fastradius

Stream Processing Configuration

Using the provided values is recommended

Configuration for Exporting RADIUS Events to an External Collector

Alternative Scheme: Diverting RADIUS Accounting Traffic from FastDPI DPDK Interfaces

RADIUS Accounting must be fed into the DPI device ports along with network traffic. This can be achieved by mirroring the ports connected to the RADIUS server. In this case, FastRADIUS only receives the mirror and does not respond to the RADIUS server.

TAP Interface Configuration

FastRADIUS can run on the same server as FastDPI or be deployed on an external server. Two virtual interfaces, TAP0 and TAP1, are used to isolate the required traffic.

Specify the port in the configuration:

in_dev=tap1

Deploying Radius Monitor on the Same Server. Using a Bridge:

Deploying Radius Monitor on an External Server. Using a Tunnel:

Execute the following commands from the console:

ip tuntap add tap0 mode tap
ip tuntap add tap1 mode tap
 
ip link set dev tap0 up
ip link set dev tap1 up
 
ip link add br0 type bridge
 
ip link set tap0 master br0
bridge link set dev tap0 learning off
ip link set tap1 master br0
 
ifconfig tap0 192.168.4.20 up
ifconfig tap1 192.168.4.21 up
ifconfig br0 up
WARNING: TAP interfaces must be started after server reboot!

Configuring Traffic Diversion from FastDPI to FastRADIUS

Enable the traffic diversion service on FastDPI:

fdpi_ctrl load profile --service 14 --profile.name radius  --profile.json '{ "typedev" : "tap","dev" : "tap0","udp" : [ 1813,1814,1815 ] }' --outformat=json 
fdpi_ctrl load --service 14 --profile.name radius --ip 10.16.252.11
fdpi_ctrl load --service 14 --profile.name radius --ip 10.16.252.12

where:

Additional Radius Monitor Settings

If the order of bind/unbind in the RADIUS stream is not maintained or if there are packet losses (e.g., if it's a mirror), artifacts are likely.

Connecting NAT Based on CIDR

Creating named NAT profiles on FastDPI:

fdpi_ctrl load profile --service 11 --profile.name nat_profile_all --profile.json '{ "nat_ip_pool" : "5.200.43.0/24,5.200.44/25", "nat_tcp_max_sessions" : 2000, "nat_udp_max_sessions" : 2000 }'

In the FastRADIUS configuration file /etc/dpi/fdpi_radius.nat, specify IP ranges and their corresponding NAT profile names. Example:

0.0.0.0/0	nat_profile_all
10.0.0.0/8	nat_profile_1
10.1.1.0/24	nat_profile_2

When a more specific (concrete) profile is specified for an address, it is selected.

IPv6 Support

Configuration parameters for binding addresses and subnets to subscribers are specified in the /etc/dpi/fdpi_radius.conf file:

Parameters bind_ipv6_address and bind_ipv6_subnet can be set simultaneously.
If a /128 mask is present in Framed-IPv6-Prefix, it is not checked against the restriction set by the bind_ipv6_subnet value.

The subscriber is identified by the RADIUS attribute User-Name or Calling-Station-ID (depending on the login_replace setting)

The current implementation only supports IPv6 subnets of fixed length (default /64), so binding subnets of shorter length will cause an error.

Subscriber Identification in Mobile Networks

Appending Region Prefixes to Subscriber Names (LOGIN)

Used when the RADIUS monitor and SCAT serve multiple regions, and user-name might overlap across regions; this allows separating them into different logins.

  1. Enable the setting rad_prefix_info=1
  2. Add to the file /etc/dpi/prefixes.info:
    172.17.76.1 MSK-
    172.17.76.2 MSK-
    172.17.76.3 SPB-
    172.17.76.4 SPB-
    172.17.76.5 SPB-

    where:

    • first field - NAS-IP-Address from the RADIUS packet
    • second field - prefix to be added to the Login