* Output on raw sockets ignores IP_DF when packet is bigger than pmtu
@ 2003-03-06 16:01 Raghurama 'REDDY'
2003-03-06 18:30 ` Sridhar Samudrala
0 siblings, 1 reply; 2+ messages in thread
From: Raghurama 'REDDY' @ 2003-03-06 16:01 UTC (permalink / raw)
To: NETDEV; +Cc: RREDDY
Hello!
We are looking at the "traceroute" code, in particular the behavior of
the "-M" option (path MTU discovery) on a 2.4.20 kernel.
In attempting to get a "Framentation required message" from an
intermediate router, the code does the following:
- Open a raw socket
- Send a packet that is smaller than interface MTU but
bigger than the MTU of an intermediate router with IP_DF set
(the NIC has an MTU of 4400, and pmtu is 1500).
What is observed is that when route cache is flushed, it works as
expected. We get a "Framentation Required" message from the
intermediate router.
But when the cache is *not* flushed, the packets are fragmented based on
pmtu before sending the packets out on the net, inspite of the fact that
IP_DF is set (based on the tcpdump observations). Is this the right
behavior?
But looking at 2.4.20 kernel code in "include/net/ip.h":
Not sure if "ip_send" is the in the call tree or not; I am *not*
intimately familiar with the code ... :-(
------------------
static inline int ip_send(struct sk_buff *skb)
{
if (skb->len > skb->dst->pmtu)
return ip_fragment(skb, ip_finish_output);
else
return ip_finish_output(skb);
}
------------------
This seems to indicate that it would fragment the packet if the packet
is bigger than path MTU irrespetive of the IP_DF flag.
Is there a way to get the host to not fragment when IP_DF is set,
iresspective what the pmtu is?
Thanks!
--rr
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Output on raw sockets ignores IP_DF when packet is bigger than pmtu
2003-03-06 16:01 Output on raw sockets ignores IP_DF when packet is bigger than pmtu Raghurama 'REDDY'
@ 2003-03-06 18:30 ` Sridhar Samudrala
0 siblings, 0 replies; 2+ messages in thread
From: Sridhar Samudrala @ 2003-03-06 18:30 UTC (permalink / raw)
To: Raghurama 'REDDY'; +Cc: NETDEV, RREDDY
On Thu, 6 Mar 2003, Raghurama 'REDDY' wrote:
> Is there a way to get the host to not fragment when IP_DF is set,
> iresspective what the pmtu is?
You can disable pmtu discovery on a socket using the IP level socket option
IP_MTU_DISCOVER.
System wide pmtu discovery can be disabled by setting
/proc/sys/net/ipv4/ip_no_pmtu_disc
-Sridhar
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-03-06 18:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-06 16:01 Output on raw sockets ignores IP_DF when packet is bigger than pmtu Raghurama 'REDDY'
2003-03-06 18:30 ` Sridhar Samudrala
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).