Chapter 11 IPsec VPN for FortiOS 5.0 : GRE over IPsec (Cisco VPN) : Using diagnostic commands
  
Using diagnostic commands
There are some diagnostic commands that can provide useful information. When using diagnostic commands, it is best practice that you connect to the CLI using a terminal program, such as puTTY, that allows you to save output to a file. This will allow you to review the data later on at your own speed without worry about missed data as the diag output scrolls by.
To use the packet sniffer
1. Enter the following CLI command:
diag sniff packet any icmp 4
2. Ping an address on the network behind the FortiGate unit from the network behind the Cisco router.
The output will show packets coming in from the GRE interface going out of the interface that connects to the protected network (LAN) and vice versa. For example:
114.124303 gre1 in 10.0.1.2 -> 10.11.101.10: icmp: echo request
114.124367 port2 out 10.0.1.2 -> 10.11.101.10: icmp: echo request
114.124466 port2 in 10.11.101.10 -> 10.0.1.2: icmp: echo reply
114.124476 gre1 out 10.11.101.10 -> 10.0.1.2: icmp: echo reply
3. Enter CTRL-C to stop the sniffer.
To view debug output for IKE
1. Enter the following CLI commands
diagnose debug application ike -1
diagnose debug enable
2. Attempt to use the VPN or set up the VPN tunnel and note the debug output.
3. Enter CTRL-C to stop the debug output.
4. Enter the following command to reset debug settings to default:
diagnose debug reset