Bug#693512: [Pkg-utopia-maintainers] Bug#693512: network-manager: Network manager does not remove default routes
Hi Michael, Thanks for the troubleshooting. I think we have several options here (as far as I see). We can also combined some of them: - Modify ifupdown to be aware of networkmanager installation (as you suggested) - Modify networkmanager to remove/modify/backup /e/n/i interfaces managed by it (at installation time only or automatically done after the interfaces is managed by networkmanager - this last one is even complex?) - Message in networkmanager at installation time if ifupdown is installed (also include this information in /usr/share/doc) - Modify networkmanager documentation ( http://wiki.debian.org/NetworkManager#Enabling_Interface_Management) to point out Michael suggestion to manually remove references in /e/n/i for interfaces managed by networkmanager (if not done automatically by previous options) What do you think? Regards On Sun, Nov 18, 2012 at 1:39 PM, Michael Biebl bi...@debian.org wrote: On 18.11.2012 13:29, Miguel A. Rojas wrote: # The primary network interface allow-hotplug eth0 iface eth0 inet static address 192.168.2.2 netmask 255.255.255.0 network 192.168.2.0 broadcast 192.168.2.255 gateway 192.168.2.1 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 85.62.229.131 85.62.229.132 --- As you may see, after networkmanager installation, /etc/network/interfaces was not modified (I do not know if this is the default behaviour). I managed to enable interface managed according to http://wiki.debian.org/NetworkManager#Enabling_Interface_Management. After doing that, networkmanager was able to manage the interface and I suppose it got the information from /etc/network/interfaces. Let me know if you need anything else from my side. I really do not know where this route is coming from. Perhaps I did something wrong in the procedure, but I just followed the standard manuals. So, the problem is basically this: You have eth0 configured in /etc/network/interfaces. This device is now configured *both* by ifupdown and NetworkManager if you set managed=true. So I actually do not recommend that as maintainer of network-manager (contrary to what the wiki says). So, if you want to manage eth0 with NetworkManager it is better to remove the (eth0) configuration from /etc/network/interfaces completely, so ifupdown does no longer touch it. Now, while NetworkManager does not enable a ethernet interface if there is no network link, ifupdown does not care. It simply runs ifup eth0 during boot. This is why your eth0 network device is brought up and you have this route entry. So, in summary, I don't think there is actually a bug in network-manager. It's just the way what happens if you configure your system to use managed=true. Andrew, do you have a better idea how to handle this situation? Could ifup/ifdown be changed to check if managed=true is set and not configure the device in this case? Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
Bug#693512: [Pkg-utopia-maintainers] Bug#693512: network-manager: Network manager does not remove default routes
On 19.11.2012 10:11, Miguel Angel Rojas wrote: Hi Michael, Thanks for the troubleshooting. I think we have several options here (as far as I see). We can also combined some of them: - Modify ifupdown to be aware of networkmanager installation (as you suggested) - Modify networkmanager to remove/modify/backup /e/n/i interfaces managed by it (at installation time only or automatically done after the interfaces is managed by networkmanager - this last one is even complex?) I'm a bit worried about that. We already do mangle /e/n/i for dhcp-only connections [1], and NM get's a lot of bad rep because of that. If we do that, we should at least pop up a debconf prompt, so users can opt-out of that process. In the past, we had to do that, because the debian-installer creates a /e/n/i configuration for basically every system. So NM was useless by default, because it did not manage the device. This confused a *lot* of people. In d-i 7, the installer will write a NM config and *no* /e/n/i config if NM is installed e.g. via the GNOME desktop task. So I'm tempted to just drop the /e/n/i mangling altogether or as said, at least put it behind a debconf prompt. - Message in networkmanager at installation time if ifupdown is installed (also include this information in /usr/share/doc) A simple warning on stdout would be trivial to implement. I fear, that it might go unnoticed though for many. But it certainly is an option. - Modify networkmanager documentation ( http://wiki.debian.org/NetworkManager#Enabling_Interface_Management) to point out Michael suggestion to manually remove references in /e/n/i for interfaces managed by networkmanager (if not done automatically by previous options) The wiki should definitely be updated. Michael [1] via /usr/lib/NetworkManager/ifblacklist_migrate.sh -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? signature.asc Description: OpenPGP digital signature
Bug#693512: [Pkg-utopia-maintainers] Bug#693512: network-manager: Network manager does not remove default routes
Am 17.11.2012 12:28, schrieb Miguel Angel: Package: network-manager Version: 0.9.4.0-6 Severity: normal I have 2 connections in my computer: eth0 : physical connectivity wlan0 : wireless connectivity I used to connect to my network through a physical connection but it is not in place anymore, so I decided to connect through wifi (wlan0). Network-manager is not removing the default routing I had before and every time I would like to connect I have to manually remove this route. As far as I understand from the network-manager, this should be automatically done by network-manager (removing and adding default new routes depending on current network connection) Here you have the example: /* System has booted up*/ $ netstat -nr Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 0.0.0.0 192.168.2.1 0.0.0.0 UG0 0 0 eth0 192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 /* I connect to my wifi connection through network manager in KDE */ # netstat -nr Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 0.0.0.0 192.168.2.1 0.0.0.0 UG0 0 0 wlan0 192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0 /* As you can see, eth0 configuration routing is still there!!) # route del -net 192.168.2.0 netmask 255.255.255.0 eth0 /* After deleting the default route, it is working again) You are not deleting the default route here. The default route is correctly pointing to wlan0. Could you post your /etc/network/interfaces config file. I'm wondering if you configure eth0 via ifupdown. Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? signature.asc Description: OpenPGP digital signature
Bug#693512: [Pkg-utopia-maintainers] Bug#693512: network-manager: Network manager does not remove default routes
Hi Michael, You're right. This is not the default route but it seems my DNS servers are pointing to the my router (DHCP default configuration in my router); therefore I cannot resolve DNS entries because these DNS packages are going through eth0 (eth0 route entry is before wlan one, as you may see) . If I try to connect through IP, my network connectivity is working. Here you have my e/n/i: --- $ cat /etc/network/interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth0 iface eth0 inet static address 192.168.2.2 netmask 255.255.255.0 network 192.168.2.0 broadcast 192.168.2.255 gateway 192.168.2.1 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 85.62.229.131 85.62.229.132 --- As you may see, after networkmanager installation, /etc/network/interfaces was not modified (I do not know if this is the default behaviour). I managed to enable interface managed according to http://wiki.debian.org/NetworkManager#Enabling_Interface_Management. After doing that, networkmanager was able to manage the interface and I suppose it got the information from /etc/network/interfaces. Let me know if you need anything else from my side. I really do not know where this route is coming from. Perhaps I did something wrong in the procedure, but I just followed the standard manuals. I really appreciate your time and effort. Thanks! -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#693512: [Pkg-utopia-maintainers] Bug#693512: network-manager: Network manager does not remove default routes
On 18.11.2012 13:29, Miguel A. Rojas wrote: # The primary network interface allow-hotplug eth0 iface eth0 inet static address 192.168.2.2 netmask 255.255.255.0 network 192.168.2.0 broadcast 192.168.2.255 gateway 192.168.2.1 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 85.62.229.131 85.62.229.132 --- As you may see, after networkmanager installation, /etc/network/interfaces was not modified (I do not know if this is the default behaviour). I managed to enable interface managed according to http://wiki.debian.org/NetworkManager#Enabling_Interface_Management. After doing that, networkmanager was able to manage the interface and I suppose it got the information from /etc/network/interfaces. Let me know if you need anything else from my side. I really do not know where this route is coming from. Perhaps I did something wrong in the procedure, but I just followed the standard manuals. So, the problem is basically this: You have eth0 configured in /etc/network/interfaces. This device is now configured *both* by ifupdown and NetworkManager if you set managed=true. So I actually do not recommend that as maintainer of network-manager (contrary to what the wiki says). So, if you want to manage eth0 with NetworkManager it is better to remove the (eth0) configuration from /etc/network/interfaces completely, so ifupdown does no longer touch it. Now, while NetworkManager does not enable a ethernet interface if there is no network link, ifupdown does not care. It simply runs ifup eth0 during boot. This is why your eth0 network device is brought up and you have this route entry. So, in summary, I don't think there is actually a bug in network-manager. It's just the way what happens if you configure your system to use managed=true. Andrew, do you have a better idea how to handle this situation? Could ifup/ifdown be changed to check if managed=true is set and not configure the device in this case? Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? signature.asc Description: OpenPGP digital signature