naoli
Posts: 6
Joined: Sat Mar 28, 2015 8:39 pm

Pi not answering on eth0 but OK on wlan0

Thu Apr 30, 2015 2:44 pm

Hello all,

My Raspi is working as a rooter on my LAN, it basically send the wifi connection through the ethernet card on which my LAN is connected :

<internet> ---- <wifi rooter> ---- <raspi on wlan0> --- <raspi on eth0> --- <LAN ethernet rooter>

It works great.

But when on my LAN with any PC, I can ping and ssh on the raspi through its wlan0 IP, but nothing on its eth0 IP.
How can I fix it ?

Here is my interfaces file :

Code: Select all

pi@raspberrypi ~ $ cat /etc/network/interfaces
auto lo

iface lo inet loopback

auto eth0
#iface eth0 inet dhcp
# the internal (wired) network interface
 allow-hotplug eth0
 iface eth0 inet static
  address 192.168.1.99
  network 192.168.1.0
  netmask 255.255.255.0
  broadcast 192.168.1.255
  gateway 192.168.1.99

# the external (wifi) interface
wireless-power off
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
 address 192.168.8.99
 netmask 255.255.255.0
 broadcast 192.168.8.255
 gateway 192.168.8.1
 dns-nameservers 192.168.8.1
 wpa-ssid "XXXXX"
 wpa-psk "XXXXX"
 wpa-group TKIP CCMP
 wpa-key-mgmt WPA-PSK

Code: Select all

pi@raspberrypi ~ $ ifconfig
eth0      Link encap:Ethernet  HWaddr b8:27:eb:a3:72:9e
          inet adr:192.168.1.99  Bcast:192.168.1.255  Masque:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4783664 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4872147 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000
          RX bytes:1230888411 (1.1 GiB)  TX bytes:3583716235 (3.3 GiB)

lo        Link encap:Boucle locale
          inet adr:127.0.0.1  Masque:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:179 errors:0 dropped:0 overruns:0 frame:0
          TX packets:179 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:0
          RX bytes:17693 (17.2 KiB)  TX bytes:17693 (17.2 KiB)

wlan0     Link encap:Ethernet  HWaddr 00:13:ef:70:43:25
          inet adr:192.168.8.99  Bcast:192.168.8.255  Masque:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:663666 errors:0 dropped:336780 overruns:0 frame:0
          TX packets:660277 errors:0 dropped:1 overruns:0 carrier:0
          collisions:0 lg file transmission:1000
          RX bytes:508116145 (484.5 MiB)  TX bytes:322254911 (307.3 MiB)

Many thanks for your help

beta-tester
Posts: 1373
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Pi not answering on eth0 but OK on wlan0

Fri May 01, 2015 8:12 am

i am not exactly sure, what you want...
you know, that you are on different subnet regions with using
eth0 (192.168.1.99) and
wlan0 (192.168.8.99)
Last edited by beta-tester on Fri May 01, 2015 8:19 am, edited 2 times in total.
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)

naoli
Posts: 6
Joined: Sat Mar 28, 2015 8:39 pm

Re: Pi not answering on eth0 but OK on wlan0

Fri May 01, 2015 8:17 am

Problem is on 192.168.1 Ethernet lan I can't ping or ssh the Pi on 192.168.1.99
Whereas I can ping and ssh on 192.168.8.99 (which is another subnetwork!)
Any machine on the Ethernet 192.168.1 subnetwork should be able to ping 192.168.1.99

Any idea how to fix this ?

Many many thanks

beta-tester
Posts: 1373
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Pi not answering on eth0 but OK on wlan0

Fri May 01, 2015 8:20 am

in the past i had sometimes networkproblems, when i was using "broadcast" and "network" to the interfaces files explicitly.
only use "address", "netmask", "gateway" and "nameserver", thats enough.

did you tried this...?
comment out
# broadcast ...
# network ...
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)

nicksoph
Posts: 27
Joined: Fri Aug 26, 2011 9:38 am

Re: Pi not answering on eth0 but OK on wlan0

Fri May 01, 2015 9:18 am

I think the problem may be to do with your IP addressing being set up as two networks with no bridging between them - ie your pi knows about both networks but hasnt been told how to pass info between them.
This might help;
http://superuser.com/questions/520172/w ... e-in-linux

Return to “Troubleshooting”