Created on 02-17-2011 06:25 AM
Hi folks we' re experiencing a weird IPsec latency issue on a Version: Fortigate-310B v4.0,build0196,100319 (MR1 Patch 4) with policy based vpn, where we' ve run out of ideas how to further diagnose and possibly fix this issue. The problem is that " large" packages aren' t properly sent out the external Fortigate interface into the vpn tunnel. Where " large" seems to start with 484 bytes, and where this behavior is consistently reproducible e.g. with pings. Example: client 95.10.11.12 <-vpn-> 129.20.0.2 firewall <-lan-> 129.24.60.8 ( Note: ip addresses are fake ... ) External IPsec client 95.10.11.12 sends a 418 byte payload ping through the tunnel into our net $ ping -c 1 -s 418 129.24.60.8 and on firewall we' re seeing # diagnose sniffer packet any ' ( host 95.10.11.12 and esp ) or ( host 129.24.60.8 and icmp )' 4 interfaces=[any] filters=[( host 95.10.11.12 and esp ) or ( host 129.24.60.8 and icmp )] 2.304990 port2 in 95.10.11.12 -> 129.20.0.2: ip-proto-50 484 2.304990 VPN_GW_0 in 129.24.90.10 -> 129.24.60.8: icmp: echo request 2.305070 port1 out 129.24.90.10 -> 129.24.60.8: icmp: echo request 2.305393 port1 in 129.24.60.8 -> 129.24.90.10: icmp: echo reply 2.305417 VPN_GW_0 out 129.24.60.8 -> 129.24.90.10: icmp: echo reply 2.305454 port2 out 129.20.0.2 -> 95.10.11.12: ip-proto-50 484 So far so good. But with a larger packet size the ping response gets stuck in the firewall: $ ping -c 1 -s 800 129.24.60.8 21.638467 port2 in 95.10.11.12 -> 129.20.0.2: ip-proto-50 868 21.638467 VPN_GW_0 in 129.24.90.10 -> 129.24.60.8: icmp: echo request 21.638558 port1 out 129.24.90.10 -> 129.24.60.8: icmp: echo request 21.638812 port1 in 129.24.60.8 -> 129.24.90.10: icmp: echo reply 21.638827 VPN_GW_0 out 129.24.60.8 -> 129.24.90.10: icmp: echo reply The final esp response on port2 is missing. Interestingly enough, when sending another smaller ping, the missing packet is pushed out: $ ping -c 1 -s 418 129.24.60.8 54.701092 port2 in 95.10.11.12 -> 129.20.0.2: ip-proto-50 484 54.701092 VPN_GW_0 in 129.24.90.10 -> 129.24.60.8: icmp: echo request 54.701187 port1 out 129.24.90.10 -> 129.24.60.8: icmp: echo request 54.701546 port1 in 129.24.60.8 -> 129.24.90.10: icmp: echo reply 54.701561 VPN_GW_0 out 129.24.60.8 -> 129.24.90.10: icmp: echo reply 54.701606 port2 out 129.20.0.2 -> 95.10.11.12: ip-proto-50 868 54.701609 port2 out 129.20.0.2 -> 95.10.11.12: ip-proto-50 484 as you can see on the second last line. So that 800 byte payload ping response packet was stuck in the firewall about half a minute. We' ve dug a little deeper with " debug flow" , and this is what we found: 2011-02-17 14:49:17 id=36870 trace_id=417 func=resolve_ip_tuple_fast line=3276 msg=" vd-root received a packet(proto=1, 129.24.90.10:45673->129.24.60.8:8) from VPN_GW_0." 2011-02-17 14:49:17 id=36870 trace_id=417 func=resolve_ip_tuple line=3398 msg=" allocate a new session-15b612f5" 2011-02-17 14:49:17 id=36870 trace_id=417 func=vf_ip4_route_input line=1609 msg=" find a route: gw-129.24.60.8 via port1" 2011-02-17 14:49:17 id=36870 trace_id=417 func=fw_forward_handler line=440 msg=" Allowed by Policy-104:" 2011-02-17 14:49:17 id=36870 trace_id=418 func=resolve_ip_tuple_fast line=3276 msg=" vd-root received a packet(proto=1, 129.24.60.8:45673->129.24.90.10:0) from port1." 2011-02-17 14:49:17 id=36870 trace_id=418 func=resolve_ip_tuple_fast line=3312 msg=" Find an existing session, id-15b612f5, reply direction" 2011-02-17 14:49:17 id=36870 trace_id=418 func=vf_ip4_route_input line=1609 msg=" find a route: gw-129.24.90.10 via VPN_GW_0" 2011-02-17 14:49:17 id=36870 trace_id=418 func=ipsecdev_hard_start_xmit line=122 msg=" enter IPsec interface-VPN_GW_0" 2011-02-17 14:49:17 id=36870 trace_id=418 func=esp_output4 line=467 msg=" encrypted, and send to 95.10.11.12 with source 129.20.0.2" # here the delay is happening (in this case 7 seconds) 2011-02-17 14:49:24 id=36870 trace_id=418 func=ipsec_output_finish line=138 msg=" send to 129.20.0.1 via intf-port2" This is from a trace where we had a 7 second delay. And it' s apparently happening right in " ipsec_output_finish" . Now, this can' t be MTU, which is 1500. Also, we' re seeing no " frag needed" response from whichever party. The route 129.20.0.1 is static and properly working for all other traffic. So, maybe somebody has some advice how to further proceed from here? It' d sure be appreciated, because right now we' re at a loss ... Thanks a bunch, G.
PCNSE
NSE
StrongSwan
Created on 02-17-2011 10:51 AM
PCNSE
NSE
StrongSwan
Bob - self proclaimed posting junkie!
See my Fortigate related scripts at: http://fortigate.camerabob.com
Created on 02-18-2011 05:50 AM
# diag hardware device nic port2 Driver Name: NP2 Version: 0.92 Chip Revision: 2 BoardSN: N/A Module Name: 310B DDR Size: 256 MB Bootstrap ID: 11 PCIX-64bit-@133MHz bus: 03:01.0 Admin: up MAC: 00:09:0f:09:30:02 Permanent_HWaddr: 00:09:0f:89:15:5e Link: up Speed: 1000Mbps Duplex: Full Rx Pkts: 4174984716 Tx Pkts: 1709646918 Rx Bytes: 3677915136 Tx Bytes: 2100737024 MAC0 Rx Errors: 0 MAC0 Rx Dropped: 0 MAC0 Tx Dropped: 0 MAC0 FIFO Overflow: 0 MAC0 IP Error: 0 TAE Entry Used: 5 TSE Entry Used: 0 Host Dropped: 15 Shaper Dropped: 85 EEI0 Dropped: 0 EEI1 Dropped: 0 EEI2 Dropped: 0 EEI3 Dropped: 0 IPSEC QFIFO Dropped: 0 IPSEC DFIFO Dropped: 0 PBA: 123/1019/251 Forwarding Entry Used: 0 Offload IPSEC Antireplay ENC Status: Disable Offload IPSEC Antireplay DEC Status: Disable Offload Host IPSEC Traffic: Disable3com 4200G:
>display interface GigabitEthernet1/0/1 GigabitEthernet1/0/1 current state : UP IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 0024-733d-eb63 Media type is twisted pair, loopback not set Port hardware type is 1000_BASE_T 1000Mbps-speed mode, full-duplex mode Link speed type is autonegotiation, link duplex type is autonegotiation Flow-control is not enabled The Maximum Frame Length is 1522 Broadcast MAX-pps: 3000 Unicast MAX-ratio: 100% Multicast MAX-ratio: 100% Unknown Multicast Packet drop: Disable Unknown Unicast Packet drop: Disable Forbid jumbo frame to pass PVID: 1 Mdi type: auto Port link-type: access Tagged VLAN ID : none Untagged VLAN ID : 1 Last 300 seconds input: 725 packets/sec 280476 bytes/sec Last 300 seconds output: 1023 packets/sec 1215396 bytes/sec Input(total): 7997813332 packets, - bytes - broadcasts, - multicasts, - pauses Input(normal): 7997813332 packets, 3653700343084 bytes 201 broadcasts, 281 multicasts, 0 pauses Input: 0 input errors, 0 runts, 0 giants, - throttles, 0 CRC 0 frame, 0 overruns, 0 aborts, - ignored, - parity errors Output(total): 10065435185 packets, - bytes - broadcasts, - multicasts, - pauses Output(normal): 10065435185 packets, 10461332485707 bytes 842269 broadcasts, 117663100 multicasts, 0 pauses Output: 0 output errors, - underruns, - buffer failures 0 aborts, 0 deferred, 0 collisions, 0 late collisions - lost carrier, - no carrier
Rackmount your Fortinet --> http://www.rackmount.it/fortirack
Created on 02-18-2011 08:30 AM
Created on 03-07-2011 12:40 AM
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1748 | |
1114 | |
765 | |
447 | |
241 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.