WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: No Internet (inet addr) on detected eth0 connection  (Read 5071 times)

Offline Rudock1

  • Jr. Member
  • **
  • Posts: 62
No Internet (inet addr) on detected eth0 connection
« on: September 08, 2019, 12:58:12 PM »
Hi TC friends,

I use one TC 10.0 bootable USB thumb drive on many machines and all of them use eth0 for networking.  Every now and then, I get a machine that will not connect to the Internet (it does connect using Windows). Per ifconfig, as far as I can tell, eth0 is discovered and present.  I am hoping with your help I could learn how to troubleshoot this area Linux networking.

Below are some outputs from a PROBLEM system using various commands and with my comments I hope will give you enough details to suggest next steps.  I have a simple router with typical 192.168.x.x addresses.

Code: [Select]
[~]{$?=0}Sun Sep 08 06:08:35 > dmesg | grep -i eth0
[    1.939111] e1000e 0000:00:19.0 eth0: (PCI Express:2.5GT/s:Width x1) ec:f4:bb:39:95:xx
[    1.939114] e1000e 0000:00:19.0 eth0: Intel(R) PRO/1000 Network Connection
[    1.939173] e1000e 0000:00:19.0 eth0: MAC: 11, PHY: 12, PBA No: FFFFFF-0FF
[   28.134290] e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx

[~]{$?=0}Sun Sep 08 06:11:22 > lspci | grep -i eth
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-LM (rev 04)

[~]{$?=0}Sun Sep 08 06:11:55 > ifconfig     (notice no inet addr for eth0)
eth0      Link encap:Ethernet  HWaddr EC:F4:BB:39:95:xx 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:514 (514.0 B)  TX bytes:10034 (9.7 KiB)
          Interrupt:20 Memory:f7d00000-f7d20000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:200 (200.0 B)  TX bytes:200 (200.0 B)

[~]{$?=0}Sun Sep 08 06:12:47 > netstat -r
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
127.0.0.1       *               255.255.255.255 UH        0 0          0 lo

[~]{$?=0}Sun Sep 08 06:13:52 > cat /etc/resolv.conf
[~]{$?=0}Sun Sep 08 06:16:20 >

[~]{$?=1}Sun Sep 08 06:17:00 > sudo udhcpc -i eth0
udhcpc: started, v1.29.3
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover  etc etc   would go forever I think....
^C
[~]{$?=130}Sun Sep 08 06:17:39 >

[/mnt/sdb1]{$?=0}Sun Sep 08 06:37:23 > curl wttr.in
curl: (6) Could not resolve host: wttr.in

I know from Windows ipconfig on this same system and network connection that these are the current IP details:

Quote
Ethernet adapter Local Area Connection:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel(R) Ethernet Connection I217-LM
   Physical Address. . . . . . . . . : EC-F4-BB-39-95-B5
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::e07c:d885:59ac:b2b4%12(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.1.12(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Sunday, September 08, 2019 6:54:37 AM
   Lease Expires . . . . . . . . . . : Monday, September 09, 2019 6:54:36 AM
   Default Gateway . . . . . . . . . : 192.168.1.1
   DHCP Server . . . . . . . . . . . : 192.168.1.1
   DHCPv6 IAID . . . . . . . . . . . : 267187387
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-21-3B-8B-63-EC-F4-BB-39-95-B5
   DNS Servers . . . . . . . . . . . : 192.168.1.1
   NetBIOS over Tcpip. . . . . . . . : Enabled

now trying a few things on this problem system:

Code: [Select]
[/mnt/sdb1]{$?=0}Sun Sep 08 06:31:40 > sudo pkill udhcpc
[/mnt/sdb1]{$?=0}Sun Sep 08 06:32:11 > sudo ifconfig eth0 down
[/mnt/sdb1]{$?=0}Sun Sep 08 06:32:30 > sudo ifconfig eth0 hw ether EC:F4:BB:39:95:xx
[/mnt/sdb1]{$?=0}Sun Sep 08 06:32:49 > sudo ifconfig eth0 up
[/mnt/sdb1]{$?=0}Sun Sep 08 06:33:09 > sudo ifconfig eth0 192.168.1.12 netmask 255.255.255.0 broadcast 192.168.1.255 up
[/mnt/sdb1]{$?=0}Sun Sep 08 06:33:27 > sudo route add default gw 192.168.1.1
[/mnt/sdb1]{$?=0}Sun Sep 08 06:33:50 > sudo echo nameserver 192.168.1.1 >> /etc/resolv.conf
[/mnt/sdb1]{$?=0}Sun Sep 08 06:34:13 >

[/mnt/sdb1]{$?=0}Sun Sep 08 06:34:13 > ifconfig
eth0      Link encap:Ethernet  HWaddr EC:F4:BB:39:95:xx 
          inet addr:192.168.1.12  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7 errors:0 dropped:0 overruns:0 frame:0
          TX packets:152 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1606 (1.5 KiB)  TX bytes:52592 (51.3 KiB)
          Interrupt:20 Memory:f7d00000-f7d20000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:200 (200.0 B)  TX bytes:200 (200.0 B)


[/mnt/sdb1]{$?=130}Sun Sep 08 06:35:45 > sudo netstat -r
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
default         192.168.1.1     0.0.0.0         UG        0 0          0 eth0
127.0.0.1       *               255.255.255.255 UH        0 0          0 lo
192.168.1.0     *               255.255.255.0   U         0 0          0 eth0

[/mnt/sdb1]{$?=0}Sun Sep 08 06:37:23 > curl wttr.in
curl: (6) Could not resolve host: wttr.in

No Internet.... sigh


Does anything jump out to you that I am missing?  Or some suggestions for me to try next?

Below are some outputs from a GOOD system that does connect just fine, right away, first try.  Same boot thumb drive.

Code: [Select]
[~]{$?=0}Sun Sep 08 06:42:38 > dmesg | grep -i eth0
[    3.314002] e1000e 0000:00:19.0 eth0: (PCI Express:2.5GT/s:Width x1) 00:24:e8:97:28:xx
[    3.314004] e1000e 0000:00:19.0 eth0: Intel(R) PRO/1000 Network Connection
[    3.314033] e1000e 0000:00:19.0 eth0: MAC: 7, PHY: 8, PBA No: 1004FF-0FF
[   40.754913] e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx

[~]{$?=0}Sun Sep 08 06:43:35 > lspci | grep -i eth
00:19.0 Ethernet controller: Intel Corporation 82567LM Gigabit Network Connection (rev 03)

[~]{$?=0}Sun Sep 08 06:44:13 > ifconfig
eth0      Link encap:Ethernet  HWaddr 00:24:E8:97:28:xx 
          inet addr:192.168.1.21  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:756 (756.0 B)  TX bytes:692 (692.0 B)
          Interrupt:22 Memory:f6fe0000-f7000000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:200 (200.0 B)  TX bytes:200 (200.0 B)

[~]{$?=0}Sun Sep 08 06:44:42 > netstat -r
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
default         192.168.1.1     0.0.0.0         UG        0 0          0 eth0
127.0.0.1       *               255.255.255.255 UH        0 0          0 lo
192.168.1.0     *               255.255.255.0   U         0 0          0 eth0

[~]{$?=0}Sun Sep 08 06:45:11 > cat /etc/resolv.conf
nameserver 192.168.1.1
[~]{$?=0}Sun Sep 08 06:45:44 >

[~]{$?=0}Sun Sep 08 06:45:44 > sudo udhcpc -i eth0
udhcpc: started, v1.29.3
udhcpc: sending discover
udhcpc: sending select for 192.168.1.21
udhcpc: lease of 192.168.1.21 obtained, lease time 86400
deleting routers
route: SIOCDELRT: No such process
adding dns 192.168.1.1

[~]{$?=0}Sun Sep 08 06:46:26 > curl wttr.in
Weather report: Santa Cruz, United States


Thanks in advance and thanks to all who posted similar issues and troubleshooting suggestions and fixes to the forum.  sorry if I just missed the obvious answer.

thank you
Billy

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: No Internet (inet addr) on detected eth0 connection
« Reply #1 on: September 08, 2019, 01:42:28 PM »
https://forum.porteus.org/viewtopic.php?t=6562
Google points to another distro user having the same trouble with the same card, and he got it working by forcing a PCI reset for it. So either the card or the driver is buggy.
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11590
Re: No Internet (inet addr) on detected eth0 connection
« Reply #2 on: September 08, 2019, 07:39:46 PM »
Hi Rudock1
Try this:
Code: [Select]
sudo pkill udhcpc
sudo ifconfig eth0 hw ether EC:F4:BB:39:95:B5
sudo ifconfig eth0 192.168.1.12 netmask 255.255.255.0 broadcast 192.168.1.255 up
sudo route add default gw 192.168.1.1
sudo echo nameserver 4.2.2.4 > /etc/resolv.conf

Then, show the outputs of:
Code: [Select]
dmesg | tail -n 20
ifconfig -a
netstat -r
curl wttr.in
« Last Edit: September 09, 2019, 11:18:40 AM by Rich »

Offline Rudock1

  • Jr. Member
  • **
  • Posts: 62
Re: No Internet (inet addr) on detected eth0 connection
« Reply #3 on: September 09, 2019, 10:15:13 AM »
Hi curaga and Rich,

Wow, great ideas.  I need to travel for three days but I'll read on the road and try as soon as I get back.

thanks!
Billy