Setting MTU at startup problem

delliott

Registered
This article : http://docs.info.apple.com/article.html?artnum=107474

Describes how to set up the MTU of a system, I have performed this many times in the past successfully when I have had to use my software restore cd.

Yesterday I installed OS 9 and OS X seperatley from their installer CDs. ( A manual installation should I say) and now I cannot get this to work.

when i type sudo SystemStarter start MTU I recieve

[*:/Library/StartupItems/MTU] *% sudo SystemStarter start MTU
Welcome to Macintosh.
Configuring network
Exec failed for item /Library/StartupItems/MTU: Exec format error
Can set MTU (709) did not complete successfully.
Startup complete.
Hangup
[*:/Library/StartupItems/MTU] *%

I do not understand this reply from the terminal and I was wondering if anybody else had recieved it and knew what the problem was. I have searched on google and on the apple support threads but cannot find any help.

I have just installed Mac OS 9.2.2 and then installed OS X 10.2 ontop of that - to give you information about the OS I am running.

Perhaps I need to upgrade to 10.2.6 but I find this pretty unlikely however as I wait for a reply I am going to download and install that upgrade to see how it affects this.
 
MTU changes the maximum transmission unit size of packets over a connection. 1500 is not optimal for my ISP as it fragments the data, 1454 is however optimal after rigorous testing.
 
whatever you modified in the script was not right.
I sugest researching more until you can format it correctly, or post it here.
 
Originally posted by seann
whatever you modified in the script was not right.
I sugest researching more until you can format it correctly, or post it here.

I have decided to copy / paste the entire terminal session so that you can see what I have done. Most of the things here in *'s are information that I do not want you to know - IE IP addresses, MAC Addresses, hostnames

Last login: Mon Aug 25 11:51:17 on ttyp1
Welcome to Darwin!
[*:~] delliott% ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff000000
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet6 * prefixlen 64 scopeid 0x4
inet * netmask 0xfffffff8 broadcast *
ether *
media: autoselect (100baseTX <full-duplex>) status: active
supported media: none autoselect 10baseT/UTP <half-duplex> 10baseT/UTP <half-duplex,hw-loopback> 10baseT/UTP <full-duplex> 10baseT/UTP <full-duplex,hw-loopback> 100baseTX <half-duplex> 100baseTX <half-duplex,hw-loopback> 100baseTX <full-duplex> 100baseTX <full-duplex,hw-loopback>
[*:~] delliott% cd /Library
[*:/Library] delliott% mkdir StartupItems
[*:/Library] delliott% cd StartupItems
[*:/Library/StartupItems] delliott% mkdir MTU
[*:/Library/StartupItems] delliott% cd MTU
[*:/Library/StartupItems/MTU] delliott% pico MTU

#!/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 1454
# /sbin/ifconfig en1 mtu 1490

fi

}

StopService ()
{
return 0
}

RestartService ()
{
return 0

}

RunService "$1"

[*:/Library/StartupItems/MTU] delliott% chmod 755 MTU
[*:/Library/StartupItems/MTU] delliott% pico StartupParameters.plist
<?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>

[*:/Library/StartupItems/MTU] delliott% chmod 755 StartupParameters.plist
[*:/Library/StartupItems/MTU] delliott% sudo pico /etc/hostconfig
Password:

##
# /etc/hostconfig
##
# This file is maintained by the system control panels
##
# Network configuration
HOSTNAME=-AUTOMATIC-
ROUTER=-AUTOMATIC-

# Services
AFPSERVER=-NO-
APPLETALK=-NO-
AUTHSERVER=-NO-
AUTOMOUNT=-YES-
CONFIGSERVER=-NO-
CUPS=-YES-
IPFORWARDING=-NO-
IPV6=-YES-
MAILSERVER=-NO-
AFPSERVER=-NO-
APPLETALK=-NO-
AUTHSERVER=-NO-
AUTOMOUNT=-YES-
CONFIGSERVER=-NO-
CUPS=-YES-
IPFORWARDING=-NO-
IPV6=-YES-
MAILSERVER=-NO-
NETBOOTSERVER=-NO-
NETINFOSERVER=-AUTOMATIC-
NISDOMAIN=-NO-
RPCSERVER=-AUTOMATIC-
TIMESYNC=-YES-
QTSSERVER=-NO-
SSHSERVER=-NO-
WEBSERVER=-NO-
SMBSERVER=-NO-
DNSSERVER=-NO-
NETINFOSERVER=-AUTOMATIC-
NISDOMAIN=-NO-
RPCSERVER=-AUTOMATIC-
TIMESYNC=-YES-
QTSSERVER=-NO-
SSHSERVER=-NO-
WEBSERVER=-NO-
SMBSERVER=-NO-
DNSSERVER=-NO-
APPLETALK_HOSTNAME=*4465736d6f6e6420456c6c696f7474d57320436f6d7075746572*
MTU=-YES-

[*:/Library/StartupItems/MTU] delliott% sudo SystemStarter start MTU
Welcome to Macintosh.
Configuring network
Exec failed for item /Library/StartupItems/MTU: Exec format error
Can set MTU (663) did not complete successfully.
Startup complete.
Hangup
[*:/Library/StartupItems/MTU] delliott%

That is the webpage from Apple support followed as far as i can see - in it's entirety. Any suggestions would be very appreciated!
 
Back
Top