PDA

Bekijk de volledige versie : how can I change the MTU?



velovite
15-04-2007, 10:16
Hi everyone!

In order to solve a connectivity problem from the WAN, I think I need to change the MTU (Maximum Transmission Unit presently set to 1500) to 1492 on the WAN eth port. Anybody knows how to do that?

For those curious about why I think I need that, here is the rationale:

I have my wl700 connected to a DSL ethernet modem (Tecom Hitachi AH 4222), and a few pcs behind the router. I can connect to the internet from the PCs without any noticeable problem, which means routing is working rather well.

However, when I connect to the wl700 from WAN (for instance I can ssh to it -running kurge's firmware+dropbear- or access the built-in asus website), I have very limited connectivity, which means if I issue any command requiring an output from the wl700 larger than ~1.2kb, the transmission never completes and it just hangs forever. I tried to disable the firewall in the dsl modem, but it made no difference.

I traced the problem to being a packet size issue: If, from WAN, I ping -f -l numberofbytes myipadress, it works up to numberofbytes=1464, (which corresponds to a packet length of 1464+28=1492). For slightly larger sises, ping just fails with a timeout, but for sizes still larger it says the packet needs to be split (which it cannot be done because of the -f switch). I read somewhere than MTU=1492 is the maximum MTU for pppoe. To be complete some people argue that this is an ICMP filtering problem along the route, but I don't see how I could fix that.


So, an easy solution would obviously be to change the MTU (presently set to 1500) to 1492 on the WAN eth port. Any other suggestion welcome...

Thanks in advance,
Phil

velovite
15-04-2007, 17:48
All right, I found how to do it:

(sudo) ifconfig eth0 mtu 1492

It's effective immediatly (no need to restart anything), and it works perfectly! I was afraid I would have to edit some file, but it's much more simple. I just need to add this in my rc.local now.

Phil