Ping: connect: Network is unreachable

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