Showing posts with label DHCP. Show all posts
Showing posts with label DHCP. Show all posts

Wednesday, 8 January 2014

DHCP Option 43 for Meru APs (using a Cisco Router/Switch DHCP Server)

Meru access points, like many other controller-based APs, can use DHCP option 43 to acquire the address of the wireless LAN controller that they need to join.

In brief, controller-based APs need to find their way back to a controller to obtain their operating code and parameters. Out-of-the-box, they don't know the IP address of the controller they should be talking to. When they are hooked to a wired network, they will request an IP address via DHCP. The DHCP process can also be used to pass them the address of the wireless LAN controller they should be speaking with (in addition to the usual parameters such as IP address, mask, default gateway etc.).

DHCP option 43 is used to pass the WLC IP address information to the AP. However,  figuring out the format of the information that should be put in to the option 43 field can be something of a challenge, depending on the DHCP server you are using.

I recently had to set up a DHCP server on a Cisco switch to provide IP addressing and DHCP option 43 to some Meru APs. I thought it would be worth sharing this information, as it wasn't immediately obvious.

My setup:
  • AP Network: 192.168.20.0/24
  • WLC address: 192.168.50.12  

The option 43 string that is passed to the AP has to be constructed in the following format:
  • byte 1: '43' in hex (2b) - this is to tell the AP that we are actually using 'Vendor option 43' within the standard DHCP option 43 (I know, it's confusing...trust me, it's always 43)
  • byte 2: '13' in hex (0d) - this is the length of the vendor option payload (in bytes) that follows - this will need to vary depending on the length of the WLC IP address
  • byte 3 onwards: the remainder of the bytes are the WLC IP address string ascii characters (including '.' characters)
Putting all of this together, here is the final DHCP configuration applied to the Cisco switch which will provide an example of how to put this together:

!
! Cisco DHCP Configuration - vWLC address = 192.168.50.12
!
ip dhcp pool APs
   network 192.168.20.0 255.255.255.0
   default-router 192.168.20.254
   dns-server 8.8.4.4
   option 43 hex 2b0d.3139.322e.3136.382e.3530.2e31.32

Notes:

Option 43 break-down:

2b = Vendor option 43
0d = length of vendor option payload in bytes (13 bytes/characters in this case)
31 - ascii "1"
39 - ascii "9"
32 - ascii "2"
2e - ascii "."
...etc.

Monday, 15 April 2013

Aerohive AP DHCP Option 226 in Cisco IOS

Just a quick note to myself (as well as sharing for anyone interested)...

Aerohive APs can be told where to find Hive Manager using DHCP option 225 (for the HM name) or option 226 (for the HM IP address). - (see here for a much better explanation)

I tried to set up the DHCP option 226 for an Aerohive AP today to tell it where to find Hive Manager in my lab. The DHCP server I am using is a Cisco IOS switch. I couldn't get the AP to accept the option for some reason.

After lots of playing about, I finally figured out what my issue was: I was using the 'ascii' keyword for the option type, when it should have been the 'ip' type (...yes, it's always obvious in retrospect).

Here is the correct configuration for a DHCP scope in case you find yourself in the same position:


! *** only assign addresses above .150 ***
!
ip dhcp excluded-address 192.168.50.1 192.168.50.150
ip dhcp excluded-address 192.168.50.254
!
ip dhcp pool AP-VLAN
   network 192.168.50.0 255.255.255.0
   default-router 192.168.50.254
   dns-server 8.8.4.4
   option 226 ip 192.168.50.7