I'm using a CAT6 cable to connect my RPi 2 to D-Link ADSL Modem. But I can't!
Here are what I've already tested:
When the system is up, I run:
ping google.com it says:
ping: unknown host google.com Then I type:
ping 192.168.1.1 it says:
connect: Network is unreachable Then I type:
route or
route -n it says:
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface Then I type:
ifconfig it says:
# actually it doesn't say anything!!
And here is the content of /etc/network/interfaces :
auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp # iface eth0 inet static # address 192.168.1.88 # netmask 255.255.255.0 # gateway 192.168.1.1 # network 192.168.1.0 I also uncommented the last lines of this file, so it looked like this:
auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp iface eth0 inet static address 192.168.1.88 netmask 255.255.255.0 gateway 192.168.1.1 network 192.168.1.0 Then I rebooted the system; but it didn't work!
I tested the LAN cable on my laptop; it works fine.
By the way, I'm using RPi 2, which has Minibian installed on it. Minibian is a minimal version of Raspbian.
So, what should I do to connect to the internet?
Update 1
Here are some other tests:
I type:
lspci | grep Ethernet it says:
-bash: lspci: command not found I type:
ping 127.0.0.1 it says:
connect: Network is unreachable In /etc/network/interfaces , I commented the iface eth0 inet dhcp , and uncommented the others. But it didn't change anything.
I type:
ifconfig -a it says:
eth0 Link encap:Ethernet HWaddr b8:27:eb:7f:c1:5f BROADCAST 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 LOOPBACK 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:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Update 2
Here are some additional tests:
I type:
ifconfig lo up ifconfig eth0 up and then I type:
ifconfig it says:
eth0 Link encap:Ethernet HWaddr b8:27:eb:7f:c1:5f inet6 addr: fe80::ba27:ebff:fe7f:c15f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:556 (556.0 B) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr : ::1/128 Scope:Host 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:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Then I type:
ping 127.0.0.1 and it worked! it sent and received several packages. However, ping 192.168.1.1 or other pings still don't work.
Update 3
More tests:
I type:
ifconfig eth0 it says:
eth0 Link encap:Ethernet HWaddr b8:27:eb:7f:c1:5f inet6 addr: fe80::ba27:ebff:fe7f:c15f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:623 errors:0 dropped:0 overruns:0 frame:0 TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:48742 (47.5 KiB) TX bytes:556 (556.0 B)
lspci | grep Ethernetto see if the system recognizes your Ethernet card. Also have you tried Rasbian that was compiled for the Pi2? Personally, I cant think of a reason to have a 'more cutdown' distro of Linux, just run it without a GUI.ifconfigshows nothing at all is very odd, you'd at least havelo... doesping 127.0.0.1work? It's like no networking modules are installed. tryifconfig -a- that should show even disabled interfaces