Using DHCP with management


#1

I need a little nudging to the correct answer. We have grown too large to put a static IP on every customer radio. I need to start having the radios grab a DHCP address. On every tower, we have a management VLAN with a /23 of private space. The second /24 of that space is now going to be a DHCP server in the Mikrotik. APs, switches and backhauls still get statics from the first /24.

Great. What I want to do is have Sonar automatically acquire (or learn) that IP address that is served to the SM. Sonar knows about the /23 subnet. It knows about the /24 pool in that /23 subnet. It knows the DHCP server and the DHCP server identifier for that /24. It also knows the MAC address of every SM and we attach that to a customer.

So, how do I get Sonar to know that some new SM pulled 10.10.7.200 from the Mikrotik and then show me that in the inventory so we can click on it and manage the radio? I feel like I am close.

For customer IPs, we do Option 82 with a batcher and that works great but I don’t think I need to use a batcher and a DHCP script here, do I? Until now, 100% of management IPs are hard coded so this is easy - we just type the IP into Sonar for that inventory item and everything is great. Until you have 100’s and 100’s of devices out there. And we had to break up management subnets to quiet down management traffic…


#2

Just use the same batcher - Sonar doesn’t care if it’s a management IP or a customer IP. As long as the MAC of the interface that the management IP is being given to is assigned to the inventory item, it will just work.


#3

@simon I thought I remember a way where Sonar pulls IP info from a Mikrotik without a batcher but did it through the API to the Mikrotik? I might be crazy.


#4

If I use the batcher, it is set up for Option 82 (or at least the scripting is). The same script would fail since there are not remote-ID MACs coming through for a standard DHCP lease…


#5

It won’t fail, it will ignore them if they’re empty.


#6

Not working. My devices behind the subscriber radio are showing up with the correct option 82 info but the subscriber radio itself is not displaying an IP. Probably time to open a support ticket


#7

we have sonar put a DHCP reserved IP in to the Mikrotik DHCP leases list. This causes the DHCP address to change less and we dont need a batcher.
You will need to know the MAC of the device requesting (or relaying) the request. In our case we run DHCP relay from the Ubiquiti CPE and had the public IP to whatever router the customer plugs in. Dont need to know MAC of customer device. But some gear doesn’t support DHCP relay. Like Cambium or Telrad.


#8

@Greg_Racino The setting a static in Sonar makes alot more sense… I should have thought of doing it that way…


#9

@simon Figured out the problem… All of our management IP subnets are configured as “Infrastructure” type in Sonar - because we figured if we are using the IP for management of a device, that device is infrastructure, not customer. Sonar will not assign an IP out of an Infrastructure pool to a MAC address assigned to a customer. I sort of get it but I also see plenty of reasons why customers would be connected directly to Infrastructure devices (building routers, building switches, bridge links, etc).

So, once I made that pool “Mixed”, the DHCP batcher writes the lease to Sonar properly. I got to this answer thanks to @Greg_Racino. When I tried to implement his idea, I noticed the pool was not available to me and that triggered the memory that I can’t use infrastructure IPs in a customer record.