purpose
The board and the laptop are connected through a network cable, and the laptop is connected to the Internet through WiFi; computers, virtual machines, and boards can all access the Internet;
step
- The computer can go online normally through wifi
- The virtual machine does not need to be set, the default is fine (it is better to ensure that the virtual machine can access the Internet normally, that is, the bridge mode)
- Turn on the network adapter on the computer, select your WIFI->Properties->Share, select the network device corresponding to your network cable (may be Ethernet or local connection), as shown below:
- Set a static IP for the laptop's local network
After starting the virtual machine, you will see that both the virtual machine and the local network of the notebook are on the same network segment, and both the virtual machine and the notebook can access the Internet;
- Set the IP address of the board, and then try to ping the virtual machine
setenv ipaddr 192.168.137.104
setenv gatewayip 192.168.137.1
setenv netmask 255.255.255.0
setenv serverip 192.168.137.105
saveenv