Solution for connecting Ubuntu 10.04 to the Internet on vmwarevm

Source: Internet
Author: User
Tags domain name server nameserver
On the vmwarevm, UBUNTU 10.04 cannot be connected to the Internet. Solution: Ubuntu 10.04 was recently installed on the vmwarevm. The network encountered a problem and it took several days to complete the problem. In the first place, you can ping the Internet. I don't know why I can't ping the Internet. I can't even connect to SVN. After several days of exploration, I finally found some solutions to the problem. The general steps are as follows: 1. To ensure that the network adapter has successfully obtained the IP address, if the IP address is not obtained, run sudo ifconfig eth0 upsudo/etc/init. d/networking restart run the preceding two commands and use ifconfig to view the IP address, you can view the configuration file/etc/Network/interfaces. The general configuration is as follows: auto Lo
Iface lo Inet loopback

Auto eth0
Iface eth0 Inet DHCP

Auto eth1
Iface eth1 Inet static
Address 10.1.1.100
Gateway 10.1.1.1
Netmask 255.255.255.0 the configuration here means: the first lo is the loopback network, the second is eth0, the IP address is obtained through DHCP, and the third eth1 uses static IP Address allocation, this is used to communicate with the host machine windows 2. If an IP address has been obtained, You can ping an IP address of the same network segment to check whether the IP address can be successfully pinged. Generally, if the IP address of the ping exists, you can ping the IP address of an Internet IP address. If the IP address cannot be successfully pinged, the problem is generally caused by gateway settings. The solution is as follows: (1) view the gateway address on the Windows Host Machine (2) run the route command to view the gateway information. If the gateway address displayed by the route command does not have the same gateway address as the one displayed on the Windows host, run the following command to add the Gateway: route add default GW gateway address (this address is the gateway address viewed on the Windows Host Machine) if the gateway address viewed by the route command has the same gateway address as that seen on the Windows host machine, run the "route add default GW gateway address" command. I am confused. Once I execute this command, I can access the Internet immediately, haha, but the "route add default GW gateway address" command is only effective for the moment. If the machine is restarted, the command is invalid. Add the command to/etc/profile, in this way, the restart will take effect. 3. If you can ping the Internet IP address but not the domain name, it is a problem with the Domain Name Server. You can view the/etc/resolv file. conf. The file content is generally as follows: nameserver 172.16.200.133
Nameserver 172.16.203.253nameserver is the keyword, followed by the Domain Name Server address, the domain name server address can also be found from the Windows host machine if the above three steps are not correct, but still cannot access the network, that ...... Depending on the specific situation, it is estimated that there is a problem with the configuration in a certain step.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.