Re: NetworkManager debs + dhcp

NM will use either dhcp or static configuration for a given device, with
the basis for that decision coming from the distribution's network

For example in the Gentoo backend, a variable is parsed, and if it is
equal to 'dhcp' NM will only do dhcp for that interface. If 'dhcp' is
not found, then the line is parsed to get the static configuration,
which NM can apply directly.

The nature of a static configuration makes an assumption that the given
NIC will only be used at locations where the static configuration will
work. If that assumption is not true, then clearly the user must be
using another form of configuration for the device.

Since NM doesn't actually have config files it is necessary for there to
be some way to determine a user's preference with no user interaction.
The plan down the road may allow applying new static configuration
settings through an incarnation of NetworkManagerInfo, but that would
function on a per-user basis, and not affect an overall system default.

As for dhclient never getting called, that could be altogether likely.
All but the RedHat backends were just stubs added by Dan, since he uses
RedHat. I know someone has been contributing to the Debian backend, and
I have been contributing to the Gentoo backend.

Play with the code on your side, and if success is good, send a patch to
the list. My first hack on the code was just to force use_dhcp to be
always true to I could at least get some success. Need to start off
somewhere :)


On Tue, 2004-11-02 at 16:12 +0100, j bootlab org wrote:
> so why did dhclient not get called...
> in fuction nm_device_activation_configure_ip from
> NetworkManagerDevice.c:
> nm_device_config_get_use_dhcp (dev) always returns FALSE, since 
> dev->config_info.use_dhcp is never set to TRUE,
> comparing the RedHat and Debian backend it is clear:
> nm_system_device_update_config_info
> needs to be updated.
> adding 
> ---
> 	g_return_if_fail (dev != NULL);
> 	/* We use DHCP on an interface unless told not to */
> 	nm_device_config_set_use_dhcp (dev, TRUE);
> 	nm_device_config_set_ip4_address (dev, 0);
> 	nm_device_config_set_ip4_gateway (dev, 0);
> 	nm_device_config_set_ip4_netmask (dev, 0);
> 	nm_device_config_set_ip4_broadcast (dev, 0);
> ---
> to make it use dhcp, until the static ip part is working, would work.
> why is the current RedHat backend parsing the static configuration 
> for redhat, /etc/sysconfig/network-scripts/ifcfg-%s?
> to my understanding the plan for NetworkManager was not to use the
> configuration of the underlying distribution and come up with
> a generic NetworkManager configuration system. the current
> approach as seen in the redhat backend does not work for settings per
> wireless network, but saves the static ip again per device, this is
> wrong. 
> j
> _______________________________________________
> NetworkManager-list mailing list
> NetworkManager-list gnome org

Attachment: signature.asc
Description: This is a digitally signed message part

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]