Announcement

Collapse
No announcement yet.

No IPv4 address from dhclient

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    No IPv4 address from dhclient

    Hey All,

    My wired connection eth0 stopped working recently, but my wifi connection is
    fine. I've spent a lot of time googling, trying to fix it. The problem seems to be that
    dhclient isn't getting an IP address, but I don't know why. I don't think the
    router is the problem, because all other devices on my network get an IP
    address. Below is some background info.

    Code:
    drreid@NUC:~$ ifconfig eth0
    eth0      Link encap:Ethernet  HWaddr b8:ae:ed:76:6b:29  
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:37433 errors:0 dropped:0 overruns:0 frame:0
           TX packets:7792 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000 
           RX bytes:2699357 (2.6 MB)  TX bytes:1277043 (1.2 MB)
           Interrupt:20 Memory:f7100000-f7120000
    Code:
    drreid@NUC:~$ nmcli dev list iface eth0
    GENERAL.DEVICE:                         eth0
    GENERAL.TYPE:                           802-3-ethernet
    GENERAL.VENDOR:                         Intel Corporation
    GENERAL.PRODUCT:                        --
    GENERAL.DRIVER:                         e1000e
    GENERAL.DRIVER-VERSION:                 2.3.2-k
    GENERAL.FIRMWARE-VERSION:               0.2-4
    GENERAL.HWADDR:                         B8:AE:ED:76:6B:29
    GENERAL.STATE:                          30 (disconnected)
    GENERAL.REASON:                         0 (No reason given)
    GENERAL.UDI:                            /sys/devices/pci0000:00/0000:00:19.0/net/eth0
    GENERAL.IP-IFACE:                       
    GENERAL.NM-MANAGED:                     yes
    GENERAL.AUTOCONNECT:                    yes
    GENERAL.FIRMWARE-MISSING:               no
    GENERAL.CONNECTION:                     not connected
    CAPABILITIES.CARRIER-DETECT:            yes
    CAPABILITIES.SPEED:                     1000 Mb/s
    CONNECTIONS.AVAILABLE-CONNECTION-PATHS: /org/freedesktop/NetworkManager/Settings/{1}
    CONNECTIONS.AVAILABLE-CONNECTIONS[1]:   32069a3c-5e2a-4aa0-990c-a072b9687be1 | Wired connection 1
    WIRED-PROPERTIES.CARRIER:               on
    Code:
    grep -i networkmanager /var/log/syslog | less
    Jan 20 14:16:49 NUC NetworkManager[5419]: <info> Auto-activating connection 'Wired connection 1'.
    Jan 20 14:16:49 NUC NetworkManager[5419]: <info> Activation (eth0) starting connection 'Wired connection 1'
    Jan 20 14:16:49 NUC NetworkManager[5419]: <info> (eth0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
    Jan 20 14:16:49 NUC NetworkManager[5419]: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) scheduled...
    Jan 20 14:16:49 NUC NetworkManager[5419]: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) started...
    Jan 20 14:16:49 NUC NetworkManager[5419]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) scheduled...
    Jan 20 14:16:49 NUC NetworkManager[5419]: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) complete.
    Jan 20 14:16:49 NUC NetworkManager[5419]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) starting...
    Jan 20 14:16:49 NUC NetworkManager[5419]: <info> (eth0): device state change: prepare -> config (reason 'none') [40 50 0]
    Jan 20 14:16:49 NUC NetworkManager[5419]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) successful.
    Jan 20 14:16:49 NUC NetworkManager[5419]: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) scheduled.
    Jan 20 14:16:49 NUC NetworkManager[5419]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) complete.
    Jan 20 14:16:49 NUC NetworkManager[5419]: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) started...
    Jan 20 14:16:49 NUC NetworkManager[5419]: <info> (eth0): device state change: config -> ip-config (reason 'none') [50 70 0]
    Jan 20 14:16:49 NUC NetworkManager[5419]: <info> Activation (eth0) Beginning DHCPv4 transaction (timeout in 45 seconds)
    Jan 20 14:16:49 NUC NetworkManager[5419]: <info> dhclient started with pid 10532
    Jan 20 14:16:49 NUC NetworkManager[5419]: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) complete.
    Jan 20 14:16:49 NUC NetworkManager[5419]: <info> (eth0): DHCPv4 state changed nbi -> preinit
    Jan 20 14:17:34 NUC NetworkManager[5419]: <warn> (eth0): DHCPv4 request timed out.
    Jan 20 14:17:34 NUC NetworkManager[5419]: <info> (eth0): canceled DHCP transaction, DHCP client pid 10532
    Jan 20 14:17:34 NUC NetworkManager[5419]: <info> A

    #2
    Does booting from a USB stick or CD give the same problem? Any Kubuntu installer will do (though recent versions may not call the wired interface eth0), though trouble-shooting might be easier with something like systemrescuecd.

    Regards, John Little
    Regards, John Little

    Comment


      #3
      Hey John,

      I tried that with the Kubuntu Live CD, but it didn't help. I also tried updating my e1000e ethernet driver to the latest version and switching to wicd but neither of them helped either. I may just upgrade to Kubuntu 17 when it's convenient. Since I have a good wifi connection this issue isn't urgent. I'd still like to know what the root cause is though.

      -drreid

      Comment


        #4
        When to Debian/Kubuntu/Neon (?) revert back to use eth0 as a name for the first internet cable port?

        My "eth0" port has been labeled "enp14s0" for years and attempts to use eth0 usually fail. Using ifconfig -a will give a list of Internet connections that include inactive ports. I don't have a cat7 cable plugged into my eth0 port on the side of my laptop so enp14s0 doesn't show unless I use the "-a" parameter. My WiFi connection shows as wlp13s0, not wlan0.
        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
        – John F. Kennedy, February 26, 1962.

        Comment


          #5
          Hey GreyGeek,

          For me, ifconfig and ifconfig -a give the same output. AFAIK eth0 has always been my default ethernet connection on all my linux boxes.

          If I set a static IP address it doesn't work. I'm almost sure the problem is in dhclient not getting an IP address. dhclient -v eth0 gives the following.

          Code:
          Internet Systems Consortium DHCP Client 4.2.4
          Copyright 2004-2012 Internet Systems Consortium.
          All rights reserved.
          For info, please visit https://www.isc.org/software/dhcp/
          
          Listening on LPF/eth0/b8:ae:ed:76:6b:29
          Sending on   LPF/eth0/b8:ae:ed:76:6b:29
          Sending on   Socket/fallback
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 21 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 15 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 21 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 20 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 15 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 17 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 18 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9 (xid=0x4349164d)
          DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11 (xid=0x4349164d)
          No DHCPOFFERS received.
          No working leases in persistent database - sleeping.

          Comment


            #6
            Possible solutions:
            https://ubuntuforums.org/archive/ind...t-1689102.html

            http://cslu.ogi.edu/~zak/debianclust...eshooting_DHCP

            Router problem?
            http://aptosid.com/index.php?name=PN...ewtopic&t=1663

            Or, from another source:
            Solution:

            With the help of Fabbys' answer I was able to come up with a more viable solution that I can live with.

            Open /etc/network/interfaces and configure the ethernet interface one of these following ways:

            DHCP

            auto eth0
            iface eth0 inet dhcp
            pre-up ifconfig $IFACE up
            pre-up ethtool -s $IFACE speed 100 duplex full autoneg off

            Static

            auto eth0
            iface eth0 inet static
            post-up ethtool -s $IFACE speed 100 duplex full autoneg off
            address x.x.x.x #Internal IP
            netmask 255.255.255.0
            gateway x.x.x.y #Gateway IP
            dns-nameservers 8.8.8.8 #Google DNS

            I hope this helps someone else in the future.
            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
            – John F. Kennedy, February 26, 1962.

            Comment


              #7
              Looks to me like you're not connected to the router. What does "route" show?

              Please Read Me

              Comment

              Working...
              X