I have a simple site-to-site IPSec VPN where "server-A" is connected to a "fw-A" over an IPSec tunnel. In front of "server-A" there is a switch with has a 1500 byte MTU interface facing the server. Sometimes clients behind "fw-A" send large packets to "server-A" and server replies with ICMP "unreachable; frag needed" messages:
11:19:22.309296 IP 10.10.10.135 > 192.168.100.4: ICMP 10.10.10.135 unreachable - need to frag (mtu 1438), length 36
10.10.10.135
is the IP address on "server-A" eth0 interface and
192.168.100.4
is the IP address of the end-client.
Am I correct that ICMP "unreachable; frag needed" messages are sent only in case (server acting as) a router wants to route a package to another interface, but this interface has a smaller MTU than the package and router is not allowed to fragment this package because DF flag is set? If yes, then "server-A" does not do any routing. Simply the package should traverse routing decision twice- first time when package has ESP header and second time when it doesn't. In both occasions destination is 10.10.10.135
and MTU for this path should be 65536 bytes:
# ip route get 10.10.10.135
local 10.10.10.135 dev lo src 10.10.10135
cache <local>
# ip link show dev lo
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
#
Could somebody explain this behavior?
unreachable; frag needed
message in my initial post, then this is atcpdump
output. – Martin Feb 20 '17 at 08:35