I use Raspbian Jessi(kernel v4.4) on Raspberry pi 3.
These are my configurations.
pi@raspberrypi:~ $ cat /etc/network/interfaces
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
pi@raspberrypi:~ $ cat /etc/dhcpcd.conf
-- default --
........
-- default --
interface eth0
static ip_address=10.0.0.4
pi@raspberrypi:~ $ ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:35:80:7b
inet addr:10.0.0.4 Bcast:10.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::e38f:f977:c7d9:c394/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13103 errors:0 dropped:0 overruns:0 frame:0
TX packets:18870 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1116394 (1.0 MiB) TX bytes:21546414 (20.5 MiB)
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:8284 errors:0 dropped:0 overruns:0 frame:0
TX packets:8284 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:20791523 (19.8 MiB) TX bytes:20791523 (19.8 MiB)
wlan0 Link encap:Ethernet HWaddr b8:27:eb:60:d5:2e
inet addr:192.168.0.139 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::ba27:ebff:fe60:d52e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13334 errors:0 dropped:87 overruns:0 frame:0
TX packets:4495 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10853548 (10.3 MiB) TX bytes:473468 (462.3 KiB)
My laptop(window 10, MSI 6QE leopard pro) connects to the Raspberry Pi through LAN cable. I can remote the Pi with putty in SSH. At the same time, my laptop connects to the internet with wifi.
Pi can connect to the internet with wifi(ping and apt-get are possible). the problem is when I put the LAN cable to remote the machine, only ping to 8.8.8.8 is possible and nothing works. (ping 8.8.8.8 OK. apt-get can't find the host)
Can I use the internet while LAN cable is connected?
/etc/network/interfaces
is the illegitimate offspring of 2 different networking methods (and is not correct for either) so it is difficult to predict what it will do. How do I set up networking/WiFi/Static IP describes the standard Raspbian setup which enables both. The older standard (which is one of the parents of your current config) generally allows only a single interface. Other methods e.g.network-manager
provide finer control as does manual configuration. You need to decide exactly what you are trying to achieve. – Milliways Jul 10 '16 at 11:27