Just for the record...

At the moment, I believe, it's only possible to set default_mtu per-device 
instance, i.e. 1500 for bge0 and 9000 for bge1 separately. 

But not for VLAN sub-interfaces, i.e. bge188000 - the VLAN188 interface 
inherits whatever default (= allowed max) is on hte real interface.

See details in
http://blogs.sun.com/shantnu/entry/opensolaris_project_brussels_unified_nic
http://www.sunmanagers.org/pipermail/summaries/2003-December/004776.html

If I want interfaces with explicit non-default MTU (i.e. 1500 for my main VLAN 
vs. 9000 set in driver.conf file), they can be set in the hostname file. 
I.e. /etc/hostname.bge0:
testserver-bge0 mtu 1500

I've made a script for another project which sets MTU for all interfaces (i.e. 
when zones go up), it can be run from cron and on system startup.

It lost some formatting during the post, but may be useful to anyone:

--

#!/sbin/sh

# /etc/init.d/setmtu
# Set MTU to 1500 after the default of 9000 for Jumbo support on system startup
# Better set in cron in case of zone restart, interface replumb, etc
# * * * * * [ -x /etc/init.d/setmtu ] && /etc/init.d/setmtu start
# (C) Jim Klimov, COS&HT 2007
# $Id: setmtu,v 1.3 2007/05/17 09:51:43 jim Exp $

SETMTU=1500

# If the exceptions *are* used, begin their regexp with a pipe
IFLIST_EXCEPT='|bge188000'
#IFLIST_EXCEPT=''

IFLIST=`ifconfig -a | egrep -i 'mtu|IPv4' | egrep -v '^lo|'"mtu 
$SETMTU""$IFLIST_EXCEPT" | awk '{ print $1 }' | sed 's/:$//'`

case "$1" in
    start)
        for INTERFACE in $IFLIST; do
            echo "Trying to set MTU=$SETMTU on interface '$INTERFACE'"
            ifconfig "$INTERFACE" mtu "$SETMTU"
        done
        ;;
    *)
        if [ x"$IFLIST" != x ]; then
            echo "Would consider changing these interfaces:"
            echo "$IFLIST"
        else
            echo "No interfaces to change"
        fi
        ;;
esac
 
 
This message posted from opensolaris.org
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to