Sophos UTM: DHCP Option 43 for UniFi AccessPoints

I wanted to put a new UniFi AccessPoint from Ubiquiti into operation today. My existing AccessPoints are in the same subnet (and VLAN) as the UniFi Controller, so so far there have been no problems connecting the AccessPoints to the Controller. However, the new AccessPoint should now be in a different subnet and VLAN.

UBNT UniFi AccessPoint

The DHCP option 43 can be used so that access points from other subnets automatically connect to the controller. Option 43 tells the access point under which IP address the UniFi Controller can be reached. This also works from other subnets / VLANs if the controller is reachable.

In my case, the DHCP server is the Sophos UTM and therefore the corresponding configuration of the Sophos UTM DHCP server follows here.

DHCP Option 43 for UniFi AccessPoints

The UniFI documentation shows the following:

image

Source: https://help.ubnt.com/hc/en-us/articles/204909754-UniFi-Layer-3-methods-for-UAP-adoption-and-management

The Sophos UTM also expects a hex value for option 43. The first two values are predefined (01 and 04), followed by the IP address of the UniFi Controller in hex format.

Here is a small tool that converts an IP address into hex format:

http://www.silisoftware.com/tools/ipconverter.php

After the IP address of the controller has been converted into hex format, the value for option 43 of the DHCP server of the Sophos UTM can be created from it:

  • 01 (suboption)
  • 04 (content length of payload)
  • IP address of the controller in hex (in my case 192.168.100.252: 0xC0A864FC)

The UTM expects the values to be separated by colons, so in my case the following value must be entered:

  • 01:04:C0:A8:64:FC (The leading characters (0x) of the IP address are omitted)

SNAGHTMLa1009d

The configuration of the DHCP server in detail:

  • Code: 43
  • Name: unifi
  • Hex: (see above)
  • Area: Vendor ID
  • Vendor ID: ubnt

After the configuration has been saved, it should look something like this:

SNAGHTML8b2b80

After restarting the access point, it connected directly to the controller. WLAN in the garden at last :-)

7 thoughts on “Sophos UTM: DHCP Option 43 für UniFi AccessPoints”

  1. Danke das du das hier geschrieben hast. Bevor ich Deine Seite gefunden hatte, hat es mich 2 Stunden „Lebenszeit“ geraubt.

    Reply
  2. Hast du n Rat für mich bzgl. Option 43 bei einer Sophos UTM für PXE? Ich versuche gerade einen „Dual Boot“ per PXE sowohl für BIOS- also auch x64-UEFI-Geräte bereitzustellen. Per Windows-DHCP-Server klappt das mit den Herstellerklassen und Option 43 (Hersteller-ID „PXEClient:Arch:00007“), mit der Sophos UTM will das nicht. Verschiedene Foren, z. B.: https://community.sophos.com/products/unified-threat-management/f/german-forum/89433/utm-dhcp—vendor-class-and-options haben auch nicht weitergeholfen. Ich vermute es hängt an der Hersteller-ID: bei Windows muss „Platzhalter anfügen“ (Suffix für die Hersteller-ID zulassen) aktiviert werden, an der Sophos UTM gibt es eine solche Option nicht (ich habs mal mit * probiert, aber das hilft nicht).

    Reply
    • Genau das Problem habe ich auch gerade. Hast du mittlerweile (2 jahre später, ich weiß…) eine Lösung gefunden?

      Reply
      • Ich habs dann aufgegeben – mittlerweile können hier alle Geräte mind. UEFI booten (ggf. ohne Secure Boot), falls mir vereinzelt doch mal ein BIOS-Gerät vor die Flinte läuft wird das halt bei Bedarf vom USB-Stick gebootet.

        Reply
  3. Geht auch super übrigens per DNS:

    einfach den Host unifi in der Suchdomäne auf den Controller zeigen lassen und schon finden die APs den Controller auch. Nutzen wir in einem großen Deployment seit Jahren :)

    Reply
  4. Oh noch ein Ubiquiti-Fan :-)
    Ist das Setup so aber sinnvoll ? ich hätte eher die APs alle per Switch in ein eigenes „Management VLAN“ gestopft und dann mit der eingebauten VLAN-Funktion die verschiedenen SSIDs mit VLAN-Tags versehen. d.h. auf dem Switchport wird dann der Port auf das „management VLAN“ UNtaggt, damit die Default Pakete des AP in meinem Hauslan dann Ubiquiti VLAN sind. auf den Port werden dann die anderen VLANs für die verschiedenen Clients als „TAGGED“ draufgelegt und im Ubiqiti dann der SSID zugeordnet. Dann sind die APs nicht in unterschiedlichen Subnetzen.
    Dein Setup macht aber natürlich sinn, wenn die viele Standorte hast, die alle auch über WAN einen Controller in der „Zentrale“ verwenden sollen.
    Ich denke http://www.msxfaq.de/tools/prtg/prtg_mit_ubiquiti.htm kennst du schon oder ?

    Reply
    • Hi Frank,
      mit den Ubiquiti APs bin ich super zufrieden, hab lange nach einer vernünftigen und bezahlbaren Home WLAN Lösung gesucht. Bin dann schließlich von Lancom (gaaanz alter AP mit 54Mbit, super Reichweite) zu Sophos APs (AP30 fürchterlich langsam und schlechte Reichweite) zu TP-Link (billig, hat funktioniert, aber leider kaum Features) zu Ubiquiti (endlich glücklich).

      Zu meinem Setup: 2 APs im Management LAN (eigenes VLAN), 2 WLANs (Gast/Intern) jeweils in separaten VLAN und ein Controller (als VM). Alle VMs befinden sich in VLANs welche nur via Sophos UTM erreichbar sind. Controller und APs befinden sich also in unterschiedlichen VLANs, mein Hintergedanke war: Ich trenne Client, Management und Server Netzwerk und kann an der UTM regeln, welcher Rechner was wie und wo darf. Funktioniert soweit super, nur beim Backup musste ich etwas schummeln ;-)

      Gruß, Frank

      Reply

Leave a Comment