Mikrotik and Radius - Nas-Port / Nas-Port-ID

Hi All

Can anyone with Freeradius help with this?

I have an estate of both Nomadix and Mikrotik. We’re gradually switching to Mikrotik, but have a problem with different formats of radius accounting.

Nomadix passes the interface VLAN in Nas-Port

Mikrotik Passes the VLAN in Nas-Port-ID, and a random number in Nas-Port

I need to add a rewrite rule -

If (Mikrotik-Host-IP) {Nas-Port={Nas-Port-ID}

Ie , If Mikrotik-Host-IP present (radius requests from a Mikrotik ) set Nas-Port to the value of Nas-Port-ID

Clear as mud I know, by any help greatly appreciated.

Hi,

Could you not have 2 RADIUS entries one of a Nomadix (field_A) and one for Mikrotik (field_B)

Then do something like… if gateway = Nomadix then NAS = (field_A)
if gateway = Mikrotik then NAS = (field_B)

That way if you added anymore gateways you could just add another field