Bugzilla – Bug 134241
cannot set a static IP with NetworkManager
Last modified: 2006-07-31 17:23:35 UTC
I cannot set a static IP with NetworkManager. Here is what i have tried: - install alpha3, during network proposal click on "managed by network manager" - insatll ipw-firmware - configure wireless device (ipw2200) with YaST to be "managed by network manager" - started nm-applet What works (sort of): - plug in the cable, i get a dynamic IP - select one of the wireless networks in nm-applet, i get another dynamic IP on some of them, on others i get a zeroconf ip. - can switch between wired and wireless with nm-applet What does not work: - i can not enter any details for any connection (other than encryption for Wireless), so i cannot set an IP address, a route or a default gateway. - SCPM profiles doe not manage the NetworkManager setup yet
NM will use stored YaST IP settings if DHCP is not enabled. Is the new "managed" stuff in YaST now allowing you to set these? Otherwise, NM does work as expected -- you have to test them in YaST.
ok, then i got this wrong - i assumed network manager would set everything without Yast. So i'll set it in yast to a static address but leave the startmode as "managed", correct? This will automagically make SCPM work, too. Cool :-)
The idea of NM is to not require configuration but instead to have everything Just Work. In the rare case where network configuration is required, the user should use YaST, yes. If everything works, please close the bug or otherwise let me know. ;-)
Ok, since i misunderstood the procedure, let's close the bug. I can still reopen the bug if it does not work as advertised :-)
Robert, after all I see no way to set-up a system with a static configuration and NetworkManager running. Once a user want to have a static configuration for one device he will not be able to manage others by using NM. Once NM is fired up it will try to get his hands on all devices.
Timo - No, it should work. Imagine that I have a laptop with a static configuration on the wired interface and dynamic on the wireless. Whenever NM is on wired (cable is plugged in, etc.) it will use my static configuration. Whenever the cable is unplugged, it will move to wireless. It should work as desired.
Hum, I tried it with a somthing-pre-alpha3. Once I started NM, it took the interface with the static configuration and tried to configure it using DHCP.
NM tried to set-up DHCP since the static configuration was incomplete (no gateway specified). Could we please discuss whether NM should * try to set-up DHCP for static devices which seem to have an incomplete setup or * use the supplied (maybe invalid) settings from /etc/sysconfig/networ/ifcfg-* and set up the device correspondingly? cc'ing Christian and Andreas.
I think we should change it so NM will up the interface so long as it is a somewhat-valid configuration. Right now it falls back to DHCP if the IP or the GW is not set. Talking to Timo on IRC, I think we should remove the GW check, since it is conceivable that a user not have a GW set but that they know what they are doing and do not want one. But if there is no IP set, it is a nice feature that NM then tries DHCP, so we keep that check.
Alright, removed from NM CVS the gateway check, so static configurations should now work for Timo (along with everyone else). Close bug?
Fine with me. Seife didn't object either.
Alright, fixed!
I don't think the bug has been solved. If I configure a static IP, with static DNS, on my laptop for the wired card, and I use the wifi card with DHCP, NetworkManager keeps trying to obtain an IP using DHCP also on the wired network. The "Managed by user" option in Yast seems to have no effect at all. Any ideas?
I forgot: static DNS are systematically overwritten if NetworkManager is enabled. I read bug #171124, seems the same problem.
I "solved" by manually by removing the wired card settings in Yast and setting them again from scratch. Don't know what happened. Configuration files (dhcp and config) are the same as before.
Hi guys, slight modification on this one. Could we also please adjust it so that we are able to set an additional (static) ip in Yast while receiving a dynamic one (on the same wireless adapter) from Network Manager. We have now (temporarily) got a whole other network range which I would like to be able to simply add. However it doesn't work like the old days before network manager. I presume if I make the main address static, I will then be able to add an additional IP, however that will stuff up the other networks that I roam to.
Nope it seems I cannot set an additional IP at all with Network Manager running..... Guys upon further thought it would seem the whole purpose of network manager is to enable painless roaming between networks. I don't think there is too much point in using it on a workstation that never moves. Therefore when roaming between networks (be they customers, home/work or whatever) it is often the case that the end user using network manager has no control over whether they are allocated static or dynamic addresses from those networks. For this reason I feel that we need to re-look at whether network manager should allow for entering a static ip associated with a particular access point or network. Without this feature anyone who needs to allow for a static IP may have an unsatisfactory setup requiring manual configuration each time they move. However none of this changes the fact that I cannot add an additional address to my client with network manager running either.
Quentin, this particular bug about static IP working at all is fixed. Static IP and dynamic IP's are covered in bug 181622 as a feature request.
The problem I had happened again on my notebook. Suddenly NetworkManager is not able to use the static IP on the wired network anymore. I made no changes to the network configuration. If I boot with the wired network cable plugged, NM tries to get an IP and after some time it gets 169.254.3.232. Quite annoying. So, for me, the bug should be furtherly investigated. For now I'm switching to ifup.
Sorry, but I gave up trying to get this fixed, I'm now running SLED 10 RC3 which seems to have fixed the issue for now. That would suggest that it is indeed fixed somewhere. From my experience, updating OpenSuSE is unfortunately a headache in itself, regardless of whether the patch works or not. But to concurr with Alberto, I found the static IP situation on OpenSuSE hit and miss, sometimes it would work sometimes it wouldn't, however it mostly wouldn't.
I'm starting to think the problems with NM are probably related to a misconfiguration of the network through Yast. The problem is that it is not clear how we should set the DHCP options in Yast when using NM. For example, I have a static IP wired card and a wifi card. How should I set DNS? Should I allow DHCP to change them in Yast or not? How should the wired card managed? And the wifi one? Now I've set the wired card to be activated when the cable is plugged and the wifi card to be activated "at the hotplug". NM properly works with the wifi card, but it's impossible to get a the static IP when I use the wired one. Quentin could you attach the /etc/sysconfig/network/config file and the configuration of your network cards on SLED so I can compare with mine? I'm happy the bug is solved in SLED, but I'd like SuSE to work too. Network must to be reliably managed. It's not possible to work with a system which drops your network configuration without an appearent reason.
I'm pretty sure this worked with 10.1 as well, In yast you can set your wired as static and your wireless as DHCP and it should work as you described. NM respects many sysconfig settings. Also FACTORY contains a newer NM. Please reopen with /var/log/Networkmanager and sysconfig info if this does not work.
I tryed to set the wired card to static and the wirelss to DHCP, but the static IP was never assigned to the wired card. Instead, when connecting the cable, it got an invalid IP (169....). However I now installed SLED on that system and it's working perfectly, so I can't try again. Thanks anyway.