[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Setting MTU size for ppp0



Sven Nielsen wrote:
This perhaps needs a little more in-depth knowledge:

I am trying to limit MTU size on ppp0 to below 1492 (that is, I want 1412) because my (new) linux machine has to masquerade for my roommate (winXP home). I set up pppoe with pppoeconf which configures MTU for ppp0 to 1492.

I did manage to set up masquerading:

#iptables -t nat -A POSTROUTING -j MASQUERADE
#echo 1 > /proc/sys/net/ipv4/ip_forward

Masquerading works fine.
No other rules configured in no other tables and/or chains.
(I haven´t secured this setup yet, so no other rules present.)

PROBLEM IS: my attempts to limit MTU to 1412 are ignored.
tried adding "mtu 1412" to
/etc/ppp/peers/dsl-provider
/etc/ppp/options

still, after reboot or after poff -> ifdown -> ifup -> pon dsl-provider, ifconfig always reports ppp0 with MTU: 1492. Also tried #pppd noauth mtu 1412 while ppp0 is already active, no effect.

Is some other script overriding my attempts ?

The reason I want to limit MTU is also a special one. My rommmate gets access to every page, EXCEPT ebay!, and I (randomly) guess this to be connected with MTU size. If I am wrong I will have to dig for some other reason, but this is another problem to be solved later.

Anybody any clue why setting MTU is ignored ??
Is it really ignored? I'm not shure - on my router ifconfig reports the same as yours, but ps shows "/usr/sbin/pppoe -I eth1 -T 80 -m 1452".

What you should try is calling iptables with this line:

#iptables  -I FORWARD  -p tcp  --tcp-flags SYN,RST SYN \
-j TCPMSS --clamp-mss-to-pmtu

This is called MSS-clamping and influences the amount of data per TCP packet.

Might help in the situation you describe.

fred




Reply to: