Can't use static ip address with network-manager (and thus no VPN connections menu for static users)

Bug #5364 reported by Jeroen
180
This bug affects 6 people
Affects Status Importance Assigned to Milestone
NetworkManager
Expired
Medium
Baltix
New
Undecided
Unassigned
knetworkmanager (Ubuntu)
Invalid
Undecided
Unassigned
Declined for Feisty by Henrik Nilsen Omma
Declined for Gutsy by Henrik Nilsen Omma
network-manager (Ubuntu)
Fix Released
Wishlist
Unassigned
Declined for Feisty by Henrik Nilsen Omma
Declined for Gutsy by Henrik Nilsen Omma

Bug Description

I can't use a static ip address with network-manager. Either that or it's not easy enough to find (for me).

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

Hmm tricky. You certainly CAN set static ip addresses because I'm typing this message using a card configured as such. This is probably a support query rather than a bug...

Before anyone tells you how to solve this though I think you need to write down the steps you used to try and set up a static ip address and what you expected to happen e.g.:

Description of problem:
Could not find network card to configure it statically.

Steps to reproduce:
1. Go to System -> Administration -> Networking .
2. Check all the tabs across the top.

Expected result:
To see wireless network card.

Actual result:
No wireless network card is displayed only a modem connection so I could not configure it statically.

Revision history for this message
Jeroen (jeroenubuntu) wrote :

No, no.. You don't understand it. I'm filing this on the network-manager package, which is different from System -> Administration -> Networking. I can configure static IP addresses with the Networking tool without problems. I just think it should be possible with the nm-applet, which configures your network via DHCP...

Changed in network-manager:
assignee: nobody → motu
Revision history for this message
John Cooper (choffee) wrote :

Would it make sense to add a menu option to nm-applet that takes you to the System -> Administration -> Networking app. Then in the app have a front page that allows you to change from network-manager controled to static setup.

Revision history for this message
Sebastien Bacher (seb128) wrote :

What issue do you have using a static IP with it? What version of the package do you use? It works fine for me out of a DNS issue

Changed in network-manager:
assignee: motu → keybuk
status: Unconfirmed → Needs Info
Revision history for this message
Reinhard Tartler (siretart) wrote :

This bug is that NetworkManager does not support static ips at all. gnome-system-tools does, but that's not NetworkManager.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

We have no intention for dapper of supporting static IP addresses with network manager. To configure static IP addresses for a given network interface, use the System -> Administration -> Networking dialog.

Changed in network-manager:
status: Needs Info → Rejected
Revision history for this message
Chris Lee (chris-lee-gertner) wrote :

My home wireless network uses static ip addresses (to do port forwarding through my wireless router, DHCP must be turned off).

So I've been trying to use the System -> Administration -> Networking dialog to switch between a "home" configuration and a "NetworkManager" configuration.

The problem with the NetworkManager side of this method is that there is no easy way (as far as I can tell) to let NetworkManager know that I've switched the networking configuration with gnome-system-tools. What I've been doing lately is to switch to 'NetworkManager' mode using System -> Administration -> Networking, then doing

 $ sudo /etc/init.d/dbus restart

This reloads NetworkManager so it realizes that /etc/networking/interfaces no longer configures the wireless card(s). But now nm-applet hangs. So I do

 $ killall nm-applet
 $ nm-applet --sm-disable

Now I'm back in business.

But, this is a lousy solution!!
 - There needs to be a way to signal NetworkManager that the network configuration has changes (is there anything better than /etc/init.d/dbus restart?)
 - nm-applet should be able to survive this reconfiguration (maybe if NetworkManger doesn't need to be restarted, then all will be OK).

There are other problems with the solution, also, which are more the fault of the gnome-system-tools networking tool.
 - switching the configuration should allow a hook script so I can adjust postfix configuration, cups configuration, etc... for the environment I'm it.
 - the networking tool seems pretty broken to me. The only way I can reliably use it is to hand-edit the xml configuration file in /etc/gnome-system-tools/networking because if I chage anything about a configuration in the GUI it is never saved. Also, there is no way to delete an obsolete configuration via the GUI. Or am I the only person for which System -> Administration -> Networking is broken???

Revision history for this message
Chris Smith (puddpunk) wrote :

Not directly related to your bug, but I have the same issue with my household setup.

What I did was instead of setting up all the PC's I needed with static IP's I used the dhcp function of my router software to "pin" certain IP's to MAC addresses. That way when my desktop requests an address, it gets the same address every time. I can then set up port forwarding to a certain IP and be safe in knowing that that MAC will get the right IP.

It's a much cleaner way of setting it up and will save you a lot of grief. Feel free to email me at "puddpunk at gmail dot com" if you need help.

Revision history for this message
Chris Lee (chris-lee-gertner) wrote :

Chris Smith -- thanks for the suggestion. I think I was able to do something like this with my previous wireless router, but not with the current one. I'll check again, however!

Revision history for this message
Adriaan Peeters (apeeters) wrote :

I am reopening this since configuring a static ip with Dapper Flight 6 live cd fails.

When the live cd starts, network-manager is automatically started. When I then configure the wired network interface via System -> Administration -> Networking dialog and click 'Ok', I see the nm-applet icon rotating and the interface is reset to dhcp.

This is not user friendly and it is unclear how to configure a static ip with the live cd.

Changed in network-manager:
status: Rejected → Confirmed
Changed in network-manager:
assignee: keybuk → nobody
Revision history for this message
jens_acamedia (commercial-acamedia) wrote :

perhaps just a duplicate comment but:

it is confusing to see information about wep-key and essid in gnome-network config when network-manager is in charge of these.

it would be best to simply take wireless-specific stuff away from the gnome config dialog.

then, of course, network-manager has to respect the ip-settings in gnome config.

hope this integration will work in dapper.

Revision history for this message
lithorus (lithorus) wrote :

There is another problem with not supporting static ip's in network manager. VPN connections through NM depend on a network connection alread configured through NM. So if you have a static LAN which you use to connect to VPN you cannot activate them.

NM in Fedora seems to be able to parse the stuff in /etc/sysconfig/ifcfg/. Making something similar for /etc/network/interfaces would be ideal IMHO since it'll use the already used System -> Administration -> Networking configuration.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

The network-magic specification explicitly rules out support for static IP addresses with Network Manager for dapper - so this is simply wishlist.

Revision history for this message
Quentin Jackson (quentin-jackson) wrote :

If you think about it, the whole point of an app like network manager is to allow easy catering for the variety of different networks while roaming. There's little point in having it for a stand alone workstation that never leaves the network. As a user we are not always able to define what a particular network allows or not (ie if a network demands a static ip or dynamic) so therefore it really IS a requirement that network manager supports static IP's. In my case I roam between a few different networks and one of them now requires an additional IP (yes a static one) while the main address is given via DHCP. This is due to two companies being on the same lan and some political issues outside of my control. Therefore unless network manager supports static IP's it is not achieving it's intended purpose in my opinion.

Revision history for this message
Adriaan Peeters (apeeters) wrote :

Well, I do not know whether network-manager should support your particular setup (two network addresses is not very common). But it should be able to support roaming between static and dynamic ip address networks.

Revision history for this message
Blue (vali-dragnuta) wrote :

... it should support both static addresses AND network profiles for mobile users.
Further, there should be only one way to set up network interfaces :network-admin or network manager.
As I posted on another bug report, network admin can do some things but miserably fails at others and viceversa for network manager. This makes using any of the tools impossible for certain setups.
The way I see this is a tool that works above the classic debian "interfaces" network config system, which allows both automatic network sellection, allows profiles, etc.
network admin and network manager on the other hand have serious shortcomings :
-NM does not know about /etc/network/interfaces - which very hard sucks.
- NM does not allow multiple network profiles
- NA knows about interfaces file which is good.
- NA knows about network profiles but is very buggy at this, and it does not use the standard interfaces mapping scheme for profiles, which again sucks as it can create a lot of confusions and problems.
- NA does not know about WPA (it only knows WEP ) when configuring wireless interfaces. This again sucks, as WEP is quite buggy and WPA is used now for secure networks.

So, for a highly (laptop) mobile user, who moves into a lot of networks, both wired and wireless, sometimes having the same ip in two different networks (not simultaneously, of course), sometimes using dhcp sometimes not, etc there is a very high need for a smarter tool that :
- Will not be entirely on its own (should rely on the standard debian infrastructure as much as possible and not try to reinvent the wheel)
- Will not be dependent on user to login or have a graphic environment to work (think servers !)
- Will support WPA for wireless cards
-Will support multiple profiles, both wired and wireless
-will support both static and dynamic addresses.

Revision history for this message
Xirtam (xirtam1985) wrote :

I confirm that and I cannot understand why this issue isn't taken seriously enough.
In dapper I wasn't able to use my wireless WPA network out of the box - I thought okay, NM was just out so edgy will make it. But again - no wireless connection using a current encryption mode (WEP is a long time obsolete) is possible.
Can a developer state if edgy+1 will ship with support for that not complicating demand?

Revision history for this message
Andrew Conkling (andrewski) wrote :

Another issue: with n-m running and the network set to a static IP, the (increasingly common) autodetection from other programs--Banshee, Gaim, Liferea, etc.--doesn't work. See bug # 79267 for an example. I'm sure there are others.

Revision history for this message
Andrew Conkling (andrewski) wrote :

Looks like this was reported upstream: http://bugzilla.gnome.org/show_bug.cgi?id=156952.

However, that seems to imply (please correct me if I'm wrong) that Ubuntu's missing something to make static configuration work with n-m.

Changed in network-manager:
status: Unknown → Rejected
Revision history for this message
Chris Burgan (cburgan) wrote :

There is another report upstream that is pretty much identical but more specific to Ubuntu .

https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/87941

Feisty relies on nm-applet quite a bit so hopefully this will get fixed.

Revision history for this message
Chris Burgan (cburgan) wrote :
Revision history for this message
Mantas Kriaučiūnas (mantas) wrote :

Why importance of this bug is set to wishlist ? AFAIK it's very important problem if users can't establish internet connection if network-manager is installed.

Accoring to comments at http://bugzilla.gnome.org/show_bug.cgi?id=412018 this is Ubuntu bugs:
 Comment #3 from Dan Williams (NetworkManager developer, points: 15) 2007-02-26 12:32
> NM actually has some support for static IP settings already, but the distro specific backend has to support it.
> Fedora, SUSE, and Debian support it. But Ubuntu decided to make NM ignore _any_ interface that you have already configured in /etc/network/interfaces.
> Therefore, to NM that interface doesn't exist, and you'll get the behavior your see.

I've just tried to configure "Static configuration" (by clicking on network-managet icon in notification area and choosing "Static configuration..."):
1. In "Network Settings" dialog I clicked on tab "DNS", entered one DNS server, then clicked on "Connections" tab and then on "Wired connection" and then clicked on "Properties" button;
2. entered static IP, netmask, gateway and clicked on "OK" button;
3. when I clicked on "OK" button then some progress bar in network settings dialog was displayed for a while, but internet connection wasn't activated when progress bar window dissapers, look at ifconfig output:
ubuntu@ubuntu:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:36:A7:71:DB
          inet6 addr: fe80::216:36ff:fea7:71db/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

4. then I clicked on the checkbox near the "Wired connection" (turned off "Wired connection"), and, after several seconds, clicked on the checkbox near the "Wired connection" again, and only then my "Wired connection" with static IP started to work, look at ifconfig output:
ubuntu@ubuntu:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:36:A7:71:DB
          inet addr:192.168.0.66 Bcast:192.168.0.255 Mask:255.255.255.0
          inet6 addr: fe80::216:36ff:fea7:71db/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

Revision history for this message
James Purser (purserj) wrote :

Hmm, with the fact that NM is now included by default in Feisty and the noted issues with other Gnome Software, could this bug be moved away from wishlist and be an actual bug?

Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

I agree with James. Also, if I understand correctly the upstream bug linked at the top, this actually is implemented, but Ubuntu doesn't use it right. So I'd say it's really an Ubuntu bug.

Revision history for this message
Tollef Fog Heen (tfheen) wrote : Re: [Bug 5364] Re: Can't use static ip address with network-manager

* Mantas Kriaučiūnas

| I've just tried to configure "Static configuration" (by clicking on
| network-managet icon in notification area and choosing "Static
| configuration..."):

The failure to activate the interface would be a network-admin bug,
not a network-manager bug.

The only real bug I see here is that NM isn't smart enough to notice
when an interface is static and mark it as such.

--
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are

Revision history for this message
Andrew Conkling (andrewski) wrote : Re: Can't use static ip address with network-manager

Technically, activating the interface isn't a problem. The problem is in switching back and forth between static and DHCP-configured networks. The process to do so is neither intuitive nor trivial.

Revision history for this message
Mantas Kriaučiūnas (mantas) wrote : Re: [Bug 5364] Re: Can't use static ip address with network-manager

Hi,

On Wed, Mar 07, 2007 at 08:38:12AM -0000, Tollef Fog Heen wrote:
> * Mantas Kriaučiūnas
> | I've just tried to configure "Static configuration" (by clicking on
> | network-managet icon in notification area and choosing "Static
> | configuration..."):
>
> The failure to activate the interface would be a network-admin bug,
> not a network-manager bug.

You are not right, network-admin activates interface correctly, but
then network-manager starts to do some things and tries to change my
startic IP to dhcp.
The same problem occurs if you add static IP configuration in
/etc/network/interfaces manually and then run ifup eth0.

This bug is very simple to reproduce - just boot from live CD, then
configure static IP and do ifconfig to be sure, that static IP config
works. Then just unplug network cable, wait several seconds and plug
network cable again. When you plug network-cable again network-manager
detects this and tries to enable dhcp configuration and changes your
startic IP to 169.xxx.xxx.xxx (if there are no dhcp server in the
network) or according to DHCP server.

> The only real bug I see here is that NM isn't smart enough to notice
> when an interface is static and mark it as such.

--
Labanaktis/Good luck,
Mantas Kriaučiūnas Jabber ID: <email address hidden> GPG ID: 43535BD5
Public organization "Open Source for Lithuania" - www.akl.lt

Revision history for this message
Matt Zimmerman (mdz) wrote : Re: Can't use static ip address with network-manager

A "Static configuration" menu item has been added to nm-applet in Feisty so that this is easy to find. static configuration isn't yet integrated with network-manager, but this gets the job done by launching the appropriate tool.

network-manager (0.6.4-6ubuntu2) feisty; urgency=low

  * Add "static configuration" menu item for NetworkRoaming spec.

 -- Tollef Fog Heen <email address hidden> Thu, 18 Jan 2007 11:22:19 +0100

Changed in network-manager:
assignee: nobody → tfheen
status: Confirmed → Fix Released
Revision history for this message
Andrew Conkling (andrewski) wrote :

On 3/9/07, Matt Zimmerman <email address hidden> wrote:
> A "Static configuration" menu item has been added to nm-applet in Feisty
> so that this is easy to find. static configuration isn't yet integrated
> with network-manager, but this gets the job done by launching the
> appropriate tool.
>
> ** Changed in: network-manager (Ubuntu)
> Status: Confirmed => Fix Released

I see no reason why this couldn't be deferred, but the current implementation is just a workaround at best. I don't see why this bug should be closed.

Revision history for this message
Billy Kwong (tuppa) wrote :

Yes, the "static configuration" menu item would bring up network-admin, but Network Manager would consider the interface to be "disconnected" when a static IP is set.

Basically if there is an entry for the corresponding eth interface in /etc/network/interface, NetworkManager would show the disconnect icon, and most GNOME apps like liferea, epiphany and gaim would enter offline mode. This is very annoying, especially in feisty.

Revision history for this message
William Grant (wgrant) wrote :

Billy and co. are right. Gaim will not connect if you have your connection configured manually, among other apps. As NM is now on by default, this needs to be resolved. Before Feisty.

Revision history for this message
Billy Kwong (tuppa) wrote :

The menu item doesn't fix the problem. As I said before, the moment you switch to a static IP configuration using network-admin (I even went to the menu item added), and NM automatically shows that the connection is disconnected, and liferea/gaim/epiphany goes into offline mode.

Basically, if there are any references of the interface in question in /etc/network/interfaces, NM would consider that interface to be disconnected.

Changed in network-manager:
status: Fix Released → Rejected
Revision history for this message
Andrew Conkling (andrewski) wrote :

On 3/11/07, Billy Kwong <email address hidden> wrote:
> ** Changed in: network-manager (Ubuntu)
> Status: Fix Released => Rejected

As far as getting this fixed, Rejected is no better than Fix Released.

Changed in network-manager:
status: Rejected → Confirmed
Revision history for this message
William Grant (wgrant) wrote :

The issue about it acting disconnected is bug #82335 now, which has quite a number of duplicates, and has High importance. People may wish to move over there instead.

Revision history for this message
Andrew Conkling (andrewski) wrote :

Well, that's only one of a few issues that arises from this problem.

Revision history for this message
Billy Kwong (tuppa) wrote :

NM should not "disconnect" if a static IP is set. That's the bug.

Revision history for this message
Billy Kwong (tuppa) wrote :

Cool, the bug is fixed for me with network-manager-0.6.4-6ubuntu3. Putting the interface in static IP mode will not cause NM to disconnect.

Revision history for this message
Albrecht Mühlenschulte (a7p) wrote : Fixed

Indeed, it is fixed.

@Tollef Fog Heen: you should close it now.

Revision history for this message
Chris Burgan (cburgan) wrote : Re: Can't use static ip address with network-manager

Marking as fix released. Feel free to post and correct me if this is not the case.

Changed in network-manager:
status: Confirmed → Fix Released
Revision history for this message
Mantas Kriaučiūnas (mantas) wrote :

> Marking as fix released. Feel free to post and correct me if this is not the case.

Static IP configuration still doesn't work as default in Ubuntu Feisty final if network-manager is used. Problem still left the same, like I described in this comment: https://bugs.launchpad.net/baltix/+bug/5364/comments/22

Shortly - try to boot from Live CD ant to set static IP address, like I described in comment above. After setting static IP you need to deactivate an interface and activate it again, only then static IP configuration starts work:

[..]
2. enter static IP, netmask, gateway and clicked on "OK" button;
3. when I clicked on "OK" button then some progress bar in network settings dialog was displayed for a while, but internet connection wasn't activated when progress bar window dissapers, look at ifconfig output:
ubuntu@ubuntu:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:36:A7:71:DB
          inet6 addr: fe80::216:36ff:fea7:71db/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

4. then I clicked on the checkbox near the "Wired connection" (turned off "Wired connection"), and, after several seconds, clicked on the checkbox near the "Wired connection" again, and only then my "Wired connection" with static IP started to work, look at ifconfig output:
ubuntu@ubuntu:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:36:A7:71:DB
          inet addr:192.168.0.66 Bcast:192.168.0.255 Mask:255.255.255.0
          inet6 addr: fe80::216:36ff:fea7:71db/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

Changed in network-manager:
status: Fix Released → Confirmed
Revision history for this message
Craig Box (craig.box) wrote :

We still have the problem that you can't support a VPN connection with a static IP address, as per bug 114700.

Revision history for this message
Fabien Lusseau (fabien-beosfrance) wrote :

I want this functionality too !

Because i use the WPA encryption and NFS for file sharing with my other computer ...

Tollef Fog Heen (tfheen)
Changed in network-manager:
assignee: tfheen → nobody
Revision history for this message
VDR (vdr) wrote :

network-manager with network-manager-openvpn in gutsy 7.10 still cannot find an active device when it`s configured as static ip...
This behaviour is not accepted for normal use of nm with openvpn plugin :( :( :(

Revision history for this message
tilman (tilmaniac) wrote :

I would also like to make a VPN connection using NetworkManager when my internet connection is statically defined.
It would be great if this could work in Feisty.

Revision history for this message
Some Guy I Guess (dgreekas) wrote :

So after spending a DAY trying to figure out why none of the VPN setup guids seem to work for me I find the answer here.

Static IPs are often required by users and admins in corporate networks, also some home users may be statically assigned in some special configurations. Developers and consultants that move between development networks and corporate networks need the flexibility to change their configurations regularly and keep multiple profiles.

I see no valid reason why it should not be supported, nor why network manager fails altogether when it is used. It is basic networking, in fact Static support should have been implemented before DHCP.

Revision history for this message
Craig Box (craig.box) wrote : Re: [Bug 5364] Re: Can't use static ip address with network-manager (and thus no VPN connections menu for static users)

>
> Static IPs are often required by users and admins in corporate networks,
> also some home users may be statically assigned in some special
> configurations. Developers and consultants that move between development
> networks and corporate networks need the flexibility to change their
> configurations regularly and keep multiple profiles.
>
> I see no valid reason why it should not be supported, nor why network
> manager fails altogether when it is used. It is basic networking, in
> fact Static support should have been implemented before DHCP.

Static IP addresses are supported in NM 0.7, which is looking likely to be
finished in the Hardy timeframe.

We are all very aware of the reasons for supporting static IP addresses: the
upstream developers targeted NM at a very specific use case (laptop users
with wireless networks), and then added VPN support so they could connect
back to the Red Hat private network via vpnc. As the time has gone on, the
project has got good enough to be used for some other purposes, but not
all. The answer is "they know, but there's just not enough people working
on it to do everything at once".

Revision history for this message
DaveAbrahams (boostpro) wrote :

This is a very serious BUG; I can't understand how it can be marked "wishlist." That designation should be reserved for feature requests.

Revision history for this message
DaveAbrahams (boostpro) wrote :

I should add that the behavior for me is that the system works for a while, then all of a sudden it can't browse the web, and linux machines on my local net can't ssh into it. However, Macs can ssh into it, and they can do so using the avahi name <machinename>.local

Revision history for this message
Roberto Sarrionandia (rbs-tito) wrote :

While this is wishlist, as the software doesn't advertise the feature, it is a pretty basic and essential wish.

When I go to school we have a wireless access point that is not linked to a DHCP server, I must connect and request an IP that has been assigned to me. I can do this fine with the traditional ifup/gnome network method.

However, when I go home I have WPA and must use network-manager. It is very unintuitive to switch between network backends three times per day.

Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

This bug was nominated for Gutsy but does currently not qualify for a 7.10 stable release update (SRU) and the nomination is therefore declined.
According the the SRU policy, the fix should already be deployed and tested in the current development version before an update to the stable releases will be considered. With 7.10 now released, that policy applies to this bug. See: https://wiki.ubuntu.com/StableReleaseUpdates .
The bug is not being closed as work will continue on fixing it for the next release, Hardy Heron (8.04). If the state of this bug should change such that it qualifies for the SRU process, please contact the person who originally declined it and ask them to re-evaluate it. To help improve the state of this bug see: https://wiki.ubuntu.com/Bugs/HowToTriage .

Revision history for this message
EKM (erik-mitchell) wrote :

I'm just adding a bump here. Reading through the thread I'm at a loss as to why it's so complicated with regards to vpnc. I have a desktop at home and a laptop. On my laptop, I can use the Network Manager applet to fire up the VPN connection with work (because of the current design, this is because my laptop uses WiFi). On my desktop, I cannot, because it is configured with a static IP on my home network.

My expectation as a user is that vpnc should be accessible in the same way on my laptop as on my desktop. That expectation is not being met with the current design.

I understand there was an original intent for the people who made Network Manager -- and it does a great job of managing different network environments that one finds with a laptop.

This vpnc thing needs attention though, because it shouldn't matter what your local area network connection is when you start your VPN connection. Ideally, the user should only have to worry about establishing an IP connection to his VPN concentrator -- and at that point be able to launch vpnc with Network Manager.

The other alternative is to create a vpnc applet that's separate from Network Manager. I think it would be better to improve Network Manager.

/me realizes he's sending to know for whom the bell tolls.

Revision history for this message
Wari Wahab (wari) wrote :

I'm sure network-manager is supposed to support multiple configurations. I need static IP on my system, I'm not using WiFi.

Here's what I do:
 * Click on nm-applet,
 * chose Manual Configuration
 * Click unlock
 * Chose eth0
 * Uncheck Enable Roaming Mode
 * Change the configuration to use static IP.

What I got:
Networking is disabled. running /etc/init.d/networking restart fails to bring up IP addresses. /etc/network/interfaces reads:
---------
auto lo
inface lo inet loopback

iface eth0 inet static
address 192.168.20.5
netmask 255.255.255.0
gateway 192.168.20.1
---------

This setup works in 7.10, but fails miserably in 8.04, fresh from CD to the latest upgraded one.

I can bring up the interfaces myself using ifconfig, but that really defeats the purpose.

I have other annoyances/pet-peeves with Network Manager on other distros, this current one on ubuntu is the worst.

Revision history for this message
Mark Favas (mark-favas) wrote :

If it is not possible to set a static IP address in 8.04 - or possible only by bringing up interfaces manually with ifconfig, then this is a serious regression. Please fix this.

Revision history for this message
Craig Box (craig.box) wrote :

It has never been possible to use a network card configured statically with
NetworkManager. If you set it static in /etc/network/interfaces then NM just
doesn't see it.

It is supported in 0.7, which is not final, and not yet in Ubuntu. Have a
look at http://ubuntuforums.org/archive/index.php/t-676992.html where you
are invited to test it.

Revision history for this message
Mark Favas (mark-favas) wrote :

The behaviour Wari Wahab described above is definitely a regression (and I can confirm that it works on 7.10, using nm-applet 0.6.5; and the interface is marked as static in /etc/network/interfaces) - it really needs to continue to work in 8.04.

Revision history for this message
Wari Wahab (wari) wrote :

Installed the latest network-manager package (0.7) and what I managed to get static ip work, after a reboot. The system boots up with the static IP, without the need to login, which is the behaviour I like (compared with other distros). nm-applet however reports "No network connection" even though network is fully working. Firefox will launch in "Offline Mode" as well, I'm not sure what other apps will say that I've got no network, as I feel the strong urge to go back to 7.10.

I'm not sure what you mean by network manager not supporting static IP when 1) the same steps worked before and 2) is everyone expected to use DHCP nowadays?

I'm running a service which I need to be mapped from the router, is no one running ubuntu doing such things anymore?

>> It has never been possible to use a network card configured statically with NetworkManager. If you set it static in /etc/network/interfaces then NM just doesn't see it.

Don't see it does not mean to kill network altogether.

Revision history for this message
Craig Box (craig.box) wrote :

I haven't spent much time running 7.10 so I can't comment for sure on the
behaviour there, but my understanding is that if you set a static IP
address in /etc/network/interfaces, your networking will still work, but
you won't get the wireless selection and VPN abilities of NetworkManager.

Is this not the case? Did the NM in gutsy change to support this, and if
so, is this referenced anywhere onlinE?

Revision history for this message
TomasHnyk (sup) wrote :

Wari: you can assign "pseudostatic" address even via DHCP based on your MAC address, granted you have admn priviledges on the router.

Revision history for this message
ekingery (pj-mfc) wrote :

In regards to Craig's comment above, I am running Ubuntu 7.10 - Gutsy Gibbon. I prefer to use a static IP. However, I have been stuck with using DHCP for the past year or so, because when network-manager is configured with a static IP, I cannot use it to connect to a VPN. The 'VPN Connections' option simply does not appear in the drop-down menu.

I believe bug 114700 is correctly marked as a duplicate of this one. After reading all of the posts, it seems some users (even the original creator) have muddled the definition of this bug with other problems. Let me know if I am off track here, and should be posting elsewhere. Also, on a personal note, I am fortunate that the DHCP address I am assigned rarely changes. If it did change, I would probably move to a different linux distribution, because using VPN and having a (relatively) static IP are essential to my computing needs. This bug is especially dangerous for me, considering network-manager vpn support was the only type I could get to work on my company's vpn.

I think this bug should be moved up in priority and if at all possible, fixed in the next release. It almost caused me to jump the ubuntu 6.10 ship about 10 months ago, and has not been addressed since.

Revision history for this message
Wari Wahab (wari) wrote :

Craig: I setup static IP using the nm-applet, not by editing the /etc/network/interfaces by hand. In 8.04, it disables networking entirely until I updated network-manager package. Still, apps like firefox, and nm-applet reports that I have no working network.

Now if I just installed ubuntu, and logged in, and have to configure static IP without changing config files, I would use "System" -> "Administration" -> "Network" to configure IP. Now if you say that the app does not support static IP, when why do I have the ability to configure it in the first place?

I don't need VPN (yet) and I don't need wireless at all. I used a standalone server/desktop and is not a roaming user.

TomasHnyk: My router is ISP provided and does not have the ability to bind an IP to a specific MAC address.

ekingery: Network Manager has many bugs throughout many distributions, all different. But his one in ubuntu is the most crippling in my use case scenario.

Revision history for this message
Craig Box (craig.box) wrote :

On Thu, Feb 28, 2008 at 10:29 AM, Wari Wahab <email address hidden> wrote:

> Craig: I setup static IP using the nm-applet, not by editing the
> /etc/network/interfaces by hand. In 8.04, it disables networking
> entirely until I updated network-manager package. Still, apps like
> firefox, and nm-applet reports that I have no working network.
>
> Now if I just installed ubuntu, and logged in, and have to configure
> static IP without changing config files, I would use "System" ->
> "Administration" -> "Network" to configure IP. Now if you say that the
> app does not support static IP, when why do I have the ability to
> configure it in the first place?

I believe that System, Administration, Network, and the NM applet, both call
into the same place - which edits /etc/network/interfaces. I will have to
have a look when I get some time - someone else may be able to confirm or
deny this.

Revision history for this message
Francesco "Zeirus" Sorrentino (zeirus) wrote :

I've the same problem of Wari Wahab in the Hardy Heron (latest version). I've a common Alice Router with DHCP activated, but static IP address not function (network is unreachable). Practically only "roaming mode" it's OK with nm-applet 0.6.6.

In Windows function all, with or without DHCP, with or without DNS manual.... in Ubuntu never!

network-restart function but the result is the same all times if i ping my router (192.168.0.10)

sudo /etc/init.d/networking restart

ping 192.168.0.10 --> connect: Network is unreachable... :(

Revision history for this message
Noah (nchase) wrote :

I too have the problem mentioned above with the latest Hardy Heron release.

The only way I'm currently able to connect to the internet is by using "roaming mode." In 7.10 I was able to configure a static IP address. Here I am able to configure a static IP address, but it does not seem to work at all.

Revision history for this message
Chen Ming (chenming) wrote :

I meet the probem today, in the lastest.

To do a workaround, I use /etc/rc.local to set my static address and default gateway. Maybe this way can help you.

# Add following lines to /etc/rc.local to setup a static ip address and default route.
ifconfig eth0 192.168.168.30
route add default gw 192.168.168.10

Revision history for this message
Noah (nchase) wrote :

This appears to have worked. Thank you very much!

On Tue, Mar 25, 2008 at 5:49 AM, ChenMing <email address hidden> wrote:

> I meet the probem today, in the lastest.
>
> To do a workaround, I use /etc/rc.local to set my static address and
> default gateway. Maybe this way can help you.
>
> # Add following lines to /etc/rc.local to setup a static ip address and
> default route.
> ifconfig eth0 192.168.168.30
> route add default gw 192.168.168.10
>
> --
> Can't use static ip address with network-manager (and thus no VPN
> connections menu for static users)
> https://bugs.launchpad.net/bugs/5364
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
fewyun (fewyun) wrote :

I have encountered this bug in the Hardy Beta as well. I set static IP by choosing "Manual configuration" in the Network Manager. I have been getting around it by opening the Network Manager, setting it to DHCP and then resetting it to Static IP. After that it works again (until the next reboot). (also, it starts working right once DHCP is set).

I will note that I am happy that the Network Manager now seems to save the unused static settings when DHCP is set, so that it is really easy just to switch back to static (It didn't do this in Gutsy).

I hope this provides more information to get it fixed -- for now I am going to try the workaround mentioned above.

Revision history for this message
Hew (hew) wrote :

Many people here are experiencing the bug where the static IP is not assigned on startup (bug #187274), which is different to this bug as originally submitted.

Revision history for this message
Blue (vali-dragnuta) wrote :

Well,we are a few years later and the same problem persists. You can now configure the network manually and set a static ip for wireless - but the setting it's not applied; Also network profiles still suck (as in they do not work at all at remembering combinations of wired/wireless settgins correctly).

Revision history for this message
Francesco "Zeirus" Sorrentino (zeirus) wrote :

The ChenMing's solution is very nice for me (either on desktop that laptop). I have changed only eth and gw's ip number:

# Add following lines to /etc/rc.local to setup a static ip address and default route.

ifconfig eth0 192.168.0.20
route add default gw 192.168.0.10

After a simple restart it's all right! ;)

Revision history for this message
mspanc (mspanc) wrote :

Unfortunately I have to agree with Blue. Isn't it really possible to do something with that?

Revision history for this message
rmcd (rmcd1024) wrote :

I just want to add my comment to those above. This problem is a show-stopper for me. It makes it impossible for me to use or to recommend Hardy, which I otherwise think is a terrific distribution.

Revision history for this message
ironfisher (dgvalde) wrote :

This bug should be priority. A lot of people need to use VPN while they are connected using an static IP for a lot of reason.

My reason: Some Internet suppliers provide one static IP by ethernet. If people want to use a bridge to have wireless connection they need to ask for the given IP to the bridge, and for this reason they need to set an static IP... nevertheless they can not use VPN whith NetworkManager in these cases.

Revision history for this message
Matthew Carpenter (matt-eisgr) wrote :

Indeed many networks require static IP address, even over a WPA wireless network... which is difficult to cobble together without creating a special wpa_supplicant config for that network. Net exactly nice when you guys have done such a great job making WPA simple.

Revision history for this message
Juan J. Martínez (jjmartinez) wrote :

On mainstream bug http://bugzilla.gnome.org/show_bug.cgi?id=156952 is closed as obsolete, but with Hardy I can't use the VPN stuff with network manager if I use static IP.

Revision history for this message
Craig Box (craig.box) wrote :

> On mainstream bug http://bugzilla.gnome.org/show_bug.cgi?id=156952 is
> closed as obsolete, but with Hardy I can't use the VPN stuff with
> network manager if I use static IP.

Upstream has moved to 0.7, but Ubuntu has not yet. 0.7 is more a
development-in-progress branch than a completely stable one, afaik.

There is also a new plugin architecture in 0.7 - OpenVPN and Cisco VPN
support has been ported, but PPTP has not. Therefore upgrading to 0.7
would break PPTP VPN support.

Follow https://code.launchpad.net/~ubuntu-core-dev/network-manager/ubuntu.0.7
if you wish (and especially if you can help) - it's possibly coming
for Intrepid Ibex.

Revision history for this message
John Vivirito (gnomefreak) wrote :

Craig Box wrote:
>> On mainstream bug http://bugzilla.gnome.org/show_bug.cgi?id=156952 is
>> closed as obsolete, but with Hardy I can't use the VPN stuff with
>> network manager if I use static IP.
>
> Upstream has moved to 0.7, but Ubuntu has not yet. 0.7 is more a
> development-in-progress branch than a completely stable one, afaik.
>
> There is also a new plugin architecture in 0.7 - OpenVPN and Cisco VPN
> support has been ported, but PPTP has not. Therefore upgrading to 0.7
> would break PPTP VPN support.
>
> Follow https://code.launchpad.net/~ubuntu-core-dev/network-manager/ubuntu.0.7
> if you wish (and especially if you can help) - it's possibly coming
> for Intrepid Ibex.
>
.7 wont be seen in Hardy unless Alexander decides to back port it once
its stable and in Intrepid. I highly doubt it will be backported and i
can say for sure it wont be backported until its stable.

--
Sincerely Yours,
    John Vivirito

https://launchpad.net/~gnomefreak
https://wiki.ubuntu.com/JohnVivirito
Linux User# 414246

Revision history for this message
Jasey (jason-rivers) wrote :

I think I can understand that.

it is an annoyance, but probably not as much as it not working atall.

I also have to use static IP's, but what i've recently done is set DHCPD up so that it knows of the mac Address's and then issues the same IP's all the time. my problem is my laptop with a Netgear MA111 - which seems to have to be manually configured - this then stops showing the option on hte network manager applet - so I've got a script to connect to my work VPN on that.

Jason

Revision history for this message
Eduardo Trápani (etrapani-gmail) wrote :

I have the same problem. Moved from 7.10 to 8.04. /etc/interfaces is:

auto lo
iface lo inet loopback

iface dsl-provider inet ppp
pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
provider dsl-provider

auto eth0
iface eth0 inet static
address 172.16.2.3
netmask 255.255.255.0
gateway 172.16.2.1

I know, since eth0 is listed here nm will not handle it. But it is nm the one that writes the stanza! And it worked perfectly in 7.10.

My problem is that no contextual menu shows for dsl (pppoe on eth0) if there is a static IP for eth0. The applet only shows manual. If I switch to roaming, then the contextual menu behaves correctly.

Revision history for this message
Alexander Sack (asac) wrote :

fixed in NM 0.7 (intrepid). static ips as well as lots of other tweaking is now available through NetworkManager applet.

Changed in network-manager:
status: Confirmed → Fix Released
Revision history for this message
Agostino Russo (ago) wrote :

Alex,

Not sure if I did anything wrong, but using intrepid daily of 26-09, the static IP settings entered via nm-connection-editor get reset at reboot to dhcp.

Revision history for this message
quink (quinks) wrote :

Can confirm behaviour by Agostino Russo.

Static IP gets reset back to DHCP after every reboot.

Revision history for this message
gheeke (gerhard-heeke) wrote :

> Static IP gets reset back to DHCP after every reboot

The following workaround works for me:

Open NetworkManager, Edit Connections. Delete the default connection (auto eth0). Add a new connection with the static ip address information. Somewhere during this process, the NetworkManager asks for a legitimation (like sudo).

Revision history for this message
David Santamaría Rogado (howl) wrote :

gheeke thanks for the info, but you missed something, tick the "System Setting" option, (for me appears as "Ajustes del sistema" in Spanish).

If you remove the auto eth0 and create your own network as system network it will ask for permission when applying it. If you try to make a network when there is already a system network it will untick the option when applying and won't ask for permission because is a user network.

Also i have found that this new system network ask for permission when trying to remove, edit... I think that the problem is that auto eth0 is created when there aren't networks configured but it don't work as a system network. Not asking for permission to save changes. Also i have found that system networks always appears as never connected in the network editor but the user networks this info works well.

The bug must be that the network created by nm, when there aren't any, is badly created. Also the network editor should be worked a little more, moving the tick for system network as a new column in the all networks list and being a radio button instead of a check box, unless that nm supports more then one system network, in that case there is a bug that don't let the user to do that. One more bug that i thinks there is is that nm always connect at start with the system network instead of using the users last network that can be a network defined at user level instead of system level.

Sorry my English, I don't know how to explain this better.

Revision history for this message
C. Lopez (pceros) wrote :

In any case, it works for me. I follow gheeke's coments and now I have my fixed IP when restarting PC. Thank you very much (three days of configuring network remember me Windows age; a not very interesting moment of my computer live)

Revision history for this message
jonny (jonny-jonespenarth) wrote :

I also found that gheeke's solution workds for me, but, if this isn't a bug, it's very bad user interface design. The order that you follow the steps matters - and I can't see why it should.

If I add a static connection and then delete the system-created dhcp auto-eth0 connection, the dhcp connection is silently reinstated on startup, regardless of how I toggle the System Setting and Connect Automatically flags. However, if I reverse the order and delete the dhcp connection before adding my static connection, I get prompted for my password when I recreate the new connection and the new configuration survives a reboot. I've tested this behaviour on two different Intrepid boxes, one of which was a clean install and the other a Hardy upgrade.

Revision history for this message
Artist (painterii) wrote :

It's not a bug. Read /usr/share/doc/network-manager/README.Debian, please.

To manager your network manually,

First to edit (as root) /etc/NetworkManager/nm-system-settings.conf:

  [ifupdown]
  managed=true

then edit your /etc/network/interfaces and /etc/resolv.conf for your IP and name server.

then reboot.

Then will be OK.

Revision history for this message
Artist (painterii) wrote :

Example for set a static IP:

1. edit (as root) /etc/NetworkManager/nm-system-settings.conf:
---------------------------------
  [ifupdown]
  managed=true
---------------------------------

2. edit (as root) /etc/network/interfaces
---------------------------------
auto lo
iface lo inet loopback

auto eth0

iface eth0 inet static
address 192.168.18.111 #(your IP instead)
netmask 255.255.255.0
gateway 192.168.18.1 #(your gateway instead)
mtu 1400 #(option)
----------------------------------

3. edit(as root) /etc/resolv.conf
-----------------------------------
# Generated by NetworkManager
domain login
search login
nameserver 202.96.64.68 202.96.69.38 192.168.18.1 #(the name server your area)
-----------------------------------

Why do so, read /usr/share/doc/network-manager/README.Debian, please.

Revision history for this message
Andrew Conkling (andrewski) wrote :

On Mon, Dec 8, 2008 at 11:47 AM, Artist <painterii@126.com> wrote:

> It's not a bug.

Yes, it was. And it's fixed now. :)

Revision history for this message
David Santamaría Rogado (howl) wrote :

Artist, it's a bug since NetworkManager 0.7 support static ip addresses.

The steps you describe are necessary with nm < 0.7, and, anyway is easiest to use the now obsolete gnome network graphical manager, only need to set "modo intenerante" (spanish) to off and the configure the network.

Revision history for this message
Artist (painterii) wrote :

Thank you, Andrew and Howl. :)

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

The KNetworkManager portion of this is being tracked in bug 280762, and it has a fair amount of duplicates itself so it probably won't be marked a dupe of this bug.

Changed in knetworkmanager:
status: New → Invalid
Revision history for this message
evaimitico (evaimitico) wrote :

i have Ubuntu 8.10 64 bit
i tried a static configuration, using NM-configuration editor, of my WPA wireless network, but i have problem with gateway settings, even if i filled the necessary info

nm-tool output:
- Device: wlan0 ----------------------------------------------------------------
  Type: 802.11 WiFi
  Driver: iwlagn
  State: connected
  Default: no
  HW Address: 00:21:5D:7B:D5:FC

[..cut..]

  IPv4 Settings:
    Address: 192.168.0.2
    Prefix: 24 (255.255.255.0)
    Gateway: 0.0.0.0

    DNS: 192.168.0.1

my /etc/ntework/interfaces:
auto lo
iface lo inet loopback

root@fab-laptop:/etc/NetworkManager# route -n
Tabella di routing IP del kernel
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 2 0 0 wlan0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlan0

root@fab-laptop:/etc/NetworkManager# cat /etc/resolv.conf
# Generated by NetworkManager

Do you need other infos?

Revision history for this message
evaimitico (evaimitico) wrote :

i resolved my problem.
The guilty was nm-connection-editor who didn't save the gateway configuration, even if i wrote it.

Workaround:
- open gconf-editor
- search in /system/networking/connections the problematic connections ( 8, in my case)
- open the voice ipv4
- in addresses, i replaced the last 0 with the integer conversion of my gateway ip

For ip to integer you can see:
http://www.arachnoid.com/linux/NetworkManager/

Changed in network-manager (Ubuntu):
status: Fix Released → Fix Committed
status: Fix Committed → Fix Released
Revision history for this message
Andrey Beljakov (andvalb) wrote :

Bug still present for VPN connections in lucid.
5 years past...
Fast bugfixing...

Revision history for this message
Andrey Beljakov (andvalb) wrote :

Workaraund from post №93 not work for VPN connections in lucid.
No way.

Revision history for this message
Yusef Maali (usef) wrote :

Speaking about Kubuntu and not Ubuntu, I noticed the the "Auto Eth0" and its "Connect automatically" flag is not editable. This makes impossible to create a custom connection (ie for static ip).
At each startup the "Auto Eth0" takes priority over all other connections.

I have filed a bug report about this:
https://bugs.launchpad.net/bugs/591024

Revision history for this message
knorr (a-sokolov) wrote :

Workaround: create dummy DSL connection and fill ip settings
then gconf-editor - found dummy DSL connection (last one), copy paste to needed VPN connection, and don't forget to change maethod from "auto" to "manual".

Revision history for this message
knorr (a-sokolov) wrote :

sorry about poor english

Changed in network-manager:
importance: Unknown → Medium
status: Invalid → Expired
Revision history for this message
josepcoves (josepcoves) wrote :

Same bug on Maverick Meerkat... Knorr could you explain some more your workaround it's not clear enough for me...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.