Hi, does someone use Option82 in production with Router OS?
I was playing a bit with Option 82 on RouterOS, it works fine, just doesn’t send the VLAN number.
I have a Router with Bridged ports with HW offload (acts as a switch). Relay is running on it. Ether1 is connected to DHCP server location.
Physical ports ether2-ether6 have VLANs and are linked to customers.
DHCP server receives two parameters :
Agent-Remote-Id = 0x500000140000
Agent-Circuit-Id = 0x500000020005
Remote-Id is a MAC/Identification of the DHCP Relay. This can be changed in Relay to some string for identification, for example MY_AP_1. When this is done, in Radius I receive HEX
Agent-Remote-Id = 0x4d595f41505f31 , Converting it to String I get : MY_AP_1
Ok, the Agent-Remote-Id is easy, now let’s check Agent-Circuit-id.
Comparing to Cisco :
Cisco Agent-Circuit-Id = 0x000403230001.
Cisco says first 4 bytes are internal values such as length etc., but last 6 bytes are useful. 0323-00-01 in our case represents 0323 - number of VLAN, 00 01 = Gigabitethernet 0/1
Mikrotik Values :
Mikrotik Agent-Circuit-Id = 0x500000020005
Here we see just single value 50:00:00:02:00:05 - it’s MAC address of port ether6 on Relay, where customer is physically connected.
Fine, someone was complaining tha RouterOS sends the same MAC always, no it doesn’t do it, it works in correct way as it should work, when I change the port where customer connects I get :
ether4, Agent-Circuit-Id= 50:00:00:02:00:03
ether5, Agent-Circuit-Id= 50:00:00:02:00:04
When I have one customer on port without VLANs, it’s fine.
The only problem is when we have many VLANs, for example VLAN per customer on one Physical interface.
Simple example is AP with WLAN interface and customers connected to it. Each customer can have his own VLAN. The VLAN number is not sent in Circuit-ID and the only option for me is to change MACs for each VLAN on Relay router to identify the customer in this scenario.
I can do it also, but it’s a bit hardcore setup. I need to add VLAN to a separate Bridge and set :
interface bridge set bridge1 admin-mac=aa:bb:aa:bb:aa:bb auto-mac=no
In this case I’m receiving instead of 50:00:00:02:00:05 in the Agent-Circuit-Id, ID of my VLAN803 : Agent-Circuit-Id = 0xaabbaabbaabb.