Results 1 to 5 of 5

Thread: Network manager replaces default route when eth cable is plugged

  1. #1
    Join Date
    May 2006
    Beans
    7

    Network manager replaces default route when eth cable is plugged

    Hello.

    I have been encountering this problem, not only on 10.4, but on older versions too: I use a wifi router to connect my laptop to the Internet, but sometimes I need to connect directly to another computer to move some files over GLAN. But Ubuntu's Network manager doesn't allow me to configure the eth0 interface without specifying a gateway (no gateway = grey submit button), but when a gateway is specified, it always rewrites the default gw specified already by the active wifi connection and returns back after unplugging the eth cable.

    Of course this can be solved by a few route commands, but this is unacceptable since it is needed to establish the cable connection without any further assistance from within and as well without replacing the default gw and thus breaking the Internet connection. Is there, please, any possibility how to prevent Network Manager from replacing these routes?

    Thank you in advance for any tips, how to get rid of this problem!

  2. #2
    Join Date
    May 2006
    Beans
    7

    Re: Network manager replaces default route when eth cable is plugged

    Maybe found a solution by manually editing /etc/NetworkManager/system-connections/<ConnectionName> and in the [ipv4] section setting ignore-auto-routes and ignore-auto-dns both to true (and setting the gw to 0.0.0.0, but I am not sure whether this is needed). Works for now even after reboot. Hope it will last.

  3. #3
    Join Date
    Apr 2010
    Location
    USA
    Beans
    79
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Network manager replaces default route when eth cable is plugged

    Just ran across your thread trying to solve this for myself. I did find a solution. In NetworkManager, edit the connection you're using for local only. You have to enter a default gateway (I consider this to be a bug as a default route is not necessary for IP to work on the local subnet). Under IPv4, click "Routes..." and then check the box that says "Use this connection only for resources on its network." That causes it to ignore the default gateway and only use that connection for its particular subnet.

  4. #4
    Join Date
    Jan 2011
    Beans
    3

    Re: Network manager replaces default route when eth cable is plugged

    Hello Karl1982

    Thank you so very much for this bit of info you have shared there! You saved my sanity on that one...
    In Ubuntu 10.04, to set a "useless" gateway route way not necessary... Not sure why this is necessary now, but it is!

    Thanks again for this post!

  5. #5
    Join Date
    Feb 2008
    Location
    Texas
    Beans
    21,293
    Distro
    Ubuntu Gnome Development Release

    Re: Network manager replaces default route when eth cable is plugged

    Old thread closed.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •