Probably stupid question, but

Tom H tomh0665 at gmail.com
Wed Sep 4 18:51:45 UTC 2013


On Tue, Sep 3, 2013 at 5:10 PM, Paul Smith <paul at mad-scientist.net> wrote:
> On Tue, 2013-09-03 at 20:43 +0100, Colin Law wrote:
>>>
>>> And it should definately be intelligent enough to understand that if someone
>>> has defined a static ip address for their machine, it should not just
>>> blindly ignore it and go for DHCP. Maybe it could check first to see if DHCP
>>> is available. Maybe it can still do its thing but in such a way that the
>>> static IP address is kept as it was. I don't care what it does, as long as
>>> it does not break network connectivity. And currently, (or at least last
>>> time I checked), it does.
>>
>> I can't understand what is the problem that others seem to have with
>> fixed ip addresses in network manager.  I use fixed IP addresses
>> simply by setting the Method to Manual in IPv4 Settings in NM and
>> entering the address etc.  I have no problems at all with this.
>
> I agree with you Colin.  I've done this many times and it works
> perfectly fine.  You can set IP address, netmask, broadcast, DNS server,
> etc. using the NetworkManager configuration.  If there is a situation
> where this fails, please describe it.
>
> NetworkManager absolutely supports static IP addressing.  What it
> _doesn't_ support is "Joe's Linux Distro Network Interface Configuration
> File Format".  If you want static IP addresses then you need to use
> NetworkManager to configure them, you can't go behind its back and muck
> around with underlying files such as /etc/network/interfaces
> or /etc/sysconfig/networking or whatever magical file format your distro
> of choice invented, and expect it to work.  NetworkManager is not an
> Ubuntu-only tool, it's a generic package used by most distros.
>
> If you want to manage your network interfaces by hand and edit
> underlying files directly, then don't use Network Manager; that's fine.
> But don't blame Network Manager for being broken when you're
> purposefully breaking it.

NM has plugins to handle Red Hat and Debian/Ubuntu networking configuration.

For the former it's called ifcfg-rh and it reads
"/etc/sysconfig/networking-scripts/ifcfg-*" interface files (including
setups for bonds, bridges, and vlans).

For the latter it's called ifupdown and it reads
"/etc/network/interfaces" if the plugin's enabled in
"/etc/NetworkManager/NetworkManager.conf".

(To be accurate, you have to enable ifcfg-rh or ifupdown in
"/etc/NetworkManager/NetworkManager.conf" for them to be loaded but
that's done automatically by the NM maintainers. For ifupdown, you
have to enable a second setting in that file.)

You can also use NM-native config files in
"/etc/NetworkManager/system-setting/" if the keyfile plugin is loaded
(again it's enabled automatically by the distributions).




More information about the ubuntu-users mailing list