Table of contents
1. Wireless shared network
- Control Panel---->Network and Internet---->Network Connections
- Right-click WLAN---->Properties
"Ethernet", which is the computer network port that the development board is connected to through a network cable. - After clicking OK, it will usually appear that
the IP address of the Ethernet will be automatically changed to 192.168.137.1. You can check whether the IP address has been modified by "right-clicking Ethernet---->Properties---->lnternet Protocol Version 4 (TCP/IPv4)---->Properties".
2. Set the IP and gateway on the development board
- Set the IP, which needs to be consistent with the Ethernet IP network segment.
ifconfig eth0 192.168.137.30
- Set up gateway
route add default gw 192.168.137.1
- Auto-start settings at boot
①vi /etc/network/interfaces
② Add in
auto eth0
iface eth0 inet static
address 192.168.137.30
netmask 255.255.255.0
gateway 192.168.137.1
3. Test
-
Turn off all firewalls on your computer
-
The development board can ping any URL, such as Baidu
-
If you can only ping the IP address but not the domain name, a problem will occur: ping: bad address 'www.baidu.com'
①vi /etc/resolv.conf
② Modify the file to
nameserver 114.114.114.114
nameserver 8.8.8.8