0

I know this question has been asked many times, however I still could not find a solution to my problem. I'm using an Ethernet cable to connect to the pi, however when I use nmap to find the ip address, it only shows the ip of my laptop. The pi has a static ip address, I tried to connect through ssh, but it waits for a while and then fails due to time out. I tried to change the IPv4 Method to share with others and this is what I get when I run ifconfig in the terminal:

br-1a1e47adcf33 Link encap:Ethernet Hardware Adresse 02:42:34:71:17:13 inet Adresse:172.18.0.1 Bcast:0.0.0.0 Maske:255.255.0.0 UP BROADCAST MULTICAST MTU:1500 Metrik:1 RX-Pakete:0 Fehler:0 Verloren:0 Überläufe:0 Fenster:0 TX-Pakete:0 Fehler:0 Verloren:0 Überläufe:0 Träger:0 Kollisionen:0 Sendewarteschlangenlänge:0 RX-Bytes:0 (0.0 B) TX-Bytes:0 (0.0 B) docker0 Link encap:Ethernet Hardware Adresse 02:42:9f:82:c6:d0 inet Adresse:172.17.0.1 Bcast:0.0.0.0 Maske:255.255.0.0 UP BROADCAST MULTICAST MTU:1500 Metrik:1 RX-Pakete:0 Fehler:0 Verloren:0 Überläufe:0 Fenster:0 TX-Pakete:0 Fehler:0 Verloren:0 Überläufe:0 Träger:0 Kollisionen:0 Sendewarteschlangenlänge:0 RX-Bytes:0 (0.0 B) TX-Bytes:0 (0.0 B) lo Link encap:Lokale Schleife inet Adresse:127.0.0.1 Maske:255.0.0.0 inet6-Adresse: ::1/128 Gültigkeitsbereich:Maschine UP LOOPBACK RUNNING MTU:65536 Metrik:1 RX-Pakete:11707 Fehler:0 Verloren:0 Überläufe:0 Fenster:0 TX-Pakete:11707 Fehler:0 Verloren:0 Überläufe:0 Träger:0 Kollisionen:0 Sendewarteschlangenlänge:1000 RX-Bytes:9581079 (9.5 MB) TX-Bytes:9581079 (9.5 MB) wlp2s0 Link encap:Ethernet Hardware Adresse 28:16:ad:a7:e7:a2 inet Adresse:10.42.0.1 Bcast:10.42.0.255 Maske:255.255.255.0 inet6-Adresse: 2003:85:ce44:7735:4029:15a9:c486:5b62/64 Gültigkeitsbereich:Global inet6-Adresse: fe80::26d1:7518:9508:8a33/64 Gültigkeitsbereich:Verbindung UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1 RX-Pakete:13601 Fehler:0 Verloren:0 Überläufe:0 Fenster:0 TX-Pakete:7762 Fehler:0 Verloren:0 Überläufe:0 Träger:0 Kollisionen:0 Sendewarteschlangenlänge:1000 RX-Bytes:13973295 (13.9 MB) TX-Bytes:1837473 (1.8 MB) 

When I try to scan for other addresses, this is what I get:

$nmap -n -sP 10.42.0.255/24 Starting Nmap 7.01 ( https://nmap.org ) at 2017-10-04 22:30 CEST Nmap scan report for 10.42.0.1 Host is up (0.0010s latency). Nmap done: 256 IP addresses (1 host up) scanned in 2.82 seconds 

Same happens when I change Ip into 10.42.0.0.

This is what happens when I connect to the pi with its static ip and with normal network conncetion:

$ssh -Y [email protected] ssh: connect to host 192.168.1.2 port 22: Connection timed out 

I tried the same command on another machine and it worked perfectly fine.

4
  • 1. You have a very strange broadcast on the docker interface and the bridge Bcast:0.0.0.0. 2. And you try to ssh to an IP address that isn't showing up in the output from ifconfig. 3. And what happens if you try to ssh to 10.42.0.1? Commented Oct 4, 2017 at 20:58
  • @MatsK Since 10.42.0.1 is my own laptop, it just enters the terminal when I ssh to it. And the reason why I used ifconfig is to retrieve an ip for scanning with nmap. I don't know what to say about the docker, I changed its ip from localhost to 172.17.0.1, but I don't think it should have an effect on the broadcast Commented Oct 4, 2017 at 21:21
  • 10.42.0.1 is from the WiFi interface from your ifconfig output. You have to check your network configuration! Commented Oct 4, 2017 at 21:28
  • If your laptop is running on the network 10.42.0.xxx, and if you are connecting your RPI to the same router, then you shouldn't setup your RPI with an static IP of 192.168.1.2. You should pick an address within 10.42.0.xxx as the static IP for your RPI. Commented Oct 5, 2017 at 0:56

1 Answer 1

0

10.42.0.1/24 is not in the same ip range as 192.168.1.2. Also if you connected your pi with an ethernet cable, wlp2s0 is not the interface you should be looking at, since it is a wireless interface.

Configure your ethernet interface to anything in the same range (ie. 192.168.1.10) and then try connecting to your pi again.

1
  • 1
    thanks alot, you are totally right, I don't know why I kept looking at the wireless network instead of ethernet Commented Oct 9, 2017 at 13:13

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.