On 29 November 2012 13:03, Pavel Simerda psimerda redhat com wrote: >> From: "footkeong Chien" <fkchien_...@hotmail.com> >> I would like to know whether there is any alternative way to set >> static ip for Ubuntu using command lines without affecting the >> etc/network/interfaces. ... > Is this a NetworkManager question?
I guess it is. Ubuntu uses NetworkManager and at least I would not try to fiddle with a interface managed by NetworkManager with some basic commands, because you never know what NetworkManager will override (well "you" as in average user, not "you" as those on this list who really know all NM internals) Unfortunately the original poster did not write to what (working?) approach he was looking for an alternative, why he wanted to use the command line, does he want the static IP on eth0 or some other interface, and does he want the assignment to survive a reboot. Earlier this week I had the issue that I wanted to assign a permanent static IP to my eth0 on a Kubuntu Lucid system. Intuitively I would have done that by setting a static address on the "auto eth0" connection in the KDE connections control module. However, that does not work because at least in Kubuntu Lucid "auto eth0" is somehow automagically hidden from the UI. I have the feeling that I might have seen it in Ubuntu systems (using gnome connection manager), but I cannot check at the moment. Yes, I also tried to create a new connection, but that connected only manually on the first attempt and caused a crash (in knetworkmanager I believe) in the second one, so I did not pursue that approach any further. On the net I found the same question many times, but no really good answers, which seems to support the impression that people are struggling with the issue. I found e.g. these instructions http://en.opensuse.org/SDB:Knetworkmanager_static_ip_auto_eth0 too complicated for my purpose. So I just edited /etc/network/interfaces instead and defined eth0 as auto and static. That leads to desired functionality. NetworkManager regards the interface as unmanaged. However the knetworkmanager user experience is non-intuitive in this case. It shows me a disconnected Ethernet cable. Somewhat irritating at least the first week, but I can live with it. Still from the "naive" end user standpoint it is a bit weird that NetworkManager cannot handle such simple use case. (Yes, technically the limit might not be in NetworkManager proper but in KDE connection editor. And static addresses is not the main reason why NetworkManager exists.) But regardless of the reason, there is still a bit to go until Linux Networking is made really easy... Or have things changed completely since then? Lucid is of course 2.5 years old. Regards, Uwe _______________________________________________ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list