Thursday, 11 August 2016

Cisco WLC Discovery & Join Methods

In the Cisco Unified Wireless Network (CUWN) architecture, a Wireless LAN Controller provides central configuration and management of Cisco Lightweight Access Points. A Lightweight AP simply cannot cannot operate independently and must join a controller before it can can start to serve wireless clients.  An AP will use a number of methods to discover a list of controllers and their configured management IP addresses before it decides which one to join.

DISCOVERY PROCESS

Upon connecting an AP to the network, the following WLC discovery methods will be attempted:
  1. Broadcast on local subnet
  2. Use a previously configured/discovered list stored on the APs NVRAM
  3. Use DHCP Option 43 provided from DHCP server
  4. Use DNS to resolve "CISCO-CAPWAP-CONTROLLER.localdomain"
Broadcast
The AP will send a CAPWAP Discovery Request message on the local subnet. Any controller that has a management IP address within the same subnet will respond and can be used by the AP.

If there are no controllers located in the same subnet, the router can forward broadcasts (in the form of unicast packets) to the controller. The CAPWAP Discovery Request message is sent on UDP 5246.

Via IOS CLI:
ip forward-protocol udp 5246
interface <interface_name>
     ip helper-address <wlc_ip_address>
NVRAM
This list is built from a number of sources:
  • Previously configured Primary, Secondary & Tertiary controllers
Via WLC GUI:

Via WLC CLI:
config ap primary-base <wlc_name> <ap_name> <wlc_ip_address>
config ap secondary-base <wlc_name> <ap_name> <wlc_ip_address>
config ap tertiary-base <wlc_name> <ap_name> <wlc_ip_address>
Via AP CLI:
config ap controller ip address <wlc_ip_address>
  • Controllers part of a previously joined Mobility Group
DHCP Option 43
DHCP Option 43 is a vendor specific option which the Lightweight APs can also use to locate a controller. The controllers management IP address is entered in hexadecimal in the form of: Type + Length + Value, where;

Type = Always sub code option - 0xf1 (expressed as f1)
Length = Number of controller management IP addresses specified, multiplied by 4.
Value = IP addresses of controllers, listed sequentially

Via IOS CLI:
ip dhcp excluded-address <start_ip <end_ip>
ip dhcp pool <pool_name>
     network <ip_address> <netmask>
     default-router <gateway_ip>
     dns-server <ip_address1> <ip_address2>
     domain-name <domain>
     lease <days> <hours>
     option 43 hex <hex_value>   // e.g. option 43 hex f104.0a5e.dec8
Via Windows Server:
DNS
The AP will attempt to resolve "CISCO-CAPWAP-CONTROLLER.localdomain" to an IP address. This can be done by configuring a Host A Record on the DNS server specified in DHCP.

JOIN PROCESS

Once the AP has built a list of possible controllers, it will attempt to join one of them using the following order:
  1. AP's NVRAM configured Primary controller
  2. AP's NVRAM configured Secondary controller
  3. AP's NVRAM configured Tertiary controller
  4. Least loaded controller learnt through dynamic methods (broadcast, DHCP option 43, DNS)
Once an AP has joined a controller it will forgot about the controllers learnt through the dynamic methods listed in number 4 above.

If an AP is joined to a controller, and that control fails, the AP it will attempt to join another controller using the order below:
  1. AP's NVRAM configured Primary controller
  2. AP's NVRAM configured Secondary controller
  3. AP's NVRAM configured Tertiary controller
  4. WLC's Backup Primary controller
  5. WLC's Backup Secondary controller
  6. Controllers part of the WLC's mobility group membership
If an AP cannot join one of the controllers above, it will reboot and start the re-initialise the discovery process.

VERIFICATION

To confirm what controllers the AP is currently aware of, there are several AP CLI commands available:
show capwap client config



 // LIST OF NVRAM CONFIGURED WLCS (PRIMARY, SECONDARY, TERTIARY)

mwarName                WLC1
mwarIPAddress           10.100.5.1
mwarName                WLC2
mwarIPAddress           10.100.5.2
mwarName                WLC3
mwarIPAddress           10.100.5.3


// LIST OF WLCS IN PREVIOUSLY LEARNT MOBILITY GROUPS

Configured Switch 1 Addr 10.100.5.1
Configured Switch 2 Addr 10.100.5.2
Configured Switch 3 Addr 10.100.5.3
Configured Switch 4 Addr 10.159.44.17
Configured Switch 5 Addr 10.159.44.18

show capwap client ha

// LIST BACKUP PRIMARY & BACKUP SECONDARY WLCS (LOCAL TO CURRENT WLC

primaryBackupWlcIp      10.100.5.2 
primaryBackupWlcName    WLC2
secondaryBackupWlcIp    10.100.5.3 
secondaryBackupWlcName WLC3