FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
1,452 views 7 comments
by anonymous

Hi,

I'm trying to setup a RUT950 with DHCP option 43 configured so that added UniFi AP's will appear in our cloud controller for adoption automatically. (as per https://help.ui.com/hc/en-us/articles/204909754-UniFi-Layer-3-Adoption-for-Remote-UniFi-Controllers#7)

I've tried adding the following variations in "DHCP Server", "Advanced Settings", "DHCP Options" with no success:

  • 43,0104334ba95c
  • 43,'0104334ba95c'
  • 43,"0104334ba95c"
  • 43,01:04:33:4b:a9:5c
  • 43,'01:04:33:4b:a9:5c'
  • 43,"01:04:33:4b:a9:5c"

Can anybody help please?

by anonymous

Hello,

The option 43 is a String type , where the containt depende of the final device you use.

At the end of you document it have a Astuces section about exemple of final device.

https://docs.sophos.com/nsg/sophos-firewall/18.0/Help/en-us/webhelp/cli/nsg/sfos/cliGuide/concepts/AppendixA.html

In case here the explaination of OpenWRT DHCP option format from:
https://openwrt.org/docs/guide-user/base-system/dhcp

The ID dhcp_option here must be with written with an underscore. OpenWrt will translate this to --dhcp-option, with a hyphen, as ultimately used by dnsmasq. Multiple option values can be given for this network-id, with a a space between them and the total string between ””. E.g. '26,1470' or 'option:mtu, 1470' that can assign an MTU per DHCP. Your client must accept MTU by DHCP for this to work. Or “3,192.168.1.1 6,192.168.1.1” to give out gateway and dns server addresses. A list of options can be found here here. A list of the symbolic option names that dnsmasq recognises can be found by running dnsmasq --help dhcp.

---

Regards

2 Answers

0 votes
by anonymous

Hello,

You can add manually list dhcp_option '43,01:04:33:4b:a9:5c' to your /etc/config/dhcp in section config dhcp 'lan', the UI doesn't seem to accept it.

Regards,

by anonymous
Thanks so much for your answer, please forgive my lack of understanding as I'm new to this, but how would I do this?
by anonymous

You have to log in the device via ssh or CLI, and edit the file with vi. Go down to the section, enter i enter the text followed by esc then :wq!. Then do a /etc/init.d/dnsmasq restart

by

Thanks again, I've managed to edit the file as suggested but the UniFi AP's are still not appearing in my controller.

Can I check I got the syntax right?

I've tried adding the following under config dhcp 'lan':

  • option '43,0104334ba95c'
  • option '43,01:04:33:4b:a9:5c'
For reference the whole section looks like this now:
config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option ignore '0'
        option time '5'
        option letter 'm'
        option leasetime '5m'
        option '43,0104334ba95c'

Thanks

Scott

by anonymous

This is not correct you must enter list dhcp_option '43,01:04:33:4b:a9:5c' not option '43,0104334ba95c'.

Regards,

by anonymous
Thanks for correcting this for me, I've changed it as suggested but the AP's are still not appearing on the controller so I don't think it's working.

Is there anything else I can do?
by anonymous

Yes, check with tcpdump from ssh or cli what is going on:

Install it if it is not already present:

opkg update

opkg install tcpdump

then tcpdump -i any -n -v 'port 67 or port 68'

From the traces you should see the option 43 in the packets, if not please post at least one request and one reply from a Unify address assignation.

Regards,

 

0 votes
by anonymous
Hello,

I am not sure if you have found a solution.
For me, it helped to set a hostname. But unfortunately this is only possible via CLI:
 

Edit /etc/config/dhcp file and add these lines in the end:
 

config domain
     option name 'unifi'
     option ip '[your server ip]'