Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:dpi:dpi_components:radius:radius_config [2018/03/19 12:13] – created lexx26 | en:dpi:dpi_components:radius:radius_config [2025/04/11 13:25] (current) – [Radius Monitor Setup] elena.krasnobryzh | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== Configuration ====== |
+ | {{indexmenu_n> | ||
+ | Radius Accounting needs to be put into the DPI device ports along with the network traffic. This can be done by mirroring the ports to which the Radius server is connected. | ||
+ | ===== TAP Interfaces Setup ===== | ||
+ | Radius Monitor can be launched on the same server as FastDPI or it can be placed on an external server. To allocate the necessary traffic, two virtual interfaces TAP0 and TAP1 are used.\\ | ||
+ | {{: | ||
+ | **Placing Radius monitor on the same server. Bridge is used.**\\ | ||
+ | \\ | ||
+ | \\ | ||
+ | {{: | ||
+ | **Placing Radius monitor on an external server. Tunnel is used.** | ||
+ | * TAP0 - is used for traffic steering | ||
+ | * TAP1 - listens to Radius Monitor | ||
+ | * A Bridge or Tunnel is created between TAP0 and TAP1 to transfer traffic. | ||
+ | * Mac learning is disabled on the TAP0 interface | ||
+ | Run 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 | ||
+ | </ | ||
+ | <note warning> | ||
+ | |||
+ | ===== Linux Interfaces Setup ===== | ||
+ | The standard Linux interfaces are handled by libpcap. | ||
+ | |||
+ | Example: | ||
+ | <code bash> | ||
+ | in_dev=eno2 | ||
+ | </ | ||
+ | ===== Traffic Steering Setup ===== | ||
+ | Connect the traffic steering service to FastDPI: | ||
+ | < | ||
+ | fdpi_ctrl load profile --service 14 --profile.name radius | ||
+ | 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 | ||
+ | </ | ||
+ | here: | ||
+ | * 1813, | ||
+ | * 10.16.252.11, | ||
+ | |||
+ | ===== Radius Monitor Setup ===== | ||
+ | <note important> | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | Stream processing setup (it is recommended to use the values from the example): | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | Configuration of Radius Event Export: | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | After changing the configuration, | ||
+ | < | ||
+ | systemctl restart fastradius | ||
+ | </ | ||
+ | |||
+ | ===== CIDR-based NAT Connection ===== | ||
+ | Create named NAT profiles at FastDPI: | ||
+ | < | ||
+ | fdpi_ctrl load profile --service 11 --profile.name nat_profile_all --profile.json '{ " | ||
+ | </ | ||
+ | In Radius monitor configuration file / | ||
+ | < | ||
+ | example: | ||
+ | 0.0.0.0/ | ||
+ | 10.0.0.0/ | ||
+ | 10.1.1.0/ | ||
+ | when there is a more specific profile for an address, then it is selected. | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | ===== IPv6 Support ===== | ||
+ | The file / | ||
+ | < | ||
+ | bind_ipv6_address=0 (by default - do not bind the address with the subscriber), | ||
+ | bind_ipv6_subnet=0 (by default - do not bind), 64 (bind only for /64 subnets), 1 - bind for any subsets. Subnet is taken from the Delegated-IPv6-Prefix radius attribute (123) | ||
+ | </ | ||
+ | The subscriber is identified by the radius attribute User-Name or Calling-Station-ID (depending on the login_replace setting) | ||
+ | < | ||
+ | |||
+ | ===== Subscribers Identification in mobile networks ===== | ||
+ | In the configuration file / | ||
+ | < | ||
+ | login_replace=1 | ||
+ | </ | ||
+ | in this case, the radius attribute Calling-Station-ID is used instead of User-Name to identify the subscriber if it is present in the radius of the packet. | ||
+ | |||
+ | ===== Radius Monitor Additional Settings ===== | ||
+ | < | ||
+ | # FastDPI RADIUS configuration parameters: | ||
+ | # outgoing interface name, if the Monitor operates in traffic pass mode | ||
+ | # | ||
+ | |||
+ | # enable emulation of the redundant Radius server | ||
+ | # | ||
+ | |||
+ | # enable emulation of the network card | ||
+ | # | ||
+ | |||
+ | # secret value for generating responses in the server Radius emulation mode | ||
+ | # | ||
+ | |||
+ | # add region prefixes to subscriber names (LOGIN) | ||
+ | # | ||
+ | |||
+ | # listening port number (or a list of ports separated by commas) with Radius Authentication packets | ||
+ | # | ||
+ | |||
+ | # allow multiple IPs on the same USER-NAME see command load --bind_multi, | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | ==== Addition of subscriber names (LOGIN) with region prefixes ==== | ||
+ | This is used when the Radius monitor and SSG serve several regions, and the user-name in different regions can overlap with other regions, so they can be separated into different login\\ | ||
+ | |||
+ | 1. Turn on the setting rad_prefix_info=1\\ | ||
+ | |||
+ | 2. Add \\ to the file / | ||
+ | < | ||
+ | 172.17.76.1 MSK- | ||
+ | 172.17.76.2 MSK- | ||
+ | 172.17.76.3 SPB- | ||
+ | 172.17.76.4 SPB- | ||
+ | 172.17.76.5SPB- | ||
+ | </ | ||
+ | where:\\ | ||
+ | the first field is the NAS-IP-Address from the Radius package\\ | ||
+ | second field - what prefix will be added to login\\ | ||
+ | |||
+ | See also: [[en: |