How to check why FortiAP got Offline from FortiGate

If the AP lost its channel connection with FortiGate you can check to see if the AP has just lost the contact with firewall missing the heartbeat or if has got rebooted for any reason.

Points to remember:

*Forti AP reboot only if has any power issue.

*FortiAP had any Software crash or kernal panic.

>>Following command on FortiGate can give you an idea why the AP is offline in FortiGate:

 

#Scene 1 :If the AP is offline because of any operation initiated from controller/FortiGate (changes that needs a AP reboot)

——————————-WTP 1—————————-
WTP vd : root
vfid : 0
id : FP221B3X12007124
mgmt_vlanid : 0
region code : N
regcode status : invalid
refcnt : 2 own(1) wtpprof(1)
plain_ctl : disabled
deleted : no
admin : enable
cfg-wtp-profile : praveen_wifi_integrated
override-profile : enabled
oper-wtp-profile : resv-dflt-FP221B3X12007124
wtp-mode : normal
wtp-group :
name :
location :
led-state : enabled
ip-frag-prevent : TCP_MSS
tun-mtu : 0,0
split-tunneling-local-ap-subnet : disabled
active sw ver : FP221B-v5.2-build0254
local IPv4 addr : 192.168.242.63
board mac : 00:09:0f:7c:1a:70
join_time : Tue Jan 17 13:51:56 2017
mesh-uplink : ethernet
mesh hop count : 0
parent wtp id :
connection state : Disconnected
image download progress: 0
last failure : 8 — AC daemon reset timer expired –<change caused AP reboot>     
last failure param: N/A
last failure time: Tue Jan 17 13:52:01 2017
station info : 0/0

 

#Scene 2: On the other hand FortiGate is reporting that the Heatbeat timed out and so the AP went offline.

#diagnose  wireless-controller  wlac -c wtp

——————————-WTP 1—————————-
WTP vd : root
vfid : 0
id : FP221B3X12007124
mgmt_vlanid : 0
region code : N
regcode status : invalid
refcnt : 3 own(1) wtpprof(1) ws(1)
plain_ctl : disabled
deleted : no
admin : enable
cfg-wtp-profile : praveen_wifi_integrated
override-profile : enabled
oper-wtp-profile : resv-dflt-FP221B3X12007124
wtp-mode : normal
wtp-group :
name :
location :
led-state : enabled
ip-frag-prevent : TCP_MSS
tun-mtu : 0,0
split-tunneling-local-ap-subnet : disabled
active sw ver : FP221B-v5.2-build0254
local IPv4 addr : 192.168.242.63
board mac : 00:09:0f:7c:1a:70
join_time : Tue Jan 17 13:41:18 2017
mesh-uplink : ethernet
mesh hop count : 0
parent wtp id :
connection state : Connected
image download progress: 0
last failure : 14 — ECHO REQ is missing        … <heatbeat missed>
last failure param: N/A
last failure time: Tue Jan 17 13:40:39 2017     …<Failure time>
station info : 0/0
geo : World (0)
LLDP : disabled
Radio 1 : AP

So FortiGate just reported its a heatbeat miss from AP that cause AP go offline and Wifi service interrupted.

*Here we need to find the reason if its the network or the AP itself didn’t sent out the heatbeat.

*Log into the AP and check to see if the AP got rebooted or even AP reports that WTP is  what its has  has to reconnect.

*To TELNET from FortiGate into the AP,Command ## execute telnet <dest>    IP address.

*Check the Uptime on AP,#cw_diag uptime

Log1:

FP221B3XXXXXXXXX # cw_diag uptime
Could not open fsm RUN uptime file /tmp/uptime_fsm_run.
Current uptime : 1567338
WTP daemon start uptime : 1565549                                         <Ap never got rebooted>
WTP daemon RUN uptime : 1567338
Time since WTP daemon started : 1789   
Time since WTP daemon connected : 0                        <Did loose the contact with FGT>

Watchdog timer triggered : 0
Watchdog timer action : 3
Watchdog timer time : 27

Log2:

FP221B3XXXXXXXX # cw_diag uptime
Could not open fsm RUN uptime file /tmp/uptime_fsm_run.
Current uptime : 78                                                                     <AP got rebooted>
WTP daemon start uptime : 31
WTP daemon RUN uptime : 78
Time since WTP daemon started : 47
Time since WTP daemon connected : 0

Watchdog timer triggered : 0
Watchdog timer action : 3
Watchdog timer time : 29

*By this way you could narrow down the issues and so next time could help to find Route Cause of the issue.

Other Handy AP commands:

>cfg -s
>fap-get-status
>cw_diag uptime
>cw_diag sys-performance
>iwconfig
>diag_debug_crashlog read
>cw_diag -c wtp-cfg
>cw_diag -c radio-cfg
>cw_diag -c vap-cfg
>cw_diag kernel-panic
>dmesg
>rcfg
>klog