Ping: connect: Network is unreachable

Hi everyone,

i would like to install google-cloud-storage to store pictures.
I can connect myself to the jupyter server : http://192.168.2.99:9090.
I tried to install it with : pip3 install google-cloud-storage / pip install google-cloud-storage but I have got this mistake :

I tried to reach google.com and add nameserver 8.8.8.8 in the resolv.conf file but I have this error : “ping: connect: Network is unreachable”

Best regards,
Lucas

1 Like

@symbole,

Your board needs to be connected to the Internet if you want to install this.
From the limited information you are provided, it seems that you are connected to the board directly (point to point and based on the IP address).

Please, use the search bar in the forum. This is a common question.

Mario

Hi @marioruiz ,

thanks a lot for your reply it is really appreciated.

To be honest I excatly did what mentionned in the getting started here : Assign a static IP address — Python productivity for Zynq (Pynq)

Can you give me more details ? I searched few hours in the forum I saw that few people had a similar problem but not the same. It will be very appreciated.

Regards,
Lucas

Hi @marioruiz,

I read the getting started. I connected my board with a static IP@ thanks to an ethernet cable. This is why I am unable to update or load a package from the terminal or to ping google.com.

I saw that we can use a USB Wifi module but on the usb we will have a camera.

What solutions could we have to have an internet connexion ?

Regards,
Lucas

You can connect the board to the Internet via an Ethernet cable using a router, this should give you a dynamic IP address. You can also connect a WiFi dongle and use the example notebook to connect to the Internet.

Mario

If you want the board to access the Internet through your host PC, you should:

  1. Go to Control Panel → View network status and tasks.
  2. Select the network that has Internet connections, and then select Properties → Sharing.
  3. In the drop-down menu below “allow other network users to connect through this computer’s Internet connection”, select the network (Ethernet) that you are connecting with your board. This should reset the Ethernet’s IP address to 192.168.137.1.
  4. On your board, set the gateway (instead of the IP address) to 192.168.137.1. As for the IP address, you can set it to anything from 192.168.137.2 to 192.168.137.254.
  5. If it still does not work, check the DNS server on your board:
    sudo vim /etc/resolv.conf
    
  6. If it still does not work, check if your host PC really has access to the Internet.
  7. If it still does not work, check the status of your network interface eth0. You may enable it by typing:
    sudo ifconfig eth0 up
    

Hi there,
I try to follow your instruction to make my board access to the Internet through my PC. But as for the fourth point, how can I set the gateway and IP address of my board to range 192.168.137.X? I try so many methods. However, even if I set successfully I cannot delete the previous IP address, which means I can see the new and old IP address through the but the LED only show the old IP address. And then after sharing the Internet, I cannot connect with the Jupyter Notebook.

I wonder is there any details instructions that I can follow? Thank you!

1 Like

sudo route add default gw 192.168.137.1 should set the gateway. sudo ifconfig <your-ifdev> 192.168.3.x should set the IP as 192.168.3.x.

<your-ifdev> depends on your system, for example eth0.

Thanks a lot! It really helps me.