Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Network-Manager Problem DHCP Lease (wrong dhclient usage?)

  1. #11
    Join Date
    Mar 2008
    Beans
    34
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Network-Manager Problem DHCP Lease (wrong dhclient usage?)

    Great Stuff!
    Working again
    Thanks very much!

  2. #12
    Join Date
    Oct 2005
    Location
    Bordeaux, France
    Beans
    93
    Distro
    Ubuntu Studio 12.04 Precise Pangolin

    Smile Re: Network-Manager Problem DHCP Lease (wrong dhclient usage?)

    thanks mtrudel !
    I switched ppa and forced a downgrade, and now it's ok again ))

  3. #13
    Join Date
    Jul 2006
    Location
    Sydney
    Beans
    45
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Network-Manager Problem DHCP Lease (wrong dhclient usage?)

    I've just setup a new machine, in an unusual way (to avoid having to reinstall hundreds of packages and configure all the mail and samba and print etc. etc. again), by doing something risky:

    1) Install a barebones Ubuntu 9.10 from CD
    2) Copy *all* files from old PC also running 9.10 to the new
    (yes, even all of / including /etc!)
    3) Fixed /etc/fstab and grub config and /etc/hosts to use the
    new hard drive arrangements and local IP addresses
    4) Eventually got ethernet working, after realising eth0's name
    had changed to eth1 on the new PC

    Then things get weird. I read all the NetworkManager ubuntu documentation, but there was precious little in there to actually work out what it's doing under the hood and therefore diagnose what's wrong. After a lot of effort I could get NM to try to connect and after about 40 seconds, fail. It seemed to take the time that it took dhclient to fail if I ran it manually from the command line, like so::

    Code:
        # dhclient
        Internet Systems Consortium DHCP Client V3.1.2
        Copyright 2004-2008 Internet Systems Consortium.
        All rights reserved.
        For info, please visit http://www.isc.org/sw/dhcp/
    
        Listening on LPF/eth1/e0:cb:4e:51:ff:23
        Sending on   LPF/eth1/e0:cb:4e:51:ff:23
        Sending on   Socket/fallback
        DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 6
        DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 7
        DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
        DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 12
        DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 13
        DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
        DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 7
        No DHCPOFFERS received.
        No working leases in persistent database - sleeping.
    Note that the network would work fine if I ran these commands as root:

    Code:
    # ifconfig eth1 inet 192.168.1.102 netmask 255.255.255.0 broadcast 192.168.1.255
    # route add default gw 192.168.1.1
    I purged my old NM packages, and reinstalled the ones from the PPA ppa:network-manager/trunk. What happens for me now is that NM tries to connect, and just sits there forever trying, according to the status bar.

    On the plus side, if I run dhclient manually now, it instantly gets a correct lease and the network is up.

    Because I can't find a way to discover what NM is actually doing when it tries to connect (if I try running it from the command line with debug enabled, it just complains that NM is already running), I've decided the package jut isn't worth the trouble, and will just change /etc/network/interfaces to run dhcpc itself, and tell NM that it should manage nothing.

    I've done lots of googling to try to fix the problem, and NM just seems too much a black box, not diagnosable, so I'm scrapping it.

    From the logs on my firewall/router, it looks like NM links to it on port 137 (so I assume it's asking for a DHCP lease), but it never seems to get one. Whereas now if I run dhclient manually, I do get one.

    For what it's worth, here are my /etc/network/interfaces file before I got rid of NM:

    Code:
    # 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
    
    # Try adding this:
    # The primary network interface
    auto eth1
    /etc/NetworkManager/nm-system-settings.conf before I changed the managed to false:

    Code:
    # This file is installed into /etc/NetworkManager, and is loaded by 
    # NetworkManager by default.  To override, specify: '--config file' 
    # during NM startup.  This can be done by appending to DAEMON_OPTS in 
    # the file:
    #
    # /etc/default/NetworkManager
    #
    
    [main]
    plugins=ifupdown,keyfile
    
    [ifupdown]
    managed=true
    luke

  4. #14
    Join Date
    Aug 2009
    Beans
    8

    Re: Network-Manager Problem DHCP Lease (wrong dhclient usage?)

    I'm having a strange problem - seems related -

    I have two interfaces - eth0 and eth1.

    Both DHCP - addresses only.
    eth0 is set for local route only.
    eth1 will use the routes given by DHCP (default)

    eth0 works fine - but eth1 never succeeds at dhcp. I see a request go out in wireshark with my MAC address, but network manager declares failure.

    dhclient eth1 works like a charm

    eth0 uses DHCP (to a different server on a different network) no problems

Page 2 of 2 FirstFirst 12

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
  •