Step 1: Access the CLI
- Log in to the FortiGate web interface.
Example for Monitoring WAN1
- Enter the following commands to configure a link monitor for WAN1: (remember to execute one command at a time)
config system link-monitor
edit "WAN1_Monitor"
set srcintf "wan1"
set server "8.8.8.8" # Replace with the IP of the server you want to monitor
set gateway-ip <WAN1 Gateway IP> # Replace with your actual WAN1 gateway IP
set interval 5 # Health check interval in seconds
set timeout 500 # Timeout for each check in milliseconds
set failtime 5 # Number of failed attempts before considering the link down
set recoverytime 5 # Number of successful attempts before considering the link up
next
end
Example for Monitoring WAN2
- Enter the following commands to configure a link monitor for WAN2:
config system link-monitor
edit "WAN2_Monitor"
set srcintf "wan2"
set server "8.8.4.4" # Replace with the IP of the server you want to monitor
set gateway-ip <WAN2 Gateway IP> # Replace with your actual WAN2 gateway IP
set interval 5 # Health check interval in seconds
set timeout 500 # Timeout for each check in milliseconds
set failtime 5 # Number of failed attempts before considering the link down
set recoverytime 5 # Number of successful attempts before considering the link up
next
end
Step 4: Verify the Configuration
- Use the following command to verify the status of the link monitors:
diagnose sys link-monitor status