Selectors & the data path

Tunnel up, no traffic

Lesson 16 of 20 · 12 min · Module 5: Troubleshooting

"The VPN is up but I cannot reach the server" is a different problem from a tunnel that is down, and the negotiation log will not help you with it.

Start this lesson →

Free. No installation: you write and run the code in your browser, and it is checked automatically.

By the end, you’ll be able to…

  • Compare failing traffic with the installed selectors
  • Recognise a narrowed selector as a cause
  • Correct a selector for a larger remote network

The idea

When every stage succeeds and traffic still does not arrive, the question is no longer did they agree but what did they agree on. Compare the installed selectors with the addresses of the traffic that fails. The usual causes are a network missing from the selectors, a selector that was narrowed, and plain ESP being lost behind NAT.

# installed:  10.0.1.0/24 <-> 10.1.0.0/24
# failing:    10.0.1.25 -> 10.1.1.20      (10.1.1.20 is not in 10.1.0.0/24)

01Start from one failing packet

Get a source and a destination address from the person who reported the problem. Then look at the installed selectors and ask whether that pair of addresses is inside one of them.

02Read the prefix lengths

The branch now has two networks, 10.1.0.0/24 and 10.1.1.0/24, and announces them as 10.1.0.0/23. This side still asks for 10.1.0.0/24, so the peer narrows the child SA to the old network. The tunnel is up and the new network is unreachable.

03Check the data path on real devices

The SA counters show whether packets are being encrypted and decrypted. Encrypted packets rising while decrypted packets stay at zero points to the return path or to the other side.

# FortiGate: selectors and packet counters per tunnel
diagnose vpn tunnel list name to-branch

# Huawei USG
display ipsec sa
display ipsec statistics

# Cisco IOS: look for "pkts encaps" and "pkts decaps"
show crypto ipsec sa peer 198.51.100.2

Your turn

The tunnel is up, and the old branch server 10.1.0.8 answers. The new branch server 10.1.1.20 does not. The branch moved to the larger network 10.1.0.0/23, which contains both. Correct the selector on this side.

What the checks look for

  • The old branch server is still reachable
  • The new branch server is reachable, in both directions
  • The installed selector is the configured one
  • Nothing else was changed
Try it in the editor →

Take this with you

With the tunnel up, troubleshoot the data path: take one failing pair of addresses and check it against the installed selectors.

Go a little further

Use 10.1.0.0/16 as the remote network instead and run the lab. The traffic passes, and the Output tab shows what the peer really installed.

Learn VPN & IPsec Foundations for free

20 short lessons with real code and instant checks.

See the whole course →