3

So, I've ran arp -a in raspberry pi and it shows some addresses:

    ? (10.50.220.1) at 00:14:a9:d0:72:80 [ether] on wlan0
    ? (10.50.221.198) at 48:5a:b6:6d:07:ef [ether] on wlan0
    ? (10.42.0.1) at 5c:f9:dd:3f:f9:27 [ether] on eth0
    ? (10.50.220.250) at 70:18:8b:0e:a2:71 [ether] on wlan0

If I try to ping any of those addresses, it works. If I try to ssh, it fails. Also, I tried ifconfig wlan0, which returns a ip address that doesn't exist:

wlan0     Link encap:Ethernet  HWaddr 74:da:38:5c:7b:01  
          inet addr:10.50.221.13  Bcast:10.50.223.255  Mask:255.255.252.0
          inet6 addr: fe80::76da:38ff:fe5c:7b01/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3319 errors:0 dropped:1 overruns:0 frame:0
          TX packets:710 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:373186 (364.4 KiB)  TX bytes:79057 (77.2 KiB)

When I try to ping ip address 10.50.221.13 from another terminal it fails:

PING 10.50.221.13 (10.50.221.13) 56(84) bytes of data.
From 10.50.221.249 icmp_seq=1 Destination Host Unreachable
From 10.50.221.249 icmp_seq=2 Destination Host Unreachable
From 10.50.221.249 icmp_seq=3 Destination Host Unreachable
From 10.50.221.249 icmp_seq=4 Destination Host Unreachable
From 10.50.221.249 icmp_seq=5 Destination Host Unreachable
From 10.50.221.249 icmp_seq=6 Destination Host Unreachable
^C
--- 10.50.221.13 ping statistics ---
7 packets transmitted, 0 received, +6 errors, 100% packet loss, time 6029ms
pipe 3

Here is the output of /etc/network/interfaces:

interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

iface eth0 inet dhcp

# The wifi (wireless) network interface
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
     wpa-ssid "optix"
     wpa-psk "XXXX"

When I use the app Fing on my phone, it doesn't show that ip address either.

The Raspberry Pi has a Edimax N150 Wi-Fi Nano USB Adapter on it. I only have managed to connect via an ethernet cable.

This may not be the same as other questions, as far as I can tell.

SlySven
  • 3,621
  • 1
  • 18
  • 45
user3273814
  • 182
  • 9
  • It would be helpful if you could give me some other things to look into. – user3273814 Jan 10 '16 at 04:54
  • It would be helpful if you listed the outputs of the commands you tried and the /etc/network/interfaces – Milliways Jan 10 '16 at 05:08
  • You appear to be having a discussion with yourself in Comments. Delete these. It is difficult to comment on your interfaces file - it may work, but doesn't look like any other. See http://raspberrypi.stackexchange.com/a/37921/8697 and restore your files to standard settings. The arp output is pretty meaningless without knowledge of your network architecture. – Milliways Jan 10 '16 at 06:20
  • It is WPA Personal. I can't tell you any more about the network architecture, unfortunately because I do not have administrative access to it. I suspect that they block ssh to internal locations (but not to external locations). – user3273814 Jan 10 '16 at 07:03
  • @Milliways it appears the wpa_supplicant.conf is corrupted or something. – user3273814 Jan 10 '16 at 07:19
  • Could you show us the contents of the wpa_supplicant.conffile and, as it isn't your own network, remember to hide any sensitive passwords/keys...! – SlySven Jan 10 '16 at 12:12

1 Answers1

1

This is because WLAN is in different subnet than ETH...

Check your wifi ip and netmask:

10.50.221.13 / 255.255.252.0

That subnet doesn't contain the ethernet ip address: 10.42.0.1.

In fact, because of that mask, your wlan subnet contains ips:

10.50.220.1 to 10.50.223.254 or something like that (same count of ips).

You can check out this tool, if you don't know anything about netmasks.

How to fix that? Well... The easiest way would be to setup wifi router, so it would assign adresses from same subnet (10.42.x.), not (10.50.x.), for example:

10.42.0.128 - 10.42.0.254

and ethernet to

10.42.0.1 - 10.42.0.127

or simply change ethernet ip, so it would be in range:

10.50.220.1 to 10.50.223.254

Flash Thunder
  • 345
  • 1
  • 4
  • 15
  • Setting up a wifi router is not an option for me, considering I live at a student apartment complex that provides wifi. – user3273814 Mar 19 '16 at 19:17