Operating System - HP-UX
1819870 Members
2424 Online
109607 Solutions
New Discussion юеВ

change MTU size and make it permanent

 
SOLVED
Go to solution
Lavrenty
New Member

change MTU size and make it permanent


Hello, I have modified the MTU size on one of my interfaces (4) and would like to save the change permanently. What is the correct file to put it there

lanadmin -M 1476 4
9 REPLIES 9
TTr
Honored Contributor
Solution

Re: change MTU size and make it permanent

All interface specific parameters should be added to the config file of the LAN card software. It is one of hpbtlanconf, hpetehrconf, hpigelanconf files in /etc/rc.config.d
You did not specify which card you have but most likely it is the hpigelanconf file.
Steven E. Protter
Exalted Contributor

Re: change MTU size and make it permanent

Shalom,

I would think this might be possible in /etc/rc.config.d/nddconf

Shmuel
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
TTr
Honored Contributor

Re: change MTU size and make it permanent

@Shmuel: /etc/rc.config.d/nddconf

The ndd command (and nddconf) does not have any parameters for the MTU size.

You have to use the hpigelanconf file and fill in the LAN interface name (lan0, lan1,..) and the MTU size. I don't think any other parameters are needed. Of course if you create youn own start up script in /snbin/init.d and put your "lanadmin -M 1476 4" command in, it will also work but why bother?
Lavrenty
New Member

Re: change MTU size and make it permanent

Hi, thanks Steven, thanks TTr!! Actually I have tested with nndconf , works perfectly! Good luck
TTr
Honored Contributor

Re: change MTU size and make it permanent

Which parameter did you use or what was exactly the command that you implemented and how? I and many others would like to know in case we have the same issue. This is how you this forum works.
Lavrenty
New Member

Re: change MTU size and make it permanent

Hi,

The steps I did:

1) Changed my lan interface 4 to be MTU size 1476

lanadmin -M 1476 4

2) Checked with netstat -in that MTU size has been changed

netstat -in

3) Saved changes to configuration file proposed in the forum:

vi /etc/rc.config.d/nddconf

lanadmin -M 1476 4

4) rebooted the server

5) After reboot checked with netstat and lanadmin -m that changes are permanent.


TTr
Honored Contributor

Re: change MTU size and make it permanent

Did you actually put the line "lanadmin -M 1476 4" in /etc/rc.config.d/nddconf?
It will work because the nddconf file gets sourced out (probably many times) but it is is not a good idea to put in executable commands in a config file. It is up to you whether you want to keep it this way or not.
Nobody would think to look in the nddconf file for a LAN card setting.
Lavrenty
New Member

Re: change MTU size and make it permanent

To TTr:

Hi, unfortunately, the tests with configuration files have failed and I guess the reason is that BTLAN doesnt support such parameters in config file. We tried to set up MTU size with with lan0.

I have btlan card driver shown by ioscan -fnC lan
lan 0 0/0/0/0 btlan CLAIMED

Below is the standard configuration file for edititng:

"hpbtlanconf" [Read only] 29 lines, 1196 characters
#####################################################################
# @(#)B.11.11_LR hpbtlanconf $Revision: 1.1.119.1 $ $Date: 97/04/10 15:49:13 $
# hpbase100conf: contains configuration values for HP PCI/HSC 100BASE-T
# interfaces
#
# HP_BTLAN_INTERFACE_NAME Name of interface (lan0, lan1...)
# HP_BTLAN_STATION_ADDRESS Station address of interface
# HP_BTLAN_SPEED Speed and duplex mode
# Can be one of : 10HD, 10FD, 100HD, 100FD and
# AUTO_ON.
#
# The interface name, major number, card instance and ppa may be
# obtained from the lanscan(1m) command.
#
# The station address and duplex are set through the lanadmin(1m) command.
#
#####################################################################

HP_BTLAN_INTERFACE_NAME[0]=lan0
HP_BTLAN_STATION_ADDRESS[0]=
HP_BTLAN_SPEED[0]=AUTO_ON

###########################################################################
# The HP_BTLAN_INIT_ARGS are reserved by HP. They are NOT user changable.
###########################################################################

HP_BTLAN_INIT_ARGS="HP_BTLAN_STATION_ADDRESS HP_BTLAN_SPEED"

# End of hpbtlanconf configuration file

We have modified it to be
HP_BTLAN_INTERFACE_NAME[0]=lan0
HP_BTLAN_STATION_ADDRESS[0]=
HP_BTLAN_SPEED[0]=AUTO_ON
HP_BTLAN_MTU[0]=1476

And added this parameter to HP_BTLAN_INIT_ARGS="HP_BTLAN_STATION_ADDRESS HP_BTLAN_SPEED HP_BTLAN_MTU"

After reboot we could see with netstat -in that mtu size is still 1500


DCh_2
New Member

Re: change MTU size and make it permanent

So it is a btlan card/driver.
Unfortunately the hpbtlanconf file does not support most of the additonal card seetings so you can not add these settings to the config file, they are ignored. This is not to say that these additional settings are not supported, you already proved that.
The /etc/rc.config.d/hpbtlanconf file is used by the /sbin/init.d/hpbtlan script. This is the script that reads the config file and uses the lanadmin commands to set the LAN card parameters. If you look at the bottom of the /sbin/init.d/hpbtlan script, as a last step it executes (sources) the $HPBTLAN_ENH file which is the /sbin/init.d/btlan_enh script. This script does not exist and I can not find any info on it. Apparently HP added the execution of this script with the intent to use it for BTLAN ENHancements but did not utilize it. So if you create the script /sbin/init.d/btlan_enh and in it you put a single line, "lanadmin -M 1476 4" It will be executed during boot up and set the MTU size accordingly.