CAPWAP discovery — AP joins controller via DHCP option-138
- Services & wireless
- Advanced
- 15 min
- 3 steps
- Cisco IOS-XE-style
Walk an AP through the CAPWAP discovery + join lifecycle. ROUTER serves DHCP with option-138 pointing at WLC1's management IP; on lease ACK, AP1 stamps the controller IP into its apJoin slot, finds WLC1 in the topology, matches its MAC against an apRecord, and flips to phase: joined with the flattened policy/site/rf tags.
Open this lab in your browser →
Free · no install · no account
Scenario
Slices A–D let you express and inspect the controller-managed wireless model end-to-end on the controller. Slice E closes the loop: the AP itself discovers the controller and joins it. The CAPWAP discovery flow this lab models: 1. The AP boots with ipFromDhcp: true and broadcasts a DHCPDISCOVER. 2. ROUTER's DHCP server replies with an OFFER, and on REQUEST sends an ACK that includes option-138 (RFC 5417) carrying WLC1's management IP. 3. AP1's DHCP client picks up the lease as usual, *and* additionally stamps the option-138 IP into its apJoin.controllerIp slot. The phase becomes discovered. 4. The engine then walks the topology: which device owns that IP? In our case WLC1. WLC1 has an apRecord matching AP1's primary MAC (aabb.cc00.dd00)? Yes. So phase flips to joined, and the apRecord's policy/site/rf tag triplet is *flattened* into AP1's apJoin state. 5. AP1 now has its effective config without ever reaching back into the controller's IR — denormalised on purpose so the runtime can read tags directly. Inspect both sides: `` AP1# show capwap client summary WLC1# show capwap ap summary ` The negative paths surface as diagnostics: - No apRecord matches the AP's MAC → phase: rejected, with a reason like no apRecord for aabb.cc00.dd00 on controller 'WLC1'. - The option-138 IP doesn't belong to any device → phase: discovered` (we know an AC IP but no device claims it; you'd see this in production when the controller is unreachable). Slice E ships discovery + join *state*. Actual datapath through the CAPWAP tunnel — wireless-client packets riding into the controller and coming out into the policy-profile's egress VLAN — is forward work for Slice F.
Topology
1 × router, 1 × wireless controller, 1 × switch, 1 × access point · Cisco IOS-XE-style
ROUTER— routerWLC1— wireless controllerHUB— switchAP1— access point
What you will do
On ROUTER, build DHCP pool
LAN(10.0.0.0/24, gateway 10.0.0.1) and advertise option-138 with WLC1's IP (10.0.0.10). Exclude .1–.20.On WLC1, build the minimal model: profiles, tags, and an apRecord for
aabb.cc00.dd00(AP1's primary MAC) bound to all three tags.After convergence, AP1 should report
phase: joinedand inherit the three tag bindings from WLC1's apRecord.
Open this lab in your browser →
More labs on this topic
- Configure a DHCP serverBeginner · 12 min
- WLAN — broadcast a basic SSIDBeginner · 10 min
- HSRP: configure first-hop redundancyIntermediate · 12 min
- NAT: PAT (overload) for an inside LANIntermediate · 14 min
- HSRP — interface tracking with priority decrementIntermediate · 12 min
- VRF-Lite — two customers on one routerIntermediate · 12 min
This lab in other languages
CAPWAP-Erkennung – AP verbindet sich mit dem Controller über DHCP-Option 138Descubrimiento CAPWAP: AP se une al controlador a través de la opción DHCP-138Descoberta CAPWAP – AP junta-se ao controlador via DHCP opção-138Découverte CAPWAP — AP rejoint le contrôleur via l'option DHCP-138CAPWAP खोज - AP DHCP विकल्प-138 के माध्यम से नियंत्रक से जुड़ता हैCAPWAP 发现 — AP 通过 DHCP option-138 加入控制器Rilevamento CAPWAP: l'AP si unisce al controller tramite l'opzione DHCP-138CAPWAP 検出 - AP は DHCP オプション 138 経由でコントローラに接続しますCAPWAP 검색 - AP가 DHCP 옵션-138을 통해 컨트롤러에 연결됩니다.Обнаружение CAPWAP — точка доступа подключается к контроллеру через опцию DHCP-138.CAPWAP keşfi — AP, DHCP seçenek-138 aracılığıyla denetleyiciye katılırKhám phá CAPWAP - AP tham gia bộ điều khiển thông qua tùy chọn DHCP-138