Re: Programmatically set the MTU for ALL Ethernet Adapters
- From: Dan Williams <dcbw redhat com>
- To: Jeff Sylvia Comcast Net
- Cc: networkmanager-list gnome org
- Subject: Re: Programmatically set the MTU for ALL Ethernet Adapters
- Date: Fri, 04 Jun 2010 19:21:50 -0700
On Wed, 2010-06-02 at 11:37 -0400, Jeffersen Sylvia wrote:
> I am running into an issue with programmatically changing the MTU
> settings for an Ethernet adapter within SUSE Enterprise 11.
>
>
> Issue: We have configured an OS to run within VMware Player that will
> be transferred between multiple PCs on removable media. By nature (as
> well as design) VMware will assign a new MAC Address (and therefore a
> new virtual adapter) at each new PC, or location on the same PC.
> Because we are using Lotus Notes 8.5.1, and Cisco AnnyConnect VPN
> Tunneling, we need to set the MTU for the adapter *WITHOUT* user
> intervention.
>
>
>
> When Using *ifup* we can change global settings in the
> “/etc/sysconfig/network/config” and adapter based settings in
> “/etc/sysconfig/network/ifcfg.template” files, however once the
> adapter is created, it must be manually activated and set to DHCP
> which requires “root” permissions.
>
>
>
> When using NetworkManager, the process is automated for the creation
> and default activation of the eth<x> adapter, however the MTU must be
> set manually, per adapter by the user.
>
>
>
> I am trying to find a way (similar to adjusting the configurations of
> config/ifcfg.template) that will programmatically set the MTU for ALL
> new eth<x> adapters to 1492.
Can setting the MTU happen *after* the connection has been brought up?
If so, you could use a dispatcher script (see 'man NetworkManager') and
if the interface name (which is passed as an argument to that script)
matches ethX then set the mtu to 1492 using ifconfig.
But NM also has built-in MTU support. There are two cases here. First,
NM creates "default" connections for any Ethernet device on the system
if that device does not have configuration already, where that
configuration is determined by which system settings plugins you have
specified in /etc/NetworkManager/nm-system-settings.conf. If you have
'ifcfg-suse' there, NM tries to read in legacy ifcfg files. If you have
'keyfile' there, you can use configuration files
in /etc/NetworkManager/system-connections. In the ifcfg case, putting
the line MTU=1492 into an ifcfg file will work, while for keyfile
'mtu=1492' in the [802-3-ethernet] section will work. In both cases, do
not specify a MAC address, and thus NM will apply the configuration to
any ethernet adapter that happens to appear.
Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]