0

我如何为具有不同属性的两个不同 NAS(Cisco 和 MicroTek)创建配置文件。

我不知道是否有办法使 if 语句取决于 NAS 的 IP。

更多解释:

我使用 daloradius 来管理 freeradius,我无法管理速度,因为现在我有例如 10M 配置文件,其属性为 Cisco-AVPair=ip:sub-qos-policy-in=10Mbps 但在 MikroTek 中不同的是它使用 Mikrotik-Rate -Limit=10M 所以我需要一个配置文件处理,如果用户连接到思科将使用他的策略映射,当他连接到 MikroTek 时使用另一个属性

4

1 回答 1

0

您可以在中定义与 NAS 关联的任意属性clients.conf

例如:

client 192.168.0.1 {
    secret = testing123
    my_attribute = 'foo'
}

然后使用%{client:<attribute>}xlat 访问它们。

authorize {
    update reply {
        Reply-Message := "User connecting to NAS with attribute %{client:my_attribute}"
    }
}

这比寻线组或其他分组机制更有效。

于 2014-11-09T17:16:52.847 回答