Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot obtain IP address for eth0 on RPI 3 #2767

Closed
jedichen121 opened this issue Jan 26, 2019 · 3 comments
Closed

Cannot obtain IP address for eth0 on RPI 3 #2767

jedichen121 opened this issue Jan 26, 2019 · 3 comments

Comments

@jedichen121
Copy link

I was trying to setup NFS to use with raspberry pi 3 with build 3.3 following this guide. However, I couldn't obtain an IP address when using wired connection. I found issue #1367 and used ifconfig eth0 up, but still the ifconfig results showed no ip address.

# ifconfig
eth0      Link encap:Ethernet  HWaddr B8:27:EB:DA:46:B7  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:201 (201.0 B)  TX bytes:0 (0.0 B)

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:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

I also tried to edit the /etc/network/interfaces file, adding

auto eth0
iface eth0 inet dhcp

It didn't help and I could see in the boot message showing

Starting network: Segmentation fault
FAIL

Using ifup eth0 gave the same segmentation fault.

Any help would be appreciated. Thank you.

@igoropaniuk
Copy link
Contributor

igoropaniuk commented Jan 26, 2019

@jedichen121

# ifconfig eth0 up
# udhcpc eth0

example:

# ifconfig eth0 up
[   55.258961] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
# [   56.858926] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1

# ifconfig
eth0      Link encap:Ethernet  HWaddr B8:27:EB:7C:97:F6  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

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:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

# udhcpc eth0
udhcpc: started, v1.29.2
udhcpc: sending discover
udhcpc: sending select for 192.168.1.153
udhcpc: lease of 192.168.1.153 obtained, lease time 7200
deleting routers
adding dns 194.50.85.5
adding dns 194.50.85.7
# ifconfig
eth0      Link encap:Ethernet  HWaddr B8:27:EB:7C:97:F6  
          inet addr:192.168.1.153  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:11 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:2494 (2.4 KiB)  TX bytes:700 (700.0 B)

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:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

# ping google.com
PING google.com (216.58.215.78): 56 data bytes
64 bytes from 216.58.215.78: seq=0 ttl=56 time=14.442 ms
^C
--- google.com ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 14.442/14.442/14.442 ms

@jedichen121
Copy link
Author

Works like a charm! Thank you so much! @igoropaniuk

And it seems like editing the /etc/network/interfaces file does not make any difference. Is this because when I write iface eth0 inet dhcp the dhcp client is not installed in busybox, which is also why there is network segmentation fault during booting? Thank you.

@jbech-linaro
Copy link
Contributor

I'm closing the ticket, either because it has already been answered or that it is no longer relevant or it could be lack of response from the author. Having that said, feel free to re-open the ticket if you have more to add to the ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants