Re: Understanding path MTU discovery
- From: David Brown <david@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 02 Feb 2007 10:44:25 +0100
Rick Jones wrote:
David Brown <david.brown@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:Can someone confirm or correct my understanding of path MTU
discovery regarding packets passing through a linux router/firewall
to a server on a DMZ? As far as I can tell from my reading, if a
computer on the internet accesses our web server, but the reply from
the server is too big (for example, the client computer is using a
PPPoE link with an MTU of 1492), the client's ISP's gateway router
will send an ICMP package back to our router. The router will see
this as a "related" packet, and pass it on to the web server in the
DMZ, and the web server will use the smaller packet size for the
rest of the connection.
Assuming that there wasn't anything filtering the requisite ICMP
messages in the name of security.
I gather that this is becoming a problem, with many firewalls being set to filter out the relevant ICMP messages "in the name of security". Our current firewall/router (an old ZyWall 10, to be replaced by a linux or possibly bsd box) blocks all ICMP messages, so I've had no choice but to force the server's Ethernet port to use an MTU of 1492 for compatibility with some clients. That works, but is not really ideal. As far as I can see, allowing "related" ICMP packets through should cover the required messages while blocking any other ICMP's.
Will the web server machine remember that lower MTU as being
connected to the client's IP address, so that future connections by
the client will avoid the overhead of the path MTU discovery, or
will the discovery be needed for each new connection? I presume the
lower MTU will not be needed for connections to/from other IP
addresses.
Typically a host route for that client's IP address is created in the
server's routing table. This route has a timer associated with it to
a) reset the PathMTU back to link-local and later b) remove the route
entirely if idle. So, it will be rememebered so long as the new
connections to the same client IP happen within the timeouts.
For the second question, indeed the lower PathMTU will not be used for
connections to/from other IP addresses.
Excellent - thanks for that information.
What will happen if our router has more than one route back to the
client (i.e., two DSL links)? I understand that I could mark
incoming packets from clients so that replies are sent out through
the same interface they came in, but I would prefer to balance the
output packets (downstream ADSL has more than enough bandwidth for
web server requests, but it would be best to take advantage of two
upstream links for replies). Suppose the client's original request
comes in via eth0, gets passed on to the server on eth2, and the
reply happens to go out on eth1 via the other ADSL line. The ICMP
packet complaining about the MTU size is going to be sent back to
the eth1 address - will that still count as "related" and therefore
be passed on to the web server?
On that one I've no idea, other than to say that the ICMP messages
will be send based on the source IP address in the TCP segment which
triggered it, and the source IP (as well as destination IP and the
local/remote port numbers) will be invariant for a connection
regardless of the path it takes.
The source IP will not be invariant for packets coming out of the router towards the internet - such packets will have different SNAT addresses depending on which of the two ADSL lines it passes through (each line has its own Ethernet port on the router, and they have different public IP addresses). I think I'm going to have to read a bit more about exactly how SNAT is implemented and how "related" states are determined, so that I can see what happens here.
Thanks,
David
rick jones.
- Follow-Ups:
- Re: Understanding path MTU discovery
- From: Rick Jones
- Re: Understanding path MTU discovery
- References:
- Understanding path MTU discovery
- From: David Brown
- Re: Understanding path MTU discovery
- From: Rick Jones
- Understanding path MTU discovery
- Prev by Date: Port Forwarding -All ports shown as "Stealth"
- Next by Date: weird behaviour with slackware 11, wrong arp-requests
- Previous by thread: Re: Understanding path MTU discovery
- Next by thread: Re: Understanding path MTU discovery
- Index(es):
Relevant Pages
|