New Ubuntu is installed. Although the IP address and gateway have been set in the graphic interface, they cannot access the Internet. A friend warned that it may be a setup problem. Try setting the command line. So I searched for how to set it, and the result was actually successful. The details are as follows: 1. Check whether it can be connected. When ping command is started, it is always true that unreachable2. set IPsudoifconfigeth0133.133.133.190netm
New Ubuntu is installed. Although the IP address and gateway have been set in the graphic interface, they cannot access the Internet.
A friend warned that it may be a setup problem. Try setting the command line. So I searched for how to set it, and the result was actually successful.
The details are as follows:
1. to check whether the connection is available, ping the gateway using the ping command.
At the beginning, it is always true That unreachable
2. Set IP
Sudo ifconfig eth0 133.133.133.190 netmask 255.255.255.0
In this case, the IP address and subnet mask of the eth0 NIC are set.
3. Set the gateway sudo route add default gw 133.133.133.40
4. You can ping the gateway.
5. Set DNS modification/etc/resolv. conf and add
Nameserver DNS address 1
Nameserver DNS address 2
Complete.
After this setting, it seems that the IP address will change again at next boot.