#!/bin/sh
. /etc/rc.common
##
# Configure a network interface MTU setting
##
#
# This script will set the MTU setting for the specified interface(s)
#
# The name of the interface (ex. en0) must be edited to match the interface
# to which the MTU setting should be applied
#
##
StartService ()
{
ConsoleMessage "Configuring MTU"
### uncomment lines and change the value following 'mtu' as appropriate
if [ "${MTU:=-NO-}" = "-YES-" ]; then
# /sbin/ifconfig en0 mtu 1490
# /sbin/ifconfig en1 mtu 1490
fi
}
StopService ()
{
return 0
}
RestartService ()
{
return 0
}
RunService "$1"
15. Uncomment the /sbin/ifconfig line(s) to set the MTU for a particular interface.
Note: Removing the number sign (#) from the beginning of a line uncomments it. Typically, en0 is the interface name for the Built-in Ethernet port and en1 is interface name for the AirPort Card. This is not always the case, though. To confirm that a network port is associated with a particular interface name, open the Network Utility (/Applications/Utilities/), and click the Info tab.
16. When you have finished customizing the file, save it (press Control-O), press Return, and exit pico (press Control-X).
17. Type: chmod 755 MTU
18. Press Return.
19. Type: pico StartupParameters.plist
20. Press Return.
21. In the pico editor paste in the following text.
Begin copying below this line.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Description</key>
<string>Can set MTU</string>
<key>OrderPreference</key>
<string>None</string>
<key>Provides</key>
<array>
<string>MTU</string>
</array>
<key>Requires</key>
<array>
<string>Network Configuration</string>
</array>
</dict>
</plist>
End copying above this line.
22. When you have finished customizing the file, save it (Control-O), press Return, and exit pico (Control-X).
23. Type: chmod 755 StartupParameters.plist
24. Press Return.
25. Type: sudo pico /etc/hostconfig
26. When prompted, enter your password.
27. Press Return.
28. In the pico editor, add this line at the bottom:
MTU=-YES-
29. Save it (Control-O), press Return, and exit pico (Control-X).
When you restart the computer, MTU is set for the interface that you specified.
Notes