Set MTU value for any interface via AppleScript
Thu, May 22 2008 at 7:30AM PDT • Contributed by: RickoKid
Thu, May 22 2008 at 7:30AM PDT • Contributed by: RickoKid
Sometimes you have to change the Maximum Transmission Unit (MTU) on a network interface in Mac OS X to fix or debug a connection problem. You can dive into the command line using ifconfig:
[robg adds: I haven't tested this one.]
ifconfig en0 mtu 1458
Or you can change it in the advanced settings of the Ethernet interface, but for other interfaces, you have to use ifconfig. Well, not anymore. Using the following script, you can easily set one or more interfaces to a new MTU value (on both Tiger (10.4) and Leopard (10.5), and possibly on older versions of Mac OS X):
(You can find the original version of this script in this post on my site.) Due to the differences in systems older than Leopard however, the script can't lookup the friendly interface name (Built-in Ethernet, Airport, Firewire, and so on), but lists the interface's UNIX name (en0, en1, fw0, etc). It does make a wild guess at which interface it is though based on the usual assignments.
[robg adds: I haven't tested this one.]
•
[7,500 views]
