我用的是 MacPro, 使用软件 FileZilla
I can browse files in my FTP Client, but when I upload files, the client hangs for a few seconds, then thinks it uploaded the files successfully, but it only creates a new file with one blank line in it. Sometimes, it manages to upload 4-5 lines.
The problem goes away when you take the router and connect directly through PPPoEAt first blush the problem is with the router. But no, the problem is with the Mac that connects through a router that connects through a PPPoE and tries to upload using FTP. Pretty specific, I know.The problem is with the MTU (maximum transmission unit). Apparently, Mac OS X breaks the file into chunks that are too large for the router to send, because the router's MTU was set lower than Mac OS X's.The router here was 1492, which is okay, but where the Mac's MTU is 1500, this is unacceptable. Don't really understand why it works directly with PPPoE.If you encounter the same problem, this is how you diagnose and fix it:In terminal, run the following to see what the MTU is for en0 (or en1, mine was en0):(意思是: 路由器的MTU是1492,Mac 的MTU是1500)
我们把Mac的MTU改成低于 1492 的值就可以了,比如: 1300
ifconfig | grep mtu
②: 如果小于 1492
sudo ifconfig en0 mtu 1300
This should solve it.If so, it may only be until the next restart.