Skip to main content
mradhika22
Staff
Staff
Mar 27, 2025 8:47 AM UTC

Technical Tip: FortiGate not responding to the FortiSwitch CAPWAP discovery requests

Description

This article describes scenarios where FortiGate is not responding to the CAPWAP discovery requests from FortiSwitch.

Scope

FortiSwitch, FortiExtender, FortiGate.

Solution

Description:

CAPWAP discovery requests reach the FortiGate Fortilink interface, however, the FortiGate is not responding to the CAPWAP request messages from managed FortiSwitches (1) due to the firewall having local-in-policy configured or (2) due to one of the UDP ports required being in use by another process.

  • Verify that the FortiSwitch is sending the CAPWAP discovery requests to the FortiGate.

  • Take a simultaneous packet capture from FortiGate to identify if the FortiGate is responding to the CAPWAP discovery or ICMP request packets :

FortiGate sniffer from CLI: To perform a sniffer trace in the CLI.

 

Or, FortiGate sniffer from the GUI: Troubleshooting Tip: Packet Capture on FortiOS GUI.

 

  •  If the FortiGate is not responding to the CAPWAP discovery request, ensure that the following processes are running in FortiGate using the command 'diagnose sys top':


fortilinkd
cu_acd
cw_acd
cw_acd_helper
acd 

 


diagnose debug reset
diagnose debug flow trace stop
diagnose debug flow filter clear
diagnose debug flow filter addr 10.255.1.2
diagnose debug flow filter port 5246
diagnose debug flow show function-name enable
diagnose debug console timestamp enable
diagnose debug flow trace start 999
diagnose debug enable

 

FortiGate-60E # 2025-03-26 01:52:15 id=65308 trace_id=12 func=print_pkt_detail line=5886 msg="vd-root:0 received a packet(proto=17, 10.255.1.2:5246->224.0.1.140:5246)
tun_id=0.0.0.0 from fortilink. "
<snip>
2025-03-26 01:52:15 id=65308 trace_id=12 func=iprope_policy_group_check line=4894 msg="after check: ret-no-match, act-drop, flag-00000000, flag2-00000000"
2025-03-26 01:52:15 id=65308 trace_id=12 func=__iprope_check line=2395 msg="gnum-100001, check-5f029ff4"
2025-03-26 01:52:15 id=65308 trace_id=12 func=__iprope_check_one_policy line=2133 msg="checked gnum-100001 policy-1, ret-matched, act-accept"
2025-03-26 01:52:15 id=65308 trace_id=12 func=__iprope_user_identity_check line=1894 msg="ret-matched"
2025-03-26 01:52:15 id=65308 trace_id=12 func=__iprope_check_one_policy line=2366 msg="policy-1 is matched, act-drop"
2025-03-26 01:52:15 id=65308 trace_id=12 func=__iprope_check line=2414 msg="gnum-100001 check result: ret-matched, act-drop, flag-08010000, flag2-00000000"
2025-03-26 01:52:15 id=65308 trace_id=12 func=iprope_policy_group_check line=4894 msg="after check: ret-matched, act-drop, flag-08010000, flag2-00000000"
2025-03-26 01:52:15 id=65308 trace_id=12 func=fw_local_in_handler line=611 msg="iprope_in_check() check failed on policy 1, drop"


An example configuration of the firewall local-in-policy that could block the CAPWAP traffic is as follows:

config firewall local-in-policy
    edit 1
        set uuid b0036cc6-0a1d-51f0-d0b3-42036f43bacf
        set intf "any"
        set srcaddr "fortilink/any"
        set srcaddr-negate disable
        set dstaddr "all"
        set internet-service-src disable
        set dstaddr-negate disable
        set action deny
        set service "ALL"
        set service-negate disable
        set schedule "always"
        set status enable
        set comments ''
    next
end


If no evidence of a policy drop is found, the lack of responses to CAPWAP discovery requests may have a different root cause.

Received and accepted CAPWAP packets need to be processed by relevant processes in FortiOS.

To gain further insight into the processing of these CAPWAP messages, capture debug output of the cw_acd process:

diagnose debug console timestamp enable
diagnose debug application cw_acd 0x7f
diagnose debug enable


2026-06-11 13:01:35 00000.018 110 cwUdpSocketInit: bind failed for sock (23) --Address already in use
2026-06-11 13:01:35 00000.019 110 cwAcStartDataPort: failed to get socket UDP (-1) for capwap data
2026-06-11 13:01:35 00000.019 110 cwACInit1: failed to setup ha socket (-1) for capwap data pub
2026-06-11 13:01:35 00000.019 110 /bin/cw_acd/main: cwACInit0() failed.


The debug commands above confirm that one of the required UDP ports is already in use, which is rare to occur.

Running the 'diagnose sys udpsock' command will provide details of the UDP ports in use and the applications using those ports:

diagnose sys udpsock
...
0.0.0.0:5246->0.0.0.0:0 state= txq=0 rxq=0 uid=0 inode=360876860 process=5757/cw_acd
0.0.0.0:5247->0.0.0.0:0 state= txq=0 rxq=0 uid=0 inode=360876871 process=5758/dnsproxy

 

Resolution:

  • For the first problem scenario, disable the local-in-policy if it is not required:

 

config firewall local-in-policy
    edit 1
        set intf "any"
        set srcaddr "fortilink"
        set srcaddr-negate disable
        set dstaddr "all"
        set internet-service-src disable
        set dstaddr-negate disable
        set action deny
        set service "ALL"
        set service-negate disable
        set schedule "always"
        set status disable
    next
end

 

  • As the local-in policy controls the inbound traffic going to a FortiGate interface, specify the interface or the source address so that the FortiLink interface will be excluded.

 

For more details on local-in-policy, see Local-in policy and Troubleshooting Tip: Debug flow messages 'iprope_in_check() check failed, drop' - 'Denied by forward policy check' - 'reverse path check fail, drop' - 'iprope_in_check() check failed on policy 0, drop".

  • For the second problem scenario, which is more likely to occur: reboot the firewall to resolve the issue. All processes will restart from scratch and each process will bind to each of its required ports in sequence. Specifically, cw_acd should bind to UDP 5246–5249.

  • If a firewall restart is not possible, restart only the internal daemon or process that has bound to the conflicting UDP port with either one of the following commands using <daemon_name> or its <pid> as an argument:


diagnose test application <daemon_name> 99


Or:

diagnose sys kill 15 <pid>


After releasing that port by restarting the identified process, cw_acd can bind to all required ports, and CAPWAP packets can be processed and forwarded to the relevant daemons.

    Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
    Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT